I'm doing some modeling of time series data recorded from a accelerometer at rest for several hours. I have the following empirical autocorrelation plot: http://imageshack.dk/imagesfree/msi02421.png
I get a pretty good fit by taking the first derivative of the series and fitting a MA(2) model, a ARIMA(0,1,2) model. My question is: Can you see directly from the autocorrelation plot that this is an appropriate model?
> I'm doing some modeling of time series data recorded from a > accelerometer at rest for several hours. > I have the following empirical autocorrelation plot: > http://imageshack.dk/imagesfree/msi02421.png
> I get a pretty good fit by taking the first derivative of the series > and fitting a MA(2) model, a ARIMA(0,1,2) model. > My question is: Can you see directly from the autocorrelation plot > that this is an appropriate model?
> Thanks in advance.
No. Suggest you do both: (i) ACF plot of first differences (ii) ACF plot of residuals from a smooothed trend line. Also, plot series against time, with smoothed trend lines and a fitted linear trend and use this to help judge and appropriate model.
On Nov 2, 5:03 pm, "Edward Jensen" <edw...@jensen.invalid> wrote:
> Hi.
> I'm doing some modeling of time series data recorded from a accelerometer at > rest for several hours. > I have the following empirical autocorrelation plot:http://imageshack.dk/imagesfree/msi02421.png
> I get a pretty good fit by taking the first derivative of the series and > fitting a MA(2) model, a ARIMA(0,1,2) model. > My question is: Can you see directly from the autocorrelation plot that this > is an appropriate model?
> Thanks in advance.
Just out of curiosity,
1. What is the sample mean (average) of the undifferenced data?
2. If the sample mean is not nearly zero, did you forget to subtract it in calculating autocorrelation and/or model parameters?
3. After subtracting the sample mean, what do you get by LS fit of AR (1) model, Xk = a1*Xk-1 + Ek, to undifferenced data? If |a1| < 1, you probably shouldn't take difference the data.
>> I'm doing some modeling of time series data recorded from a accelerometer >> at >> rest for several hours. >> I have the following empirical autocorrelation >> plot:http://imageshack.dk/imagesfree/msi02421.png
>> I get a pretty good fit by taking the first derivative of the series and >> fitting a MA(2) model, a ARIMA(0,1,2) model. >> My question is: Can you see directly from the autocorrelation plot that >> this >> is an appropriate model? >Just out of curiosity, >1. What is the sample mean (average) of the undifferenced data?
mean(accelX) [1] -190.7404
>2. If the sample mean is not nearly zero, did you forget to subtract >it in calculating autocorrelation and/or model parameters?
No.
>3. After subtracting the sample mean, what do you get by LS fit of AR >(1) model, Xk = a1*Xk-1 + Ek, to undifferenced data? If |a1| < 1, you >probably shouldn't take difference the data.
Based on the autocorrelation plot of the original time series, what made you think that AR(1) was a good model?
I have read the chapter from Box and Jenkins about model identification. Their approach is to first study the autocorrelation of the zeroth, first and second order differenced time series. Based on where the correlations and partial correlations become zero (or close to) they select an ARMA model. In my time series the ACF of first order differenced data only show a significant correlation at lag 1. That's why I tried to model the differenced data.
>>> I'm doing some modeling of time series data recorded from a >>> accelerometer at >>> rest for several hours. >>> I have the following empirical autocorrelation >>> plot:http://imageshack.dk/imagesfree/msi02421.png
>>> I get a pretty good fit by taking the first derivative of the series and >>> fitting a MA(2) model, a ARIMA(0,1,2) model. >>> My question is: Can you see directly from the autocorrelation plot that >>> this >>> is an appropriate model?
>>Just out of curiosity,
>>1. What is the sample mean (average) of the undifferenced data?
> mean(accelX) > [1] -190.7404
>>2. If the sample mean is not nearly zero, did you forget to subtract >>it in calculating autocorrelation and/or model parameters?
> No.
>>3. After subtracting the sample mean, what do you get by LS fit of AR >>(1) model, Xk = a1*Xk-1 + Ek, to undifferenced data? If |a1| < 1, you >>probably shouldn't take difference the data.
> I get a1 = 0.0752 > Here a plot of the autocorrelation of the residuals from the AR(1) model: > http://imageshack.dk/imagesfree/0ZN50110.png > Would you say this is good fit?
> Based on the autocorrelation plot of the original time series, what made > you think that AR(1) was a good model?
> I have read the chapter from Box and Jenkins about model identification. > Their approach is to first study the autocorrelation of the zeroth, first > and second order differenced time series. Based on where the correlations > and partial correlations become zero (or close to) they select an ARMA > model. In my time series the ACF of first order differenced data only show > a significant correlation at lag 1. That's why I tried to model the > differenced data.
I should also be noted that I have tried fitted AR models of increasing order but based on AIC, the best model is about p = 190. By including a MA term, I can get decent fits with just a couple of terms.
> >> I'm doing some modeling of time series data recorded from a accelerometer > >> at > >> rest for several hours. > >> I have the following empirical autocorrelation > >> plot:http://imageshack.dk/imagesfree/msi02421.png
> >> I get a pretty good fit by taking the first derivative of the series and > >> fitting a MA(2) model, a ARIMA(0,1,2) model. > >> My question is: Can you see directly from the autocorrelation plot that > >> this > >> is an appropriate model? > >Just out of curiosity, > >1. What is the sample mean (average) of the undifferenced data?
> mean(accelX) > [1] -190.7404
> >2. If the sample mean is not nearly zero, did you forget to subtract > >it in calculating autocorrelation and/or model parameters?
> No.
> >3. After subtracting the sample mean, what do you get by LS fit of AR > >(1) model, Xk = a1*Xk-1 + Ek, to undifferenced data? If |a1| < 1, you > >probably shouldn't take difference the data.
> Based on the autocorrelation plot of the original time series, what made you > think that AR(1) was a good model?
> I have read the chapter from Box and Jenkins about model identification. > Their approach is to first study the autocorrelation of the zeroth, first > and second order differenced time series. Based on where the correlations > and partial correlations become zero (or close to) they select an ARMA > model. In my time series the ACF of first order differenced data only show a > significant correlation at lag 1. That's why I tried to model the > differenced data.
> Best regards, > Andreas
I can't be more specific because I haven't been active in time series analysis for 20 years, but this is what I think I remember:
A little known important fact that is missing from many textbooks is that Least Squares (LS) is a consistent estimator of both stable and UNSTABLE AR processes, i.e., with poles inside, on, or outside the unit circle. For example, if your data is a random walk,
Xk = Xk-1 + Ek,
then Least Squares will give an estimate a1 ~= 1. With your LS estimate, a1 = 0.0752, your time series is not close to a random walk therefore you should not difference the data after subtracting the mean. This does not imply that an AR(1) model is best, it implies that, after subtracting the mean, you should use an ARMA rather than an ARIMA model.