heartann 发表于 2009-6-9 18:54 
请教高人有SAS random generate的一组服从柯西分布的数~怎样用最大似然数方法估计参数?或者在SAS里做最大似然数估计的方法?谢谢了,我会给认真回答的同学转论坛币的~~~
There are many prcedures do the ML estimation in SAS. I usually prefer to use NLMIXED and NLP. Actually any SAS procedure has an optimizer(solver) can do ML estimation.
Here are a couple of examples doing CAUCHY distributions( any distribution).
Note: Cauchy distribution has very heavy tail and no moments exist so the GMM and GLS will fail.
data t1;
alpha2=6.9; beta2=2; seed=(88882);
do i=1 to 5000;
x=alpha2+beta2*rancau(seed);
output;
end;
run;
proc nlp data=t1;
max logf;
parms alpha=1.1, beta=1;
bounds beta>0;
f=1/(beta*3.14159278*(1+((x-alpha)/beta)**2));
logf=log(f);
run;
proc nlmixed data=t1;
parms alpha=1.1 beta=1;
bounds beta>0;
f=1/(beta*3.14159278*(1+((x-alpha)/beta)**2));
logf=log(f);
model x ~ general(logf);
run;