六步学会用MATLAB做空间计量回归详细步骤_第1页
六步学会用MATLAB做空间计量回归详细步骤_第2页
六步学会用MATLAB做空间计量回归详细步骤_第3页
六步学会用MATLAB做空间计量回归详细步骤_第4页
六步学会用MATLAB做空间计量回归详细步骤_第5页
已阅读5页,还剩22页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、I.excel 与 MATLAB链接:Excel :选项加载项COM加载项转到没有勾选项COM加载项可用力Lt顷;FoMtReader PDF 匚reator COM Add-inInquire港加(A). “Microsoft Power Wap for Excel Microsoft Power Pivot for Excel Microsoft Power View for Excel2. MATLAB安装目录中寻找 toolboxexlink点击,启y旦动求和S Wt *清除-排和瞒选童隊厳JOTLAB工宜用宏桥CK 口期K小Contents2013/13/28 3:14VATLAB

2、Code1 KBaf exdlink2013/10/9 22:48Excel .IOS KB口日 eifdlink2(X)32013/10/9 23:43IN/icrosoft Excell .305 KB葩 ExliSamp200/11/5 19;53Vicrosofl ExctI .72 KB getfunctiOnhelp2010/12/4 5:17MATLAB Code2 KBtL gethjnctfonlist2010/13/4 217MATLAB Code3 KB巴 GeTfLiriciion5igna:ure2012/5/4 2:59MATLAB Code4 KG infoI30

3、07/7/24 0122XML SB1 KB然后,Excel中就出现MATLAB工具111 S*再共事E:MATLABtoolboxexli nk工 十匚口 田 插入(注意Excel中的数据:)权章敖据Sheets3. 启动 matlab点击 start MATLABsenddata to matlab,并对变量矩阵变量进行命名(注意:选取变量为数值,不包括各变量).吊A' /tx=t甘1S":-匕二GVs-a卫閣九nL-4朋 伽E MIKHw a at冊 屮期】 Q rKKineMJtn 孝皿.intd TKfiS il4lWi<9fr5M?1 IWJ丄蓟祜5BMil

4、l?-1 imfl 1畑嗦1琵1 ijfl*曲?& 4<WI0富纳I nJ;ii尊伽1iWJSaJ-fllt-U:u 唱fipJ- iui-h1i UUVU4biff-d稈测*啦決11tft.'nnM WdV-41:丄 Ub$J311N如1U1Z-azzH:-a j3Pn丄珂|厂111 tSl4 uftu144 rami-a T耐-a 1耐dwr1?J«W>PE、J ?工血114 millmiH'-a mu4-(n?IZT1;I MPIJIEH砒刚J- nw11i mv-13町 JTOZI4 trwa'111 W-Z13I nni-flZM

5、lJ. JSEZi-<1i 44啤a ?W3J ?M11Z1i rZZMZ1 rod'-a u咛J 4fpr;io«nrq ltmi:i?uZA®1K3-a I'M:am珥,|P7eMiJlW耐 Fn >v-i4d TrHII211MH畑51创FFwgjifj刚.1 泗J 441M luil im n 1W« *1MI IKb r?阳H,、?7Wtpfl! 1 nu? 如I fJKJ?jMI孔(data表中数据进行命名甜4U4 UU<JJJU 1 程 bU4U lULFZbf4 i&iBbJitn 斗 11274. tJ2

6、9414.8402420 1301810.1535194 7757825792452.129424&B39810.11817&-0.03264.gMS996354.14966.129434.395G830.3505260 l7540e4.B56453515223950.229444 5649570 1200177-0 03264 5 開535106211465 429454 56&4290 22953802406064 T5B2615017 33653 3294&47077270 1002870 1313914 711S924B3 3360.5心RS-容I- E

7、E9呻屮巾 w m -nm c h b cAft(空间权重进行命名)4 口o Q fl Q Q QQ Q Q Q u- Q n Q fl Q Q Q d Q fl Q 1 fl- 1D n- D Q I 1 Q -D o u D D ODp-Accccn-cct bcccc-crvnp4-(3) 导入MATLAB中的两个矩阵变量就可以看见工作区double46x45 dc>uble主盂爲 1? 3国苣 新建打开肯 輕本 *乐打开变最讎工柞区=世Simuilink库* ill2IB .u>ir-?.uuKh <-i4.将elhorst和jpIv7两个程序文件夹复制到MATLAB

8、安装目录的toolbox 文件夹,_, el horsti如2017/1/M 15:0S文件矣5.设置路径:(?©出inkin Ff更改MATLAB用于壹找I'ik2017/1/15 0:46交件关« E) k MATLAB toolbox p7 Bn4去称B却,jplv7:/駡 12:19曲迅我栽i- local3 017/1/1 9 昭J* SStJ. hezoi7,aa 9z:常ap3M打'1沁止Q2;f. matlab2 CH打打丄i 9 24i. M;4lab prngrrtm3fW?J-?ni4?f>l 7/1/1'=障"

9、b箕机-J. mailabjd2017/114 923丈14央.& $ 地躍:C.)f. rnfcc?O17Z1/14 Q ?5114b帕pc2017/114 3 24U专业(C;)丄 nnft2OL7/bl4 9251 r 丽E:)t- opcZOL7/1/14 925a舸比)-OPT nr20L7/bl4 &25,臥? m販如fiti* # 1rrr1 卜jplv6.输入程序,得出结果命令行窗口» T=30,N=15;W=noiHw -fWl);y=A(ij 3):x=A(: J 4, 6):xcorvE-t ant=on.es (K*rj 1);& no

10、bs E=size(y);1 r-LJc1 1T=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);xcon sta nt=on es(N*T,1);n obs K=size(x);results=ols(y,xc on sta nt x);vn ames=strvcat(logcit',' in terce pt','log p','logy');p rt_reg(results,v names,1);sige=results.sige*( nobs-K)/nobs);loglikols=-nobs/2*

11、log(2* pi*sige)-1/(2*sige)*results.resid'*results.resid % The (robust)LM tests develo ped by ElhorstLMsarsem_pa nel(results,W,y,xco nsta nt x); % (Robust) LM tests解释每一行分别表示:该面板数据的时期数为30 (T=30 ),该面板数据有30个地区(N=30 ),将空间权重矩阵标准化( W=n ormw(w1)),y,将名为A的变量的第4、5、6列数据定义为解释变量矩阵X,定义一个有N*T行,1列的全1矩阵,该矩阵名为:xco

12、nstant , (ones即为全1矩阵)说明解释变量矩阵x的大小:有nobs行,K列。(size为描述矩阵的大小)。附录:将名为A (以矩阵形式出现在 MATLABA中)的变量的第3列数据定义为被解释变量静态面板空间计量经济学、OLS静态面板编程1、普通面板编程T=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);xcon sta nt=on es(N*T,1);n obs K=size(x);results=ols(y,xc on sta nt x);vnames=strvcat( 'logcit' ,'intercept'

13、,'logp' ,'logy');p rt_reg(results,v names,1);sige=results.sige*( nobs-K)/nobs);loglikols二-nobs/2*log(2* pi*sige)-1/(2*sige)*results.resid'*resu lts.resid % The (robust)LM tests develo ped by ElhorstLMsarsem_pa nel(results,W,y,xco nsta nt x); % (Robust) LM tests2、空间固定 OLS(spatial-

14、fixed effects)T=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);xcon sta nt=on es(N*T,1);n obs K=size(x);model=1;ywith,xwith,mea nny, mea nn x,mea nty,mea ntx二demea n( y,x,N,T,model);results=ols(ywith,xwith);vn ames二strvcat('logcit','log p','logy'); % should be cha nged if x is cha

15、nged p rt_reg(results,v names);sfe=mea nn y-mea nn x*results.beta; % in cludi ng the con sta nt term yme = y - mea n( y);et=on es(T,1);error二y-kro n(et,sfe)-x*results.beta;rsqrl = error'*error;rsqr2 = yme'*yme;FE_rsqr2 = 1.0 - rsqr1/rsqr2 % r-squared in cludi ng fixed effects sige=results.si

16、ge*( (n obs-K)/no bs);logliksfe=-nobs/2*log(2* pi*sige)-1/(2*sige)*results.resid'*resu lts.residLMsarsem_pa nel(results,W,ywith,xwith); % (Robust) LM tests3、时期固定 OLS (time-period fixed effects )T=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);xcon sta nt=on es(N*T,1);n obs K=size(x);model=2;ywith,xwit

17、h,mea nny, mea nn x,mea nty,mea ntx二demea n( y,x,N,model);results=ols(ywith,xwith);vn ames=strvcat('logcit','log p','logy'); % should be cha nged if x is cha nged p rt_reg(results,v names);tfe=mea nty-mea ntx*results.beta; % in cludi ng the con sta nt term yme = y - mea n( y)

18、;en=on es(N,1);error二y-kro n(tfe,e n)-x*results.beta;rsqrl = error'*error;rsqr2 = yme'*yme;FE_rsqr2 = 1.0 - rsqr1/rsqr2 % r-squared in cludi ng fixed effects sige=results.sige*( (n obs-K)/no bs);logliktfe=-no bs/2*log(2* pi*sige)-1/(2*sige)*results.resid'*resu lts.residLMsarsem_pa nel(re

19、sults,W,ywith,xwith); % (Robust) LM tests4、空间与时间双固定模型T=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);xcon sta nt=on es(N*T,1);n obs K=size(x);model=3;ywith,xwith,mea nny, mea nn x,mea nty,mea ntx二demea n( y,x,N,T,model);results=ols(ywith,xwith);vn ames=strvcat('logcit','log p','logy&#

20、39;); % should be cha nged if x is cha nged p rt_reg(results,v names) en=on es(N,1);et=on es(T,1);in terce pt二mea n(y)-mea n( x)*results.beta;sfe=mea nn y-mea nn x*results.beta-kro n(en ,i nterce pt);tfe=mea nty-mea ntx*results.beta-kro n(et,i nterce pt);yme = y - mea n( y);en t=o nes(N*T,1);error二y

21、-kro n( tfe,e n)-kro n( et,sfe)-x*results.beta-kro n(en t,i ntercep t);rsqrl = error'*error;rsqr2 = yme'*yme;FE_rsqr2 = 1.0 - rsqr1/rsqr2 % r-squared in cludi ng fixed effectssige=results.sige*( nobs-K)/nobs);loglikstfe=-nobs/2*log(2* pi*sige)-1/(2*sige)*results.resid'*results.residLMsar

22、sem_pa nel(results,W,ywith,xwith); % (Robust) LM tests二、静态面板SAR模型1、无固定效应(No fixed effectsT=30;N=46;W=n ormw(W1); y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1);nobs K=size(x);in fo.lflag=0;info. model=0;in fo.fe=0;,'logp' , 'logy

23、9;);results=sar_ pan el_FE(y,xc on sta nt x,W,T,i nfo); vnames=strvcat( 'logcit' , 'intercept' prt_spn ew(results,v names,1)% Print out effects estimates sp at_model=0; direct_i ndirect_effects_estimates(results,W,s pat_model); pan el_effects_sar(results,v names,W);2、空间固定效应(Spatial f

24、ixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1); nobs K=size(x);in fo.lflag=0;info. model=1;in fo.fe=0;results=sar_ pan el_FE(y,x,W,T,i nfo););vnames=strvcat( 'logcit' , 'logp' , 'logy'

25、prt_spn ew(results,v names,1)% Print out effects estimates sp at_model=0;direct_i ndirect_effects_estimates(results,W,s pat_model);pan el_effects_sar(results,v names,W);3、时点固定效应(Time period fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);

26、end xcon sta nt=on es(N*T,1); nobs K=size(x);% required for exact resultsin fo.lflag=0;info. model=2;info.fe=0; % Do not print in terce pt and fixed effects; use info. fe=1 to turn on results=sar_ pan el_FE(y,x,W,T,i nfo);vn ames=strvcat('logcit'prt_spn ew(results,v names,1),'logp' ,

27、 'logy');% Print out effects estimatessp at_model=0;direct_i ndirect_effects_estimates(results,W,s pat_model);pan el_effects_sar(results,v names,W);4、双固定效应(Spatial and time period fixed effectsT=30;N=46;W=n ormw(W1); y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);e

28、ndxcon sta nt=on es(N*T,1);nobs K=size(x);in fo.lflag=0; info. model=3;% required for exact resultsin fo.fe=0;% Do not print in terce pt and fixed effects; use info. fe=1 toturn onresults=sar_ pan el_FE(y,x,W,T,i nfo);vnames=strvcat( 'logcit' , 'logp', 'logy' );prt_spn ew(res

29、ults,v names,1)% Print out effects estimatessp at_model=0;direct_ in direct_effects_estimates(results,W,s pat_model);pan el_effects_sar(results,v names,W);三、静态面板SDM模型1、无固定效应(No fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3); x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);endxcon sta

30、nt=on es(N*T,1); nobs K=size(x);in fo.lflag=0;info. model=0;in fo.fe=0;results=sar_ pan el_FE(y,xc on sta nt x wx,W,T,i nfo);vn ames=strvcat('logcit'prt_spn ew(results,v names,1),'intercept','logp', 'logy' , 'W*logp', 'W*logy');% Print out effects esti

31、matessp at_model=1;direct_i ndirect_effects_estimates(results,W,s pat_model);pan el_effects_sdm(results,v names,W);2、空间固定效应(Spatial fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);endxcon sta nt=on es(N*T,1); nobs K=size(x);in fo.lflag=0;

32、 info. model=1;% required for exact resultsin fo.fe=0;% Do not print in terce pt and fixed effects; use info. fe=1 toturn onresults=sar_ pan el_FE(y,x wx,W,T,i nfo);vnames=strvcat( 'logcit' , 'logp' , 'logy' , 'W*logp' , 'W*logy' );prt_spn ew(results,v names,1

33、)% Print out effects estimatessp at_model=1;direct_i ndirect_effects_estimates(results,W,s pat_model); pan el_effects_sdm(results,v names,W);3、时点固定效应(Time period fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);endxcon sta nt=on es(N*T,1);

34、nobs K=size(x);in fo.lflag=0;% required for exact resultsinfo. model=2;in fo.fe=0;% Do not print in terce pt and fixed effects; use info. fe=1 toturn on% New rout ines to calculate effects estimatesresults=sar_ pan el_FE(y,x wx,W,T,i nfo);vnames=strvcat( 'logcit' , 'logp', 'logy&

35、#39; , 'W*logp',W*logy'% Print out coefficie nt estimates);prt_spn ew(results,v names,1)% Print out effects estimatessp at_model=1;direct_ in direct_effects_estimates(results,W,s pat_model); pan el_effects_sdm(results,v names,W)4、双固定效应(Spatial and time period fixed effectsT=30;N=46;W=n o

36、rmw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);endxcon sta nt=on es(N*T,1);nobs K=size(x);in fo.bc=0;in fo.lflag=0;info. model=3;info.fe=0; % Do not print in terce pt and fixed effects; use info. fe=1 to% required for exact resultsturn onresults=sar_ pan el_FE(y,x

37、wx,W,T,i nfo);vnames=strvcat( 'logcit' , 'logp' , 'logy' , 'W*logp' , 'W*logy');prt_spn ew(results,v names,1)% Print out effects estimatessp at_model=1;direct_ in direct_effects_estimates(results,W,s pat_model);pan el_effects_sdm(results,v names,W)wald test sp

38、 atial lag% Wald test for sp atial Durbin model aga inst sp atial lag model bte mp=results .p arm;varcov=results.cov;Rafg=zeros(K,2*K+2);for k=1:KRafg(k,K+k)=1; end% R(1,3)=0 and R(2,4)=0;Wald_s patial_lag=(Rafg*bte mp )'* in v(Rafg*varcov*Rafg')*Rafg*bte mp pr ob_s patial_lag=1-chis_cdf (Wa

39、ld_s patial_lag, K)wald test sp atial error% Wald test sp atial Durbin model aga inst sp atial error model R=zeros(K,1);for k=1:K% k cha nged in 1, 7/12/2010R(k)=bte mp (2*K+1)*btem p(k)+btem p( K+k);% R(1)=btem p( 5)*btem p(1)+bte mp (3);% R(2)=bte mp (5)*btem p( 2)+bte mp (4); endRafg=zeros(K,2*K+

40、2);for k=1:KRafg(k,k) =bte mp (2*K+1);Rafg(k,K+k) =1;Rafg(k,2*K+1)=btem p(k);% k changed in 1,7/12/2010% Rafg(1,1)=btem p( 5);Rafg(1,3)=1;Rafg(1,5)=btem p(1);% Rafg(2,2)=btem p( 5);Rafg(2,4)=1;Rafg(2,5)=btem p(2); endWald_s patial_error=R'* in v(Rafg*varcov*Rafg')*R p rob_s patial_error=1-ch

41、is_cdf (Wald_s patial_error,K)LR test sp atial lagresultssar=sar_ pan el_FE(y,x,W,T,i nfo);LR_s patial_lag=-2*(resultssar.lik-results.lik) pr ob_s patial_lag=1-chis_cdf (LR_s patial_lag,K)LR test sp atial errorresultssem=sem _pan el_FE(y,x,W,T,i nfo);LR_s patial_error=-2*(resultssem.lik-results.lik)

42、p rob_s patial_error=1-chis_cdf (LR_s patial_error,K)5、空间随机效应与时点固定效应模型T=30;N=46;W=n ormw(W1); y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1);nobs K=size(x);ywith,xwith,mea nn y,mea nn x,mea nty,mea ntx=demea n(y,x wx,N,T,2);2=time dummies info.

43、 model=1;results=sar_ pan el_RE(ywith,xwith,W,T,i nfo); prt_spn ew(results,v names,1) sp at_model=1;direct_i ndirect_effects_estimates(results,W,s pat_model); pan el_effects_sdm(results,v names,W)wald test sp atial lagbte mp=results. parm(1:2*K+2);varcov=results.cov(1:2*K+2,1:2*K+2);Rafg=zeros(K,2*K

44、+2);for k=1:KRafg(k,K+k)=1; end% R(1,3)=0 and R(2,4)=0;Wald_s patial_lag=(Rafg*bte mp )'* in v(Rafg*varcov*Rafg')*Rafg*bte mp pr ob_s patial_lag= 1-chis_cdf (Wald_s patial_lag, K)wald test sp atial errorR=zeros(K,1);for k=1:K% k Cha nged in 1, 7/12/2010R(k)=bte mp (2*K+1)*btem p(k)+btem p( K

45、+k); % R(1)=btem p( 5)*btem p(1)+bte mp (3); % R(2)=bte mp (5)*btem p( 2)+bte mp (4);endRafg=zeros(K,2*K+2);for k=1:K% k changed in 1,7/12/2010Rafg(k,k) =bte mp (2*K+1);Rafg(k,K+k) =1;Rafg(k,2*K+1)=btem p( k);% Rafg(1,1)=btem p( 5);Rafg(1,3)=1;Rafg(1,5)=bte mp (1);% Rafg(2,2)=btem p( 5);Rafg(2,4)=1;

46、Rafg(2,5)=bte mp (2); endWald_s patial_error=R'* in v(Rafg*varcov*Rafg')*R pr ob_s patial_error= 1-chis_cdf (Wald_s patial_error,K)LR test sp atial lagresultssar=sar_ pan el_RE(ywith,xwith(:,1:K),W,T,i nfo);LR_s patial_lag=-2*(resultssar.lik-results.lik)pr ob_s patial_lag=1-chis_cdf (LR_s pa

47、tial_lag,K)LR test sp atial errorresultssem=sem _pan el_RE(ywith,xwith(:,1:K),W,T,i nfo);LR_s patial_error=-2*(resultssem.lik-results.lik)pr ob_s patial_error=1-chis_cdf (LR_s patial_error,K)四、静态面板SEM模型1、无固定效应( No fixed effectsT=30;N=46;W=n ormw(W1); y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;

48、wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1); nobs K=size(x);in fo.lflag=0;info. model=0;in fo.fe=0;results=sem_ pan el_FE(y,xc on sta nt x,W,T,i nfo);,'logy');vnames=strvcat( 'logcit' , 'intercept', 'logp' prt_spn ew(results,v names,1)% Print out effects est

49、imates sp at_model=0;direct_i ndirect_effects_estimates(results,W,s pat_model); pan el_effects_sar(results,v names,W);2、空间固定效应(Spatial fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3); x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1); nobs K=size(x);in fo.lfl

50、ag=0;info. model=1;in fo.fe=0;results=sem_ pan el_FE(y,x,W,T,i nfo););vnames=strvcat('logcit' , 'logp', 'logy' prt_spn ew(results,v names,1)% Print out effects estimates sp at_model=0;directndirect_effects_estimates(results,W,s pat_model); pan el_effects_sar(results,v names,W

51、);3、时点固定效应(Time period fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1);nobs K=size(x);in fo.lflag=0;% required for exact results info. model=2;in fo.fe=0;% Do not print in terce pt and fixed effects; use info.

52、 fe=1 to turn on results=sem_ pan el_FE(y,x,W,T,i nfo);vnames=strvcat('logcit' , 'logp' , 'logy' );prt_spn ew(results,v names,1)% Print out effects estimates sp at_model=0;direct_i ndirect_effects_estimates(results,W,s pat_model); pan el_effects_sar(results,v names,W);4、双固定效应

53、(Spatial and time period fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3); x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1);nobs K=size(x);in fo.lflag=0;% required for exact resultsinfo. model=3;in fo.fe=0;turn on% Do not print in terce pt and fixed effects;

54、use info. fe=1 to results=sem _pan el_FE(y,x,W,T,i nfo);vnames=strvcat('logcit' , 'logp', 'logy' );prt_spn ew(results,v names,1)% Print out effects estimates sp at_model=0;direct_ in direct_effects_estimates(results,W,s pat_model); pan el_effects_sar(results,v names,W);五、静态面板SDEM模型1、无固定效应(No fixed effectsT=30;N=46;W=n ormw(W1);y=A(:,3);x=A(:,4,6);for t=1:Tt1=(t-1)*N+1;t2=t*N;wx(t1:t2,:)=W*x(t1:t2,:);end xcon sta nt=on es(N*T,1); nobs K=size(x);in fo.lflag=0;info. model=0;in fo.fe=0;results=sem_ pan el_FE(y,xc on sta nt x

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论