- 阅读权限
- 255
- 威望
- 0 级
- 论坛币
- 243 个
- 通用积分
- 0
- 学术水平
- 3 点
- 热心指数
- 4 点
- 信用等级
- 4 点
- 经验
- 499 点
- 帖子
- 23
- 精华
- 0
- 在线时间
- 88 小时
- 注册时间
- 2014-3-16
- 最后登录
- 2022-12-17
|
magicsun 发表于 2017-10-6 09:57 
就是所有的参数和t值都列出来吧? - fprintf(1,'****************************OLS****************************\n');
- results=ols(y,[xconstant x]);
- vnames=strvcat('ln(lp)','intercept','p','ln(e)','ln(m)','h');%备用为:'ln(d)','ln(d)''city','xx'
- 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
- % The (robust)LM tests developed by Elhorst
- LMsarsem_panel(results,W,y,[xconstant x]); % (Robust) LM tests
- % The lm tests developed by Donald Lacombe
- % see http://www.rri.wvu.edu/lacombe/~lacombe.htm
- % ----------------------------------------------------------------------------------------
- % spatial fixed effects + (robust) LM tests for spatial lag and spatial error model
- % fixed effects, within estimator
- % demeaning of the y and x variables
- fprintf(1,'****************************个体固定效应OLS****************************\n');
- model=1;
- [ywith,xwith,meanny,meannx,meanty,meantx]=demean(y,x,N,T,model);
- results=ols(ywith,xwith);
- vnames=strvcat('ln(lp)','p','ln(e)','ln(m)','h'); % should be changed if x is changed
- prt_reg(results,vnames);
- sfe=meanny-meannx*results.beta; % including the constant term
- yme = y - mean(y);
- et=ones(T,1);
- error=y-kron(et,sfe)-x*results.beta;
复制代码代码如上
|
|