实验三.docx
- 文档编号:14247967
- 上传时间:2023-06-21
- 格式:DOCX
- 页数:21
- 大小:103.63KB
实验三.docx
《实验三.docx》由会员分享,可在线阅读,更多相关《实验三.docx(21页珍藏版)》请在冰点文库上搜索。
实验三
实验(实训)报告
项目名称多元线性回归模型
所属课程名称应用回归分析
项目类型验证性实验
实验(实训)日期11年11月12日
班级09统计1
学号
姓名
指导教师
浙江财经学院教务处制
一、实验(实训)概述:
【目的及要求】
目的:
掌握多元线性回归模型估计、检验、预测,标准化回归方程的估计,残差的性质等。
要求:
运用软件进行多元线性回归模型的相关计算,按具体的题目要求完成实验报告。
并及时上传到给定的FTP!
【基本原理】
t检验,F检验,OLS的残差的各种性质等.
【实施环境】(使用的材料、设备、软件)
STATA软件或SPSS软件
二、实验(实训)内容:
【项目内容】
多元线性回归模型估计、回归系数和回归方程检验、标准化回归方程、预测。
【方案设计】
共含2道题目,第一题为英文题目来自北大的中级计量经济学的练习,该题目设计地很好,从一元到多元,特别是一些理论上的知识通过具体的计算来加深理解和掌握.第二题为中文题目来自课本,强调对课本涉及的基础知识的掌握.
【实验(实训)过程】(步骤、记录、数据、程序等)
附后
【结论】(结果、分析)
附后
三、指导教师评语及成绩:
评语:
成绩:
指导教师签名:
批阅日期:
12年11月
实验三报告
多元线性回归模型(验证性实验)
实验类型:
验证性实验
实验目的:
掌握多元线性回归模型估计、检验、预测,标准化回归方程的估计等。
实验内容:
多元线性回归模型估计、回归系数和回归方程检验、标准化回归方程、预测。
实验要求:
运用软件进行多元线性回归模型的相关计算,按具体的题目要求完成实验报告。
并及时上传到给定的FTP!
实验题目一:
[来源于北大的中级计量经济学的相关题目。
]
Inthisexercisewestudytheeffectofsmokingduringpregnancyoninfanthealth.Onemeasureofinfanthealthisbirthweight;atoolowbirthweightputstheinfantattheriskofvariousillnesses.Thedatasetbwght.dtacontainsthedataon1388infants’birthweight,measuredinounces,andotherfactorsthatcouldaffecttheirweights.Afterreadinginthedata,usecommand"describe"toseethelabelsforallthevariables.
1.Ifwebelievethatthesinglemostimportantfactorforbirthweightisthenumberofcigarettesthemothersmokesduringpregancy,
wherebwghtmeasuresbirthweightinounces,andcigsisthenumberofcigerattessmokedperdayduringpreganancy.
(a)Findoutthemean,minimumandmaximumforbwghtandcigs.
(b)Providescatterplotsforbwght(attheyaxis)againstcigs(atthexaxis).Whatcanyouobservefromthisplot?
(c)Regressbwghtonaninterceptandcigs.Reporttheestimatedoefficientsandstandarderrorsforβ0andβ1.Whatisthesignof
β1?
Whatdoesittellus?
(d)Savetheresiduals,
fromtheaboveregression.Calculate
.Whatarethedifferencesofthesevaluesfromzero?
Regress
(1)
oncigs,and
(2)
onbwght.Reporttheestimatedcoefficientsandtherelatedtstatistics.ReportR-squaredandadjustR-squaredandcommentontheseresults.
(e)WhataretheTotalsumofsquares,explainedsumofsquares,andresidualsumofsquaresofregressingmodel
(1)?
ReporttheR-squaredanddescribehowR-squaredexplainsthefitofmodel
(1).
(f)Calculatethecorrelationcoefficientofbwghtandcigs.WhatistherelationofthisvaluewithR-squared?
(g)Showhowthestandarderrorof
iscalculated.
2.Sincefactorsotherthansmokingthataffectbirthweightarelikelytobecorrelatedwithsmoking,weshouldtakethosefactorsintoaccount.Forexample,higherincomegenerallyresultsinaccesstobetterprenatal
care,aswellasbetternutritionforthemother.Anequationthatrecognizethisis
(a)Plotfamilyincome,faminc,againstcigs,andcalculatethecorrelationcoefficientamongthesetwo.
(b)Regressfaminconcigs.Reporttheresultsinequationformwithstandarderrors,anddiscusswhatinformationdoesR-squareddeliver.
(c)Regressmodel
(2),reporttheresultsinequationform,includingthesamplesizeandtheR-squared.
Discussyourresults,focusingonwhtheraddingfamincsubstantiallychangestheestimatedeffectofcigsonbwght.
(d)Itissaidthatthereisalinearrelationbetweenthemeanofbwghtandthemeansofcigsandfaminc.Withoutanycalculationcanyoutelluswhatistheexactlinearrelationshipbetweenthesetwobasedontheregressiononmodel
(2)?
(e)Verifythat
where
isestimatedfrommodel
(1),
and
areestimatedfrommodel
(2),and
istheslopecoefficientsfromregressingfaminconcigs.
(f)Regresscigsonfaminc,andsavetheresiduals,namethemrcigs.Thenregressbwghtonrcigs.Comparetheestimatedslopecoefficientsforrcigswiththecoefficientsoncigsobtainedfrommodel
(2).Comparealsotheestimatedstandarderrors.Whatconclusionscanyoudraw?
(g)Thereisanothervariablecalledpacks.Itmeasuresthenumberofpacksofcigerattessmokedduringpregnancy.Nowregressbwghttocigs,faminc,andpacks.Canyougetestimatedcoefficientsforthismodel?
Whynot?
3.Itissuspectedthatfamilyincomemayhavenonlineareffectonthebirthweightofthebabies.Inparticular,onemaythinkfitthefollowingmodel
Denotethefittedmodelas
(a)PerformOLSregressiontogettheestimatedcoefficients
(b)Statethenullhypothesisthatonlylinearwealtheffectmatters,andalsowriteoutthealternativehypothesisforatwo-sidedtest.Reportthetstatisticsat5%significancelevel,willwerejectthenull
inthiscase.
(c)ReportthepvalueforH0:
.Whatdoespvalueexactlytellus?
(d)IfweareinterestedintestingH0:
performthistestusing5%significancelevel.Canwerejectthenullthatcigarettesmokingduringpreganancyhasnopartialeffectonbirthweight?
(e)Reportthe5%confidenceintervalforH0:
.
(f)Testthehypothesisthat
.
实验题目二:
研究货运总量y(万吨)与工业总产量x1(亿元),农业总产值x2(亿元),居民非商品支出x3(亿元)的关系。
数据如表:
1.计算y,x1,x2,x3的相关系数矩阵;
2.求y关于x1,x2,x3的三元线性回归方程;
3.对所求得的方程作拟合度检验
4.对每个回归系数作显著性检验;
5.对回归方程作显著性检验;
6.如果有的回归系数没有通过显著性检验,将其剔除,重新建立回归方程,再作回归方程的显著性检验和回归系数的显著性检验;
7.求出新回归方程的每一个回归系数的置信水平为95%的置信区间;
8.求新回归方程的标准化回归方程;
9.求当x1=75,x2=42时的y的预测值,给定99%的置信水平,计算其置信区间?
数据如下:
yx1x2x3
16070351.0
26075402.4
21065402.0
26574423.0
24072381.2
22068451.5
27578424.0
16066362.0
27570443.2
25065423.0
[题目来源于何晓群<<应用回归分析>>第3章习题3.11]
实验题目一分析报告:
1:
(a)
.subwght
Variable|ObsMeanStd.Dev.MinMax
-------------+--------------------------------------------------------
bwght|1388118.699620.3539623271
.sucigs
Variable|ObsMeanStd.Dev.MinMax
-------------+--------------------------------------------------------
cigs|13882.0871765.972688050
(b)
(c)
.regbwghtcigs
Source|SSdfMSNumberofobs=1388
-------------+------------------------------F(1,1386)=32.24
Model|13060.4194113060.4194Prob>F=0.0000
Residual|561551.31386405.159668R-squared=0.0227
-------------+------------------------------AdjR-squared=0.0220
Total|574611.721387414.283864RootMSE=20.129
------------------------------------------------------------------------------
bwght|Coef.Std.Err.tP>|t|[95%Conf.Interval]
-------------+----------------------------------------------------------------
cigs|-.5137721.0904909-5.680.000-.6912861-.3362581
_cons|119.7719.5723407209.270.000118.6492120.8946
均方误为0.572和0.0904sig=0.000,所以回归方程显著
(d)
=0
=0,
=0
Source|SSdfMSNumberofobs=1388
-------------+------------------------------F(1,1386)=32.24
Model|13060.4194113060.4194Prob>F=0.0000
Residual|561551.31386405.159668R-squared=0.0227
-------------+------------------------------AdjR-squared=0.0220
Total|574611.721387414.283864RootMSE=20.129
(e)
sst=574611.72ssr=561551.3sse=13060.4194r2=0.0227,所以不能很好的解释吸烟量与孩子体重的关系,解释平方和只占了2.27%。
(f)
.corrbwghtcigs
(obs=1388)
|bwghtcigs
-------------+------------------
bwght|1.0000
cigs|-0.15081.0000
相关系数为-0.1508
(g)
的标准误=-0.513772/-5.68=0.0905
2:
(a)
|bwghtfaminccigs
-------------+---------------------------
bwght|1.0000
faminc|0.10891.0000
cigs|-0.1508-0.17301.0000
(b)
Source|SSdfMSNumberofobs=1388
-------------+------------------------------F(1,1386)=42.78
Model|14584.7911114584.7911Prob>F=0.0000
Residual|472475.2231386340.891214R-squared=0.0299
-------------+------------------------------AdjR-squared=0.0292
Total|487060.0141387351.160789RootMSE=18.463
------------------------------------------------------------------------------
faminc|Coef.Std.Err.tP>|t|[95%Conf.Interval]
-------------+----------------------------------------------------------------
cigs|-.5429278.0830042-6.540.000-.7057551-.3801004
_cons|30.15984.52498857.450.00029.1299931.1897
R2=0.0299,解释平方和只占2.99%,不能很好地解释吸烟与家庭收入的关系
(c)
Source|SSdfMSNumberofobs=1388
-------------+------------------------------F(2,1385)=21.27
Model|17126.208828563.10442Prob>F=0.0000
Residual|557485.5111385402.516614R-squared=0.0298
-------------+------------------------------AdjR-squared=0.0284
Total|574611.721387414.283864RootMSE=20.063
------------------------------------------------------------------------------
bwght|Coef.Std.Err.tP>|t|[95%Conf.Interval]
-------------+----------------------------------------------------------------
faminc|.0927647.02918793.180.002.0355075.1500219
cigs|-.4634075.0915768-5.060.000-.6430518-.2837633
_cons|116.97411.048984111.510.000114.9164119.0319
R2=0.0298,家庭收入与孩子的体重正相关,吸烟与孩子的体重负相关,且解释平方和只占2.98%
(d)
(e)
=-0.514,
=0.0928,
=-0.4634,
=-0.543,所以有
(f)
系数a
模型
非标准化系数
标准系数
t
Sig.
B
标准误差
试用版
1
(常量)
118.700
.542
219.164
.000
UnstandardizedResidual
-.463
.092
-.134
-5.031
.000
a.因变量:
bwght
系数标准为与
(2)中的斜率相等
(g)
Source|SSdfMSNumberofobs=1388
-------------+------------------------------F(1,1386)=32.24
Model|13060.4194113060.4194Prob>F=0.0000
Residual|561551.31386405.159668R-squared=0.0227
-------------+------------------------------AdjR-squared=0.0220
Total|574611.721387414.283864RootMSE=20.129
------------------------------------------------------------------------------
bwght|Coef.Std.Err.tP>|t|[95%Conf.Interval]
-------------+----------------------------------------------------------------
cigs|-.5137721.0904909-5.680.000-.6912861-.3362581
packs|(dropped)
_cons|119.7719.5723407209.270.000118.6492120.8946
--------------------------------------------------------
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 实验