关键词不能为空

当前您在: 主页 > 英语 >

计量经济学

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-10 20:06
tags:

-

2021年2月10日发(作者:unplugged)


C5.1



1



代码:


mydata<-(


新建文件夹



伍德里奇计量经济学导论第四版数据总和


e xcel


伍德里奇



header=F, sep=


wage<-mydata[,1:4]


names (wage)<-c(


fit1<-lm(wage~educ+exper+tenu re,data=wage)


fit1


summary(fit1)


residual<-resid(fit1)


hist(residual)


结果:


Coefficients:(Intercept) educ exper tenure


-2.87273 0.59897 0.02234 0.16927


Residuals:


Min 1Q Median 3Q Max


-7.6068 -1.7747 -0.6279 1.1969 14.6536


Histogram of r esidual


F


r


e


q


u


e


n

c


y


0


5


0


1


0


0


1< /p>


5


0


2


0


0


-5


0


5


residual


10


15



2



代码:


mydata<-(


新建文件夹



伍德里奇计量经济学导论第四版数据总和


excel

< p>
伍德里奇



header=F,sep=

< p>
wage<-mydata[,1:4]


names(wage)<-c (


fit2<-lm(log(wage)~educ+exper+tenure,d ata=wage)


fit2


summary(fit2)


residual2<-resid(fit2)


hist(residual2)


结果:


Coefficients:(Intercept) educ exper tenure


0.284360 0.092029 0.004121 0.022067


Residuals:


Min 1Q Median 3Q Max


-2.05802



-0.29645



-0.03265




0.28788




1.42809


Histogram of residu al2


F


r


e


q


u


e


n


c< /p>


y


0


5


0


1


0


0


1

< p>
5


0


2


0


0


-2


-1


residual 2


0


1



(< /p>


3


)我认为对数—水平值模型更接近于满足假定

< br>MLR.6



C5.2



1


)代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


ex cel


伍德里奇



header=F,s ep=


gpa2<-mydata[,c(1,3,8)]


n ames(gpa2)<-c(


fit<-lm(colgpa~hsperc+sat ,data=gpa2)


summary(fit)


结果:



Coefficients:


(Intercept) hsperc sat


1.391757 -0.013519 0.001476


Coefficients:


Estimate Std. Error t value Pr(>|t|)


(Intercept) 1.392e+00 7.154e-02 19.45 <2e-16


hsperc -1.352e-02 5.495e-04 -24.60 <2e-16


sat 1.476e-03 6.531e-05 22.60 <2e-16



2


)代码:



gpa3<-gpa2[1:2070,]


fit1<-lm(colgpa~hsperc+sat,data=gpa3)


结果:



Coefficients:


(Intercept) hsperc sat


1.436017 -0.012749 0.001468



3



c11 =4.6 c12=0.0353 c13=0.0042


c21=4.4 c22=0.0327 c23=0.00403


所以


c1i =c2i




可认为符合(

< p>
5.10


)中的等式。




C5.3


mydata<-(


新建文 件夹



伍德里奇


计量经济学导论第四版数 据总和


excel


伍德里奇


< p>
header=F,sep=


bwght1<-mydata[,c(4, 10,7,1,5,6)]


names(bwght1)<-c(

c


bwght1$$motheduc[bwght1$$motheduc==


bwght1$$fatheduc[bwght1$$fatheduc==

bwght2<-(bwght1)


fit<-lm(bwght~cigs+p arity+faminc+motheduc+fatheduc,data=bwght2)


R<-residuals(fit)


bwght2$$R<-R


fit1<-lm(R~cigs+ parity+faminc+motheduc+fatheduc,data=bwght2)

< p>
结果显示,


motheduc


< br>fatheduc


不联合显著。





C6.2



1


)代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


ex cel


伍德里奇



header=F,s ep=


wage<-mydata[,1:3]


names( wage)<-c(


fit1<-lm(log(wage)~educ+exper+ I(exper^2),data=wage)


结果:



Coefficients:


(Intercept) educ exper I(exper^2)


0.1279975 0.0903658 0.0410089 -0.0007136


Coefficients:


Estimate Std. Error t value Pr(>|t|)


(Intercept) 0.1279975 0.1059323 1.208 0.227


educ 0.0903658 0.0074680 12.100 < 2e-16


exper 0.0410089 0.0051965 7.892 1.77e-14


I(exper^2) -0.0007136 0.0001158 -6.164 1.42e-09



2

< br>)


exper^2



1%


的显著性水平上是显著的。




3


)工作五年,每多一年,工资上升


3.387%



工作二十年,每多一年,工资上升


1.246%



4



exper



28.7


年的时候,


工作经历的增加实际上会降低预期的


log


< br>wage





样本中有


121


人具有比该取值更长的工作经 历。




C6.3

< br>(


1


)对等式右边的


educ< /p>


求导,则可得


b1+b3exper


。< /p>




2


)对立假 设为:教育的回报取决于


exper


的水平。即


b3!=0





3


)代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


ex cel


伍德里奇



header=F,s ep=


wage<-mydata[,c(1,5,6)]


n ames(wage)<-c(


fit1<-lm(log(wage)~educ+e xper+educ:exper,data=wage)


fit1


结果:



Coefficients:


Estimate Std. Error t value Pr(>|t|)


(Intercept) 5.949455 0.240826 24.704 <2e-16


educ 0.044050 0.017391 2.533 0.0115


exper -0.021496 0.019978 -1.076 0.2822


educ:exper 0.003203 0.001529 2.095 0.0365


所以在


5%


的水平下,可以拒绝原假设,即可以认为教育的回报取决于


exper



水平。




4



b1


的估计值为< /p>


0.044


,置信区间为


[0.0091 36,0.078086]





C7.1



1


)代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


ex cel


伍德里奇



header=F,s ep=


gpa<-mydata[,c(10,11,12,19,28,29)] < /p>


names(gpa)<-c(


fit<-lm(colGPA~ PC+hsGPA+ACT+mothcoll+fathcoll,data=gpa)


结果:



Coefficients:


Estimate Std. Error t value Pr(>|t|)


(Intercept) 1.255554 0.335392 3.744 0.000268


PC 0.151854 0.058716 2.586 0.010762


hsGPA 0.450220 0.094280 4.775 4.61e-06


ACT 0.007724 0.010678 0.723 0.470687


mothcoll -0.003758 0.060270 -0.062 0.950376


fathcoll 0.041800 0.061270 0.682 0.496265


拥有


PC


的估计影响有所降低,但它还是显著的(显著性水平为


5%




(< /p>


2



F=[(0.222-0.219) /2]/[(1-0.219)/135]=0.2593


所以


mothcoll



fathcoll


联合不显著,


p


值为


0.228 < /p>



3



fit< -lm(colGPA~PC+hsGPA+ACT+mothcoll+fathcoll+I(hsGPA^ 2),data=gp


a)


结果:


Estimate Std. Error t value Pr(>|t|)


I(hsGPA^2) 0.337340 0.215710 1.564 0.1202



因为


p


值大于


0.05


,所 以接受原假设,没有必要进行增添平方项的扩展。




C7.2



1


)代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


ex cel


伍德里奇



header=F,s ep=


wage<-mydata[,c(1,5,6,7,9,10,11,12)]


names(wage)<-c(


h


f it<-lm(log(wage)~educ+exper+tenure+married+black+s outh+urban,data=wa


ge)


结果:



Coefficients:


Estimate Std. Error t value Pr(>|t|)


(Intercept) 5.395497 0.113225 47.653 < 2e-16 ***


educ 0.065431 0.006250 10.468 < 2e-16 ***


exper 0.014043 0.003185 4.409 1.16e-05 ***


tenure 0.011747 0.002453 4.789 1.95e-06 ***


married 0.199417 0.039050 5.107 3.98e-07 ***


black -0.188350 0.037667 -5.000 6.84e-07 ***


south -0.090904 0.026249 -3.463 0.000558 ***


urban 0.183912 0.026958 6.822 1.62e-11 ***


b5=-0.188350


,并且是显著的,所以黑人与非黑人之间的月薪差异为


18.8%



2




fit<-lm(log(wage)~educ+exper+tenure+marri ed+black+south+urban+I(exper


^2)+I(tenur e^2),data=wage)


F=1.485 p value=0.7730


所以即便在


20%


的显著性水平上,它们也不是联合显著的。




3




fit<-lm(log(wage)~educ+exper+tenure+marri ed+black+south+urban+educ:bl


ack,data=wa ge)


Estimate Std. Error t value Pr(>|t|)


educ:black -0.022624 0.020183 -1.121 0.262603


接受原假设,即受教育的回报不取决于种族。


< p>


4


)已婚黑人和已婚飞黑人之间工资差异为


18.8%



C7.3



1



H0

< br>:


b13=0


代码:



mydata<-(


新建文件夹



伍德里奇


计量经济学导论第四版数据总和


excel


伍德里奇



header=F,sep=


mlb<-mydata[,c(1,4,31,13,32,36,38,17,34 ,18,19,21,20,23)]


names(mlb)<-c(


unsyr



fit<-lm(log(salary) ~years+gamesyr+bavg+hrunsyr+rbisyr+runsyr+fldperc+


allstar+frstbase


+scndbase+t hrdbase+shrtstop+catcher,data=mlb)


结果:




Estimate Std. Error t value Pr(>|t|)


catcher 0.2535592 0.1313128 1.931 0.05432



5%


的水平下,


接受原假设,



10%


的水平下拒绝原假设。


所以可以认为接 球手


和外场手的收入差别不大。



(< /p>


2



H0



b9=b10=b11=b12=b13


Estimate Std. Error t value Pr(>|t|)

-


-


-


-


-


-


-


-



本文更新与2021-02-10 20:06,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/631408.html

计量经济学的相关文章