Warning: include_once(/home/nullvoid/blog.mikezhang.com/wp-content/plugins/wordpress-support/wordpress-support.php): failed to open stream: Permission denied in /home/nullvoid/blog.mikezhang.com/wp-settings.php on line 217

Warning: include_once(): Failed opening '/home/nullvoid/blog.mikezhang.com/wp-content/plugins/wordpress-support/wordpress-support.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/nullvoid/blog.mikezhang.com/wp-settings.php on line 217
NullVoid » 2006 » October NullVoid » 2006 » October

Archive for October, 2006

Ashley? Ugly?

Friday, October 27th, 2006 -- By Jade

说起偶们的小女薇薇, 那个小样儿还是蛮招人待见的. 白白嫩嫩的, 而且特不见外, 见谁都咧着没牙的嘴乐. 只要她二小姐不是太忙的前提下, 临走对人还会摇摇手示意一下, 就是说bye bye了您.

唉, 可是这两天, 这个Ashley变成了Ugly….sigh! 仰天长叹啊.

香港这地儿人多, 病毒也多.

小东西和偶们出去吃了顿饭, 得, 10天以后开始发烧, 烧啊吃了药都不带退的. 小人儿是轻伤不下火线, 照样儿满地爬着. 到是把我这当妈的愁的不行. 烧了4天后开始出疹子了, 先是嘴里, 再是脸上. 我以偶妈遗传下来的医学细胞很准确的作出了结论: 坏了, 出麻疹了. 我上网古狗了一下, 立刻坚定了偶的结论, 是麻疹.

大清早的, 偶推醒了孩她爸, 对娃儿的病情详细的做了个分析报告后, 偶就抱着偶的小心肝去急症了(倒霉,那天刚好周日). 果真医生鉴定后, 也作出了麻疹的结论. 一般麻疹疫苗要一岁时打, 这个10个月还不到的薇薇就被传染了. 这病也没啥药好治, 只好忍着了. 临走医生千叮咛万嘱咐, 偶们家这个宝贝儿只能在家里待着, 千万别出去祸祸别人了.

第5天已经满脸都事小麻点了, 红红的, 一团团的. 连嘴里, 嘴唇上, 舌头上. 也都是白白的小点儿. 唉! 丑啊. 小东西也蔫了, 我看着这个丑丑的小人, 恨不得大哭一场.这些个麻点要是留下个一个半个的, 偶们这个小样儿的不就破相了么.
第六天, 满肚皮, 满背都是.

第七天, 手上脚上也有了. 脸上的有点退了. 小家伙又开始满地找拖鞋了.
第八天, 呵呵, 脸上的退了很多.

第九天, 脸又光滑了. 身上有一些, 无大碍了. 照样还是那张光滑的小脸. 偶这颗心算是放下了
但是,外面的疹子是退了, 现在问题是小家伙的嘴里依然是泡连着泡. 还没好透. 不过再过几天就应该好了.

期间, 香港什么传染病中心打电话多次, 询问情况, 并一再要求偶们这个小毒虫不要出门, 即使去医院也要带口罩.

好在萱萱打过疫苗得以幸免啊.

对了, 这个薇薇2周前已经开是有点有意识的叫” 爸爸” 了. 现在, 有时一她一看见小豆, 就会兴高采烈地张着小嘴: 爸爸(怕怕).把她老豆美的, 别提了. 我这叫郁闷啊. 我辛辛苦苦, 容易么, 怎么这娃儿一哭了才喊我妈呢. 高兴时让她叫声儿妈, 她也得把我喊成爸.

不过, 我每次出门回来, 小东西都会连叫带喊地叽叽咕咕地飞速爬过来, 那叫一个急切啊. 我真是看在眼里, 美在心里啊. 要是偶稍微慢一点去抱她, 她都坐起来呜呜地委屈地不得了.

最近小同志也会扶着东西站起来了. 每次站起来, 她这叫一个美啊. 恨不得笑出声来.

偶决定以后不带小薇薇去公共场所吃吃喝喝了, 以免被病毒骚扰. 就这么定了. 好在有Natalie, 这个还是可以执行的了.

旺角, 一个不得不说的故事

Thursday, October 26th, 2006 -- By Jade

香港的旺角是很有名的。因为这里有大把的电器商店和女人街,还有传说中的黑帮。

我对这个地方是决无好印象的。 大概是我点儿背吧。一共就去了2次旺角,2000年4月,和今年的8月。可是我怎么就这么不幸呢,每次到旺角,唉。。。。说起来真是苦大了。

6年前,我听导游说这个旺角是卖电器的集中地,就想也没想,背上挎包出发了。

那是,偶还是比较年轻和天真的,到了旺角,望着那一街的电器点会心的笑了:呵呵,总有一款相机适合偶啊。在旺角,一般电器店的门口都会有猛男或萎缩男在那里招揽生意。随便看了几家店,我就兴高采烈,神使鬼差的进了一家黑店(时候越想越觉得那里几乎全是黑店。店里的墙上密密麻麻摆满了当时最流行的相机。偶这个人向来买东西是很爽快的:看上了就买,几乎不货比2家的。后来我发现了,进了这门,象偶当时那样的傻妞儿,不被骗是不要想出来的了。

港男甲用港味普通话对我说:小姐!◎#¥%%……%……(此处省略235字)我听了听,看了看,指着当时流行的一款相机说:就买这个了。港男甲便对身旁的的港男乙说了几句港语,港男乙拔脚跑出了店外,没影儿了。我这当时还纳闷呢:我不是要买相机么,这是啥意思呢。正奇怪呢,甲又对我说:不好意思啦,小姐,那个先生去仓库拿货啦,你在这里等等啦。。啦。。。啦(你说,我当时也是有点傻,巴掌大的相机,那么大个门面竟然放不下,唉。。。)然后,甲就和偶聊上了,◎#¥%……※◎,总之家长里短,全国各地聊了一遍。不知道过了多少时间,反正偶都觉得已经不能在等了,至少有半个小时了,正在偶要起身告辞时,乙满头大汗的回来了。(唉,在香港这地儿,想要出汗太容易了)乙又对甲说了几句港话。然后甲满脸遗憾的对我说:小姐,不好意思啦,你要的这款没有啦。偶说,没关系那偶去别的店看看了。甲说着拿出一台相机来,说:小姐,这款相机不错啦,光学◎#¥%*啦,反正是一串专用名词。偶也不懂啊,看这个店员还很负责么,那就买吧,也是个名牌的日本相机,不会差吧。港币1,200。

偶是个急性子,买了东西,一定要马上用.所以, 还没出旺角那条街, 我就拿出相机, 左看右看, 心里不知道那里不对劲儿. 又路过一家相机店, 门口的猛男拦住偶, 问偶:小姐,你的相机多少钱买的啦? 听说偶的价钱, 猛男猛摇头说: 我这里只卖你700元, 这个是水货啦@#$%

我一听, 火大了, 怎么这么多钱还是水货呢. 不行得去找他们讲讲理啊. 又回到那家店, 港男甲,乙 见我回来, 竟一点都不心需, 好象知道偶要回来得一样. 贫我说破嘴皮也不退不换. 偶赖得不走时, 从店里面帘子后走黑衣猛男丙. 丙出来, 对偶义正辞严地说: 我呢, 是中间人, 跟他们不是一边的, 给你调解一下了. 说着丙, 又拿出一台相机, 说道: 这样吧, 在香港是不兴退货的. 你在加300块, 买这台相机吧. 这台不是水货来的. 你看有全球保养单. 话说这个黑衣丙, 说话是掷地有声啊, 听得偶不寒而立…..最后知道自己也逃不出了, 要不拿着水货走人, 要不再交300大元. 唉, 咬着牙, 交了. 总比买一个两天就坏了得相机强啊.

更离奇得还在后面…..我痛心万分的交了钱, 刚要拿起相机. 老大丙用手按住相机, 说等一等, 拿出笔来,在发票上写下: 本人同意不报警, 不投诉.  又义正辞严的说:  签个字.  偶看着店里的黑衣老大和那两个混混, 只得签了

唉, 只能说: 偶真的很傻, 真的, 不知道旺角黑店多

时过6年, 有朋友开车载偶们又到旺角. 朋友LP下车办事, 偶们在车上等. 一会儿, 有人拿着个写满数字的小本敲车窗. 朋友下车说了几句回来. 然后从包里拿出一张钱, 交给那个人. 我心想, 偶们违章停车了? 这香港的警察怎么不穿警服呢? 难道这个时交通管理员也有权罚款? 偶就问偶的朋友是不是停错地方了. 朋友答曰: 那是黑社会来收保护费的. 原来, 刚才那人手里拿的小本记的是路边停的车的车牌号. 你要是不给钱, 你的车就又可能被刮花. 当然也可以报警了, 不过多一事不如少一事. 而且, 他们因车收费, 朋友那辆小车, 也就5块钱. 宝马,奔驰就不好说了

所以, 这个旺角不要轻易去了.

对了, 那个相机, 偶2个月后在北京的燕莎看见才买780RMB. 相机(美能达)用了1年零1个月, 坏了. 保修期一年, 要修, 再交600元换主板.

WINBUGS and SAS

Thursday, October 26th, 2006 -- By ET

Recently I need to work on a very complicated hierarchical nonlinear model, the estimation requires complex estimation procedures. Therefore I resorted to the so called MCMC technique (Markov Chain Monte Carlo).

Winbugs is very powerful, and I absolutely like it. The problem with winbugs is that I need to use several softwares and go through a complicated process to test different models, different initial values, and the parameters to be estimated goes from 160 to more than 300.

First I create my regression datasets in MySQL (sometimes with a little help in ACCESS), then use a PERL script to turn them into winbugs format (I can post this program some time later, it is too ugly at this stage). After that I click the buttons in winbugs to do the study, if you ever used winbugs, you know the pain of clicking them. Due to the large number of parameters, the iterations are quite time consuming. I’m a cautious person, so I usually run 10,000 burn-ins, then use 50,000 iterations to calculate the estimates. After that, I have to select the text in the log window and paste the result to Excel, clean up the format and import to ACCESS or MySQL. Match the result with my regression covariates and export to SAS. In SAS, I do some simple regression and bootstrap analysis of the result. Usually, I will have some idea to test the next model, then I have to go over the whole process again from the beginning.

If you think this is a pain, you should see how I first used winbugs, I did not know how to estimate the 160 parameters, so I run 80 times of the model, each time obtain two values.

Today, I finally decided to put an end to this manual way of doing research. So I searched ways to do it combining WINBUGS and SAS. There are quite a few useful links on WINBUGS website regarding SAS. But they are relatively independent. I hope to write this small article to provide a unified way of using WINBUGS with SAS.

First of all, to automate the estimation, I need to be able to convert SAS datasets to winbugs format then submit my models within SAS, and without having to click on the winbugs window. The results should be read back to SAS.

SUSBug.sas

The best candidate to submit the winbugs command, and gets it translated to a script is provided here by S.M. Mwalili. The documentation is given here. The idea is to submit a command of the following format:

%SasBugs(Work = c:/BugsSAS/schools/, Chains = 3, Burn_in =3000, Updates = 9000, Parameters = mu,sigma.theta theta, Coda = T, Dens = F, debug = F);

The problem with this solution is that you have to have everything (the model, the data, the init values) readily saved in winbugs format in that WORK directory. The model can be put there easily, but it still is a headache to convert and generate the data file. Another issue is that this procedure does not help to read back the results.

Rodney Sparapani’s and Matt Hayat’s SAS macros for BUGS

To convert between SAS and winbugs data format, we need some other macros available here. (Documentation)

_LEXPORT: Export a SAS dataset to a “list” data file
CODA2SAS: Converting CODA files to a SAS dataset

BUGStoSAS: converting BUGS output files to a sas dataset (Documentation)
SAStoCODA: Converting a sas dataset to CODA input files (Documentation)

Installation Instructions:

  1. unzip them into a directory that I’ll call SASMACRO, but you can call it anything that you want
  2. add this line to your SAS configuration file, sasv8.cfg or sasv9.cfg
    -insert sasautos ‘SASMACRO’
  3. several people have written to me about their broken SAS installations; if SAS can’t find it’s own SAS macros, like LOWCASE, try adding this (Unix):
    -insert sasautos ‘!SASROOT/sasautos’
    or this (Windows):
    -insert sasautos ‘!SASROOT\core\sasmacro’
  4. now, call the SAS macros from your SAS program like:
    %_decoda(out=dataset, chains=2, infile=coda);
    %_limport(infile=alc.tbl, file=import.sas, out=alc);
    %_lexport(file=alc.txt, data=alc, var=status alcgrams);
    %_sexport(data=matrix, var=col1-col5, file=m.struct);

Zhiyong Zhang’s SAS WINBUGS pages

Zhiyong Zhang at Virginia Tech improved the Rodney’s macros and made them available here.

Two files got modified. The first one is _sexport.sas. It was changed to output the sample size (N) and number of variables (T) in the WinBUGS format data file. The second one is coda2sas.sas. It was modified to generate the history plot for each parameter.

Here gives a few links at to other resources here.

A good summary about how to implement the whole thing is in a PDF file here.

				

遍地都是小星星

Monday, October 23rd, 2006 -- By Jade

要说这个人懒起来真是没边儿啊。 就象我,明明有很多时间可以写这个,就是有点懒得写。 不过,现在懒筋儿算是过去了。

香港明星多啊。就是一个星星制造港,只要是个年轻一点的,情况中等的人,被包装包装,一般八九不离十,准能成星。偶姐姐还时不时问我:看见明星了么? 我答曰:唉,懒得去看。 可是这明星之多,象我这种懒得看的都一个月看一个,就别说那些追着明星跑的小妹妹了。

一日在离家2站的将军澳商场看见: 郑嘉颖。 这个好像是最近新的小明星。 象我这个大婶一级人物的要不是看那些小妹妹高高举起的牌子,都不知道这位年轻的小伙子还是个明星哩。 听他献唱一曲好像很一般。不过台下的小星迷可就不这么想了。

临回家前在商场里看见广告,说是梁永琪某日也要来与fans见面。

上周五,去离家更近地东港城,又见明星。呵呵,这回是大叔级地星星啦,所以偶是知道并认识地。穿着白衫黑裤子白球鞋的许志安在商场的台子上讲一些偶听不懂的广东话。唉,真是和明星面对面啊。最后我过去看看他,安仔离偶也就2步之遥啊。可惜,偶也过了粉丝的年龄,也不fan他,不然上去献把花,献个吻什么的, 还是有机会的了。呵呵, just kiding。

普及一下新的流行词汇:型男。大概是指有型的男士吧。报纸,杂志的八卦版几乎每天都能见到这个词。

overheard…

Monday, October 16th, 2006 -- By ET

“Civilization advances by extending the number of important operations that we can do without thinking about them.”

-Alfred North Whitehead, 1911

Nobel Peace Prize 2006

Friday, October 13th, 2006 -- By ET

is given to Muhammad Yunus and Grameen Bank for their efforts to create economic and social development from below.

In the press release from sweden:

Loans to poor people without any financial security had appeared to be an impossible idea. From modest beginnings three decades ago, Yunus has, first and foremost through Grameen Bank, developed micro-credit into an ever more important instrument in the struggle against poverty. Grameen Bank has been a source of ideas and models for the many institutions in the field of micro-credit that have sprung up around the world.

The fundamental idea of this micro-credit mechanism is actually quite intriguing from the perspective of economics.

First of all, it puts trust into people who have no ways to show their trustworthiness. This demands a great leap of faith in people. In general financing situations, the lending party uses all kinds of means to ensure that when anything goes wrong, the borrowing party is liable and can be hold responsible for the problem. Usually, the borrowing party has to put his/her assets (house, business or other valuable financial assets like bonds, etc.) down. When the borrowing party does not own anything, a collateral is needed to take up the responsibility. However, in poor economies, a collateral is not so easy to find. Not only it is implausible for individuals to take up all the risk of financing people who own nothing, but these poorest people seldom know any one who are able to offer the help. In a perfectly rational system, offering loans to these people is simply impossible, as there is obvious benefit for people to borrow money, but the cost (at least monetary cost) too them is minimal. Even with a strong legal system, it is simply not economically viable for the banks to loan to these people — suppose you can put anyone who can not repay to jail, the bank still lose the money. This is why I was so amazed to learn about this mechanism when I first read about the idea of the Grameen Bank (from an article written by Jean-Jacques Laffont: Laffont, Jean-Jacques, 2003. “Collusion and group lending with adverse selection,” Journal of Development Economics, Elsevier, vol. 70(2), pages 329-348, April.)

The major consequence of not being able to offer loans to these people is that a great amount of social welfare can not be realized. These people not owning any assets does not mean they do not possess the ability to create social value. Given enough startup funds (and in the cases for the poor, usually not much is needed), they can generate enterprise that may benefit others and most importantly of all, may sustain themselves and their families. People often attribute the power of the small and medium enterprises and the sustainable development of the developed economies to the availability of financial support from loans and venture capitals. Without the $100,000 check written by Larry Ellison on the breakfast table for Google, we will not be able to use the wonderful services now. There are so many examples to show the importance of financing the “talented but poor”.

The Grameen Bank idea implements incentive mechanisms to ensure the repayments in an innovative way. The basic idea is to offer group-lending contracts with joint liability. Traditionally, the role of taking care of the poor lies in the governments, there are many setbacks associated with this appoach. Inefficiency, corruption, mis-management, etc. are not the focus of this article. The point is that centralized decision-making, though theoretically interesting, does not function so well in the real world. The value of Grameen Bank lies in the possibility to use market-based forces to help the poor.

For more information about this, please refer to Wikipedia entry at http://en.wikipedia.org/wiki/Grameen_Bank

国庆深圳慌忙游

Tuesday, October 3rd, 2006 -- By Jade

9月29日刚给萱萱, 薇薇办好了旅行证, 小豆同志的屁股就作不住了。10月2日, 都快午饭时间了, 我正作摸着吃什么呢。 小豆突然跳出来说是去深圳。我心里。。。。有点不乐意:这个也太匆忙了, 怎么能打无准备的仗呢?不过,唉!  胳膊牛不过大腿啊。 一家四口终于在11:20浩浩荡荡出发了。路上还是很顺利的。 1点种终于踏上了深圳的地界。

其实这大半天也没干啥。不过才吃了2顿饭,见了见小豆的姨父,表哥什么的。萱萱景仰很久的圆圆表姐这两天也不在。不过感叹一下, 这个深圳的马路真的是太宽了。。。那叫一个的开阔啊。。。单向4车道,双向八车道。而且十一长假,市民们好像都出门了。马路上也没啥车,街边人也不多, 还是很舒服的。 还有,就是这个深圳吃饭真是相当的便宜的。

爽是爽了, 可是回家后想起了萱萱的作业还没作完呢。 唉,只好给老师写张条说是迟一天交。检讨一下,我这个妈当的。。。


BlogTimer
You are visitor number several since September 1, 2001

Copyright Xiaoquan (Michael) Zhang, 2004-2020. All rights reserved.
All trademarks property of their owners.