Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I've got a couple of time series obtained from a small number of replicates,where many variables (all of them continuous) are measured at various time points (longitudinal study). I was looking for a statistical test that could answer whether or not the data supports any type of trend (increasing, decreasing or even oscillations), or alternatively, the actual value stays constant and what I see in my individual or average time series is due to measurement error alone. I've had a look and found the Ljung–Box test - Is is appropriate to answer what I want? If not, what do you suggest?

share|improve this question
1  
Look at ACF and PACF in the correlograms in addition to the Ljung-Box. Google what you should be looking for. This is a good way of visually seeing if there's any seasonality or serial correlation in your data. – user13253 Aug 25 '12 at 2:39
I'm already using ACF, thanks for the PACF I'll read into it and see if the is usefull. – slendermaaan Aug 25 '12 at 12:38

1 Answer

The Ljung-Box test is a test as to whether or not there are any significant autocorrelations in a single time series. If there are no correlations the conclusion is that the time series is just random noise. So it does test for randomness. But in your problem you have multiple time series that are presumably realizations of the same process.

To test for trends or seasonals you would try fit a model with trends or seasonal components (sine waves for example) and test whether or not the coefficients are significantly different from 0. But this would be done separately on the individual time series.

share|improve this answer
Indeed, they are realizations of the same process - I'm working with biological data and seasonality is not a problem here, nonlinear response - and I have a flexible model whose assumptions I trust to use later, but the coefficients are not that easy to analyze... Also, it assumes autocorrelation, so I'm just trying to avoid unleashing parameter estimation on a powerful model that will take that into account were the data actually says that's not the case – slendermaaan Aug 25 '12 at 12:51
Okay, but you ar looking at ensemble averages and I tend to think of tests like Ljung-Box being applied to individual time series and not smoothed functioned generated by taking averages across a set of time series. – Michael Chernick Aug 25 '12 at 13:27
Thanks for the insights so far Michael - Yes, I'm using it that way - The issue I'm working on now is how to do it for all the individual replicates and get a p-value for the whole replicate set. – slendermaaan Aug 25 '12 at 14:10
1  
You can apply a test like Ljung-Box on each individual series to get p-values for each case. Now these so-called raw p-values need to be adjusted because of multiple testing. There are many ways to do adjustments that can be found in books on multiple testing/simultaneous inference including resampling approaches given by Westfall and Young – Michael Chernick Aug 25 '12 at 14:23
I'm using multiple test FDR correction, but that's later, after using the model to make a variable-wise comparison between two conditions (to correct the p-val found for each independent variable). With the Ljung-Box, I'm trying to see for each independent variable, with the number of replicates that I have if it's reasonable to think the value is changing or it's just noise. I think I can do that by combining the individual replicates Ljung-Box p-values with Fisher's combined probability test to get a global p-value. Makes sense? Thanks again for the discussion – slendermaaan Aug 25 '12 at 14:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.