这是问题部分的代码:
ods trace on;
proc nlmixed data=zhengzh.tem fd=central technique=quanew update=bfgs;
by code;
parms a=0.5, d=0.5, u=&u, e1=&e1,e2=&e2;
bounds 0<=a d<=1, u e1 e2>=0;
pin=a*u/(a*u+e1+e2);
temp=(1-a)*pdf('poisson',buys,e1)*pdf('poisson',sells,e2)+a*d*pdf('poisson',buys,e1)*pdf('poisson',sells,u+e2)
+a*(1-d)*pdf('poisson',buys,u+e1)*pdf('poisson',sells,e2);
if temp=0 then temp=1E-300;
loglik=log(temp);
model buys~general(loglik);
estimate 'alpha' a;
estimate 'delta' d;
estimate 'mu' u;
estimate 'epsilon1' e1;
estimate 'epsilon2' e2;
estimate 'PIN' pin;
ods output AdditionalEstimates=zhengzh.pin;
run;
ods trace off;
出现了警告:
WARNING: The final Hessian matrix is not positive definite, and therefore the estimated covariance matrix is not full rank and
may be unreliable. The variance of some parameter estimates is zero or some parameters are linearly related to other
parameters.
然后估计出的参数要么是初始值,要么取得是a和d的边界值0和1,而且不同的股票代码code计算出的参数竟然完全一样啊,可每个code的buys 和sells数量并不同?初始值我在取值范围内随便取的。出现这个结果是原数据的问题还是编码的问题呢?可原数据code,buys ,sells都是真实数据,又变不得。一筹莫展,求大神多多指点啊~~~