#Read in data oil.price <- read.table("https://edoras.sdsu.edu/~babailey/stat673/oil.price.dat", header=TRUE) #oil.price <- read.table("/Users/bbailey/Desktop/Teaching/ST673/oil.price.dat", header=TRUE) oil <- ts(oil.price) par(mfrow=c(2,2)) plot(oil, main="Oil") plot(log(oil), main="Log Oil") plot(diff(oil), main="Diff Oil") plot(diff(log(oil)), main="Diff Log Oil") par(mfrow=c(3,2)) acf(oil,main='Sample ACF of the Oil Price TS') acf(log(oil), main="ACF of log Oil") acf(diff(oil), main="ACF of Diff Oil") acf(diff(log(oil)), main="ACF of Diff Log Oil") pacf(diff(oil), main="PACF of Diff Oil") pacf(diff(log(oil)), main="PACF of Diff Log Oil") #Models: ARIMA(2,1,0) or ARIMA(0,1,1)