[code:2138sk06]data have; run;
proc mcmc data=have outpost=MixtureNorm seed=11 nmc=10000 nbi =2000;
parm x 0;
logp = logpdf('normalmix', x, 2, 0.5, 0.5, 0.5, -0.5, 0.4, 0.4);
prior x ~ general(logp);
model general(0);
run;[/code:2138sk06]
假设一个空集的输入数据。此处设定似然值为常数(flat)。故此posterior等同于prior, a mixture of normal distribution.作者: shiyiming 时间: 2011-3-11 17:47 标题: Re: 如何用SAS生成双峰分布的数据呢? to jingju
非常谢谢你的回复
不过程序中nmc是最后生成的个数吧,那 nbi 是什么意思呢?
需要根据nmc相应的调整吗?作者: shiyiming 时间: 2011-3-11 21:36 标题: Re: 如何用SAS生成双峰分布的数据呢? that is burning number. people thint it may not be necessary when you simply generate a distribution. but it is no harm to get rid of those first ones in my understanding.作者: shiyiming 时间: 2011-3-12 23:51 标题: Re: 如何用SAS生成双峰分布的数据呢? 京剧兄,码品好,人品也好,佩服佩服