Lampiran Syntax R Sarima
Lampiran Syntax R Sarima
Lampiran Syntax R Sarima
#=====================================
mydata<- read.csv("data inflasi2.csv")
myts<- ts(mydata, start=c(2008, 1), end=c(2014, 12), frequency=12)
myts
plot.ts(myts)
myts2<- ts(mydata, start=c(2008, 1), end=c(2013, 12), frequency=12)
myts2
#SARIMA (1,0,1)(1,0,1)6
#-----------------------#
dog <- sarima(myts2,1,0,1,1,0,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (1,0,1)(0,1,1)6
#-----------------------#
dog <- sarima(myts2,1,0,1,0,1,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (2,0,1)(0,0,1)6
#-----------------------#
dog <- sarima(myts2,2,0,1,0,0,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (2,0,1)(1,0,1)6
#-----------------------#
dog <- sarima(myts2,2,0,1,1,0,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (2,0,1)(0,1,1)6
#-----------------------#
dog <- sarima(myts2,2,0,1,0,1,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (1,0,0)(0,0,1)6
#-----------------------#
dog <- sarima(myts2,1,0,0,0,0,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (1,0,0)(1,0,1)6
#-----------------------#
dog <- sarima(myts2,1,0,0,1,0,1,6)
summary(dog$fit) # fit has all the returned arima() values
plot(resid(dog$fit)) # plot the innovations (residuals)
#SARIMA (1,0,0)(0,1,1)6
#-----------------------#
dog <- sarima(myts2,1,0,0,0,1,1,6)
summary(dog$fit) # fit has all the returned arima() values