> install.packages("TSA")
also installing the dependencies ‘leaps’, ‘locfit’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/leaps_3.0.zip'
Content type 'application/zip' length 360693 bytes (352 KB)
downloaded 352 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/locfit_1.5-9.1.zip'
Content type 'application/zip' length 682433 bytes (666 KB)
downloaded 666 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/TSA_1.2.zip'
Content type 'application/zip' length 532246 bytes (519 KB)
downloaded 519 KB
package ‘leaps’ successfully unpacked and MD5 sums checked
package ‘locfit’ successfully unpacked and MD5 sums checked
package ‘TSA’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\lenovo\AppData\Local\Temp\RtmpInCBSD\downloaded_packages
> library(TSA)
载入程辑包:‘TSA’
The following objects are masked from ‘package:stats’:
acf, arima
The following object is masked from ‘package:utils’:
tar
>
> setwd("C:/Users/lenovo/Documents/R workspace")
> Data=read.csv("./arima_data.csv",header = T)[,2]
> sales=ts(Data)
> plot.ts(sales,xlab="时间",ylab="销量/元")
> difsales=diff(sales)
> res=armasubsets(y=difsales,nar=5,nma=5,y.name = 'test',ar.method = 'ols')
> plot(res)
TSA
最新推荐文章于 2024-03-07 21:04:55 发布