




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
R语言代码试题答案步骤R语言代码试题答案步骤R语言代码试题答案步骤R语言代码试题答案步骤编制仅供参考审核批准生效日期地址:电话:传真:邮编:Rversion(2017-11-30)--"Kite-EatingTree"Copyright(C)2017TheRFoundationforStatisticalComputingPlatform:x86_64-w64-mingw32/x64(64-bit)R是自由软件,不带任何担保。在某些条件下你可以将其自由散布。用'license()'或'licence()'来看散布的详细条件。R是个合作计划,有许多人为之做出了贡献.用'contributors()'来看合作者的详细情况用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或用'()'通过HTML浏览器来看帮助文件。用'q()'退出R.[原来保存的工作空间已还原]>h=("",header=true)Errorin(file=file,header=header,sep=sep,quote=quote,:找不到对象'true'>h=("",header=TRUE)>h地区x1x2x3x4x5x6x7x8x9y1北京753526391971165836968474287475240462天津734418811854155622546151493173200243河北421115421502104712043865836584125314山西38561529143990615064423633628122125内蒙古546327301584135419724655763886177176辽宁580920421433131018444185856649165947吉林463520451594144816433840743415146148黑龙江468718071337118112173640635711129849上海9656211117901017372478673853732625310江苏6658191614371058307850639683471882511浙江7552211015521228299750197633742154512安徽5815154113971143193344601287921501213福建731716341754773210544525527631859314江西507214771174671148738512288001277615山东5201219715721005165641904517681577816河南4607188611911085152537338314991373317湖北5838178313711030165239846385721449618湖南544216251302918173838971334801460919广东8258152121001048295450278540952239620广西555311461377884162636386279521424421海南65568651521993132039485323771445722重庆6870222911771102147144498389141657323四川607416511284773158742339296081505024贵州499313991014655139641156197101258625云南54681760974939143437629221951388426西藏5518136284546755051705229361118427陕西5551178913221212207943073385641533328甘肃4602163112881050138837679219781284729青海466715121232906109746483331811234630宁夏4769187611931063151647436363941406731新疆52392031116710281281445763379613892>lm=lm(y~x1+x2+x3+x4+x5+x6+x7+x8+x9,data=h)>lmCall:lm(formula=y~x1+x2+x3+x4+x5+x6+x7+x8+x9,data=h)Coefficients:(Intercept)x1x2x3x4x5x6x7x8x9>summary(lm)Call:lm(formula=y~x1+x2+x3+x4+x5+x6+x7+x8+x9,data=h)Residuals:Min1QMedian3QMaxCoefficients:EstimateStd.ErrortvaluePr(>|t|)(Intercept)+02+03x1+00***x2+00***x3+00***x4x5+00***x6x7x8+01+01x9+01+02---Signif.codes:0‘***’‘**’‘*’‘.’‘’1Residualstandarderror:on21degreesoffreedomMultipleR-squared:,AdjustedR-squared:F-statistic:on9and21DF,p-value:<>pre=(lm)>res=residuals(lm)>sd(res)[1]>res=residuals(lm)>dy=step(lm)Start:AIC=y~x1+x2+x3+x4+x5+x6+x7+x8+x9DfSumofSqRSSAIC-x41213184326-x91171493201454-x71177003202005-x81542953238599-x61895863273891<none>3184305-x3126625935846898-x2145610567745361-x519377500-x11Step:AIC=y~x1+x2+x3+x5+x6+x7+x8+x9DfSumofSqRSSAIC-x91174283201754-x71185633202889-x81544373238763-x61918133276139<none>3184326-x3129361306120456-x2154679418652267-x519393345-x11Step:AIC=y~x1+x2+x3+x5+x6+x7+x8DfSumofSqRSSAIC-x71346343236387-x61748003276554-x81821503283904<none>3201754-x3130553536257107-x2157258368927590-x519382624-x11Step:AIC=y~x1+x2+x3+x5+x6+x8DfSumofSqRSSAIC-x81708133307201-x611527773389165<none>3236387-x3155012848737672-x218895049-x519458098-x11Step:AIC=y~x1+x2+x3+x5+x6DfSumofSqRSSAIC-x611375403444741<none>3307201-x3157710639078264-x218871193-x519473521-x11Step:AIC=y~x1+x2+x3+x5DfSumofSqRSSAIC<none>3444741-x3157178839162624-x21-x51-x11>summary(dy)Call:lm(formula=y~x1+x2+x3+x5,data=h)Residuals:Min1QMedian3QMaxCoefficients:EstimateStd.ErrortvaluePr(>|t|)(Intercept)**x1***x2***x3***x5***---Signif.codes:0‘***’‘**’‘*’‘.’‘’1Residualstandarderror:364on26degreesoffreedomMultipleR-squared:,AdjustedR-squared:F-statistic:on4and26DF,p-value:<>newdata=(x1=5200,x2=2000,x3=1100,x4=1000,x5=1300,x6=45000,x7=34000,x8=,x9=>predict(dy,newdata,interval="confidence")fitlwrupr1>>h=ts("",header=TRUE))>hTimeSeries:Start=1End=56Frequency=1X78[1,]-58[2,]53[3,]-63[4,]13[5,]-6[6,]-16[7,]-14[8,]3[9,]-74[10,]89[11,]-48[12,]-14[13,]32[14,]56[15,]-86[16,]-66[17,]50[18,]26[19,]59[20,]-47[21,]-83[22,]2[23,]-1[24,]124[25,]-106[26,]113[27,]-76[28,]-47[29,]-32[30,]39[31,]-30[32,]6[33,]-73[34,]18[35,]2[36,]-24[37,]23[38,]-38[39,]91[40,]-56[41,]-58[42,]1[43,]14[44,]-4[45,]77[46,]-127[47,]97[48,]10[49,]-28[50,]-17[51,]23[52,]-2[53,]48[54,]-131[55,]65[56,]-17>plot(h,type="o")>local({pkg<-(sort(.packages=TRUE)),graphics=TRUE)+if(nchar(pkg))library(pkg,=TRUE)})Warningmessage:程辑包‘urca’是用R版本来建造的>adf=(h),type=c("drift"),selectlags=c("AIC"))>summary(adf)################################################AugmentedDickey-FullerTestUnitRootTest################################################TestregressiondriftCall:lm(formula=~+1+Min1QMedian3QMaxCoefficients:EstimateStd.ErrortvaluePr(>|t|)(Intercept)***---Signif.codes:0‘***’‘**’‘*’‘.’‘’1Residualstandarderror:on51degreesoffreedomMultipleR-squared:,AdjustedR-squared:F-statistic:on2and51DF,p-value:<Valueoftest-statisticis:Criticalvaluesforteststatistics:1pct5pct10pcttau2phi1>acf(h)>pacf(h)>ar=sarima(h,1,0,4,details=F)>ar$fitCall:stats::arima(x=xdata,order=c(p,d,q),seasonal=list(order=c(P,D,Q),period=S),xreg=xmean,=FALSE,=list(trace=trc,REPORT=1,reltol=tol))Coefficients:ar1ma1ma2ma3ma4xmean.sigma^2estimatedas1850:loglikelihood=,aic=$degrees_of_freedom[1]50$ttableEstimateSEar1ma1ma2ma3ma4xmean$AIC[1]$AICc[1]$BIC[1]>ma=sarima(h,0,1,1,details=F)>ma$fitCall:stats::arima(x=xdata,order=c(p,d,q),seasonal=list(order=c(P,D,Q),period=S),xreg=constant,=list(trace=trc,REPORT=1,reltol=tol))Coefficients:ma1constant.sigma^2estimatedas3412:loglikelihood=,aic=$degrees_of_freedom[1]53$ttableEstimateSEma1constant$AIC[1]$AICc[1]$BIC[1]>arma=sarima(h,1,1,1,details=F)>arma$fitCall:stats::arima(x=xdata,order=c(p,d,q),seasonal=list(order=c(P,D,Q),period=S),xreg
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 乡村儿童之家合同范本
- 教育教学改革课题申报书
- 合作开洗车店合同范本
- 农村购买门面合同范本
- 厂房建筑加固工程合同范本
- 书法育人课题申报书
- 厂房建设各类合同范本
- 中价出租合同范例
- 双向投资合同范本
- 友宝采购合同范本
- 《红岩》中考试题(截至2024年)
- 2025年合肥职业技术学院单招职业适应性测试题库完整版
- 2025年湖南城建职业技术学院单招职业技能测试题库新版
- 2025年全国幼儿园教师资格证考试教育理论知识押题试题库及答案(共九套)
- 人教版(2024)六年级全一册 第16课 智能种植初探秘
- 新能源发电技术 课件 第一章-新能源发电概述
- 中医医疗技术手册2013普及版
- 中考数学第二轮复习教案
- 易经(拼音版)
- 工业锅炉水处理系统调试报告
- (砌筑工)砌筑工安全教育考试试题含答案
评论
0/150
提交评论