Time Series


TS Contributor
Hi guys,

I need some advice, I got a data file to analyze for someone, and it appeared to be a time series data, I ain't very experienced with time series models.

My dependent variable is continuous (we'll call it Y). It was measured once a month, 12 months a year, for a few years. My first case is in the beginning of 1998, and the last one is the end of 2009. For every case I know at which month and year it was measured.
I have independent variables. They are all continuous, I have 7 of them.

If it wasn't a time series, a linear regression model would have been a good choice to start with. Since it's a time series, there is the problem of correlation between the cases. Maybe also a problem of seasonality. What should I check, which time series model should be used ? If there is a need to define ACF, how do I know which one is suitable ?
One more thing, if I create a categorical variable, of the "season" (spring, summer,...), can I use it to control the seasonality in the data ?
You can use data such as An = Xn - Xn-1 (one order) or maybe An = Xn - Xn-2 (two order) , An = Xn - Xn-3 (three order) ...... to eliminate correlation between independent variables by checking residual of your model.

next question i am not sure.


TS Contributor
thank you for your replies !
I have created 2 datasets, because 2 of the variables were based on a quartile measure, the rest on monthly ones. so the options are either to drop the 2 vars that don't match or to move everything to quartile.
I created graphs of the time series in both cases, I am attaching them here.

Can you have a look at them and tell me what they mean ?
I understand that there is seasonality, it's obvious, so I will create a categorical var of season. Is there anything else needs to be done so I can build a regression model of Y~X's ?

the first 3 pictures are of the monthly dataset, the other 2 are of the quartile ones.

any tip will be appreciated ! thanks !! :)
Last edited:


TS Contributor
I checked the correlation between Y and it's lag(1). I got a correlation for the monthly dataset and no correlation for the quartile dataset.

is it possible that the correlation between Xn and Xn-1 is due to the seasonal influence ?
will it be enough to add a seasonal variable and a "lag(1)" variable to my independent variable list ?


TS Contributor
thanks a lot for your tips. two tiny questions:

1. when you say "correct autocorrelation", you mean by adding the lag(1) or lag(2) as variables ?

2. do you know how to perform stationary test with SAS/SPSS/R ?

thanks !