计量经济学导论第四版答案中文版

发布时间 : 星期六 文章计量经济学导论第四版答案中文版更新完毕开始阅读

% 求出回归的拟合值及其取值范围 yhat=result1.yhat; std_yhat=std(yhat);

mean_yhat=mean(yhat);

yhat_qujian=[mean_yhat-2*std_yhat,mean_yhat+2*std_yhat] % yhat的取值范围是(49.1090 ,96.2665) % 求出math4的实际取值范围

math4_qujian=[min(math4),max(math4)]

% math4的实际取值范围是(0 ,100),可见拟合值的取值范围要比实际范围窄

% 求出回归残差

resid=result1.resid;

max_resid=max(resid);

row=find(resid==max_resid) school_code=data1(row,2)

% 学校类型是school_code=1141,说明该学校的实际数学考试通过率要比估计的数学考试通 % 过率高很多,也就这所学校的数学教学质量较高

% 求取解释变量数据的平方项 leoll2=leoll.^2;

lexppp2=lexppp.^2; lunch2=lunch.^2;

%在方程中加入所有解释变量的平方项进行回归

result2=ols(math4,[ones(length(math4),1),lunch,leoll,lexppp,lunch2,leoll2,lexppp2]);

vnames=char(math4,constant,lunch,leoll,lexppp,lunch2,leoll2,lexppp2);

prt(result2,vnames) % 检验联合显著性 rsqr1=result1.rsqr; rsqr2=result2.rsqr;

f=((rsqr2-rsqr1)/3)/((1-rsqr2)/(1692-6-1)) p=1-fcdf(f,3,1685) % f =0.5180 % p =0.6699

% 所以这几个解释变量的平方项是联合不显著的,所以不应该把他们放到模型中

% 求所用数据值除以其标准差 leoll_new=leoll/std(leoll);

lunch_new=lunch/std(lunch);

lexppp_new=lexppp/std(lexppp); math4_new=math4/std(math4); % 重新进行回归

result3=ols(math4_new,[ones(length(math4_new),1),lunch_new,leoll_new,lexppp_new]);

vnames=char(math4_new,constant,lunch_new,leoll_new,lexppp_new);

prt(result3,vnames) % 回归结果

% ordinary least-squares estimates % dependent variable =math4_new % r-squared= 0.3729

% rbar-squared= 0.3718 % sigma^2 = 0.6282

% durbin-watson = 1.7006 % nobs, nvars =1692, 4

% *************************************************************** % variablecoefficientt-statistic t-probability % constant4.7617594.6054440.000004

% lunch_new -0.612853 -30.6476310.000000 % leoll_new -0.114620 -5.7412650.000000 % lexppp_new 0.0347431.6801720.093109

% 由结果lunch,leoll和lexppp分别提高一倍,会使数学通过率分别变化0.613,0.115和 % 0.035个标准差,所以lunch对数学考试通过率影响最大

联系合同范文客服:xxxxx#qq.com(#替换为@)