R语言时间序列作业.docVIP

  • 50
  • 0
  • 约6.74千字
  • 约 17页
  • 2021-12-06 发布于广东
  • 举报
R语言时间序列作业 R语言时间序列作业 PAGE R语言时间序列作业 2016年第二学期时间序列分析及应用R语言课后作业 第三章 趋势 (a) data(hours);plot(hours,ylab=Monthly Hours,type=o) 画出时间序列图 (b) data(hours);plot(hours,ylab=Monthly Hours,type=l) type=o 表示每个数据点都叠加在曲线上;type=b 表示在曲线上叠加数据点,但是该数据点附近是断开的;type=l 表示只显示各数据点之间的连接线段;type=p 只想显示数据点。 points(y=hours,x=time(hours),pch=(season(hours))) (a) data(hours);=lm(hours~time(hours)+I(time(hours)^2));summary 用最小二乘法拟合二次趋势,结果显示如下: Call: lm(formula = hours ~ time(hours) + I(time(hours)^2)) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t v

文档评论(0)

1亿VIP精品文档

相关文档