实验报告1

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

南昌大学创新课程《基于R语言的计量经济学实验》

实验报告一

实验名称:教师外貌对其学生评教的影响(E4.2,E5.2,E6.1,E7.2,E8.2)

实验人:葛燕妮

班级:行政管理132班

学号:7101013082

一.实验目的

通过上机实验,了解基本统计思想,熟悉和使用R 语言来了解教师外貌对学生评教的影响。

二.实验原理

利用R软件估计可化为线性回归模型和非线性回归模型,并对线性回归模型的参数性约束条件进行检验

三.实验内容

3.1 R代码

E4.2library(foreign) mydata<-read.dta("TeachingRatings.dta")

Mydata head(mydata) attach(mydata)

plot(course_eval~beauty) reg<-lm(course_eval~beauty) reg result<-lm(course_eval~beauty)

summary(result)

summary(beauty)

waston<-mean(beauty)

stock<-mean(beauty)+sd(beauty)

coeff<-result$coefficients

coeff

wastonpredict<-coeff[1]+coeff[2]*waston

stockpredict<-coeff[1]+coeff[2]*stock

wastonpredict

Stockpredict E4.2 4.2

E5.2

5.2

E6.1

6.2

E7.2

7.2

E8.2

8.2

3.2 实验结果

E4.2

Course_eval=3.998+0.133*beauty wastonpredict=4 stockpredict=4.105

E5.2Course_eval=3.998+0.133*beauty

The t-statistic is 0.13/0.03 = 4.12, which has a p-value of 0.000, so the null hypothesis can be rejected at the 1% level (and thus, also at the 10% and 5% levels).

E6.2

Predicted smith course_eval =4.06829+0+0+0-0.16662=3.90167

E7.2A reasonable 95% confidence interval is 0.17±1.96 x 0.03 or 0.11 to 0.23.

E8.2Recall that the standard deviation of Beauty is 0.79. Thus Professor Smith course rating is expected to increase by 0.231 x (2 x 0.79) = 0.37. The 95% confidence interval for the increase is (0.231 ?1.96 x 0.048) x (2 x 0.79) or 0.22 to 0.51.

相关文档
最新文档