% dimensions of the problem
load w.mat;
load hp.mat;
T=16;
N=285;
W=normw(w);
y=hp(:,[4]);
x=hp(:,[5:10]);
xconstant=ones(N*T,1);
[nobs K]=size(x);
% ols estimation
results=ols(y,[xconstant x]);出错
vnames=strvcat('lnhprice','intercept','lntalgath','lnavrgdp','lnrealinvest','lnwage','lnpopdensity,''lnfisexp');
prt_reg(results,vnames,1);
sige=results.sige*((nobs-K)/nobs);
loglikols=-nobs/2*log(2*pi*sige)-1/(2*sige)*results.resid'*results.resid



雷达卡


京公网安备 11010802022788号







