当前位置:网站首页>R language CO2 dataset visualization

R language CO2 dataset visualization

2022-06-22 20:53:00 Mrrunsen

R The built-in co2 The sequence describes 1959.1~1997.12 Every month of the year CO2 content

1959.1~1997.12 Every month of the year CO2 Content trend

plot(co2)

1959.1~1997.12 Every month of the year CO2 The content trend has certain regularity , It has been increasing regularly

co2 Whether the sequence is stable ?

library(forecast)
Acf(co2)
Pacf(co2)

be based on Acf and Pacf Graph analysis :Acf There is Obvious autocorrelation ,co2 The sequence is unstable

be based on arima The model predicts

fit <- auto.arima(co2)
plot(forecast(fit, 10))

given 1949~1960 Chronological chart of year 、 Seasonal effect chart 、 Trend chart and random fluctuation term . The trend of the series is monotonic growth , There is a seasonal effect .

arima Whether the model satisfies the assumption of normality

qqnorm(fit$residuals) 
qqline(fit$residuals)

原网站

版权声明
本文为[Mrrunsen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221917182463.html