I was wondering if anyone has any experience with creating ARIMA models. As I understand it, the main underlying assumption of an ARIMA model is stationarity, which can be tested using the KPSS test.

The steps that I used for creating my ARIMA model are:

Uploading the data into R (data.dat) using the code

data.dat <- read.csv("data.csv")

Viewing the format of the data (shown below)
Date, Discharge
2010-05-01, 0.941
2010-05-02, 0.528
2010-05-03, 0.422
2010-05-04, 0.366
2010-05-05, 1.381

Creating an object named "disch" using the code

disch <- data.dat$Discharge

Converting the data into a time series object using the code

disch.ts <- ts(disch)

Seasonally adjusting the time series data using the code:

dischComp <- decompose(disch.ts) # decomposes the time series
dischSeasAdj <- disch - dischComp$seasonal # removes the seasonal component

Using the seasonally adjusted data to create a time series object using the code:

dischSeasAdj.ts <- ts(dischSeasAdj.ts) # puts the data in time series format

Smoothing the time series data using the code:

dischSMA40 <- SMA(dischSeasAdj.ts, n = 40)

Using the smoothed time series and ensuring that it is properly defined as a time series object using the code:

dischSMA40.ts <- ts(dischSMA40)

I now want to use the dischSMA40.ts object to create an ARIMA model. I know that one of the assumptions required for an ARIMA model is stationarity, which can be tested using the KPSS test. However, I am unsure if I complete the KPSS test on the original time series (i.e., disch.ts), the seasonally adjusted time series (i.e., dischSeasAdj.ts), or on the smoothed moving average of the time series (i.e., dischSMA40.ts). Can anyone provide any advice as to where in the process I am to apply the KPSS test? TIA

Ok, thank you. Just to clarify, if my original data (i.e., disch.ts) is stationary, than it won't matter for my analysis if the seasonally adjusted (i.e., dischSeasAdj.ts) or smoothed moving average (i.e., dischSMA40.ts) are non-stationary?

If you make those adjustments to a stationary series and it becomes nonstationary then something is very weird. But in the end, you don't want to estimate an ARMA model on a nonstationary series however it got there.

Thanks. I agree that I don't think that I would want to estimate an ARIMA model on a nonstationary time series. I just cannot figure out why it is becoming non-stationary.

Hi startz, I saw a fellow Ph.D. student at my university this afternoon and told him that I was having issues with making adjustments to a stationary series and having it become non-stationary. He suggested using the set.seed() function to define the start date of my time series. As soon as I did this, everything remained stationary. Thanks for you help this afternoon.