I have been given data to forecast however it has a negative figure within the data which then, when doing a log transformation to make the series stationary, the ARIMA script i have written won't work. datan<-c(144627.7451,575166.2487,854245.7137,1230639.153,1160052.421,479928.7072,-261427.4238,1181746.229,168251.621,556741.5149,1840484.518,1704679.404,1878380.278,1865288.502,1849340.253,1965974.112,2093192.242,1912399.391,2633179.421,2134618.008,2070856.492,1238565.331) freqdata<-4 startdata<-c(9,2) horiz<-4 datats<-ts(datan,frequency=freqdata,start=startdata) force.log<-"log" datadates<-as.character(c("9q2","9q3","9q4","10q1","10q2","10q3","10q4","11q1","11q2","11q3","11q4","12q1","12q2","12q3","12q4","13q1","13q2","13q3","13q4","14q1","14q2","14q3")) dataMAT<-matrix(0,ncol=freqdata,nrow=(length(datats)+freqdata),byrow=TRUE) for (i in 1:freqdata) {dataMAT[,i]<-c(rep(0,length=i-1),lag(datats,k=-i+1),rep(0,length=freqdata-i+1))} dataind<-dataMAT[c(-1:(-freqdata+1),-(length(dataMAT[,1])-freqdata+1):-(length(dataMAT[,1]))),] dataind2<-data.frame(dataind) lm1<-lm(X1~.,data=dataind2) lm2<-lm(X1~X2+dataind2[,length(dataind2[1,])],data=dataind2) library(lmtest) library(car) … Read more