Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I'm trying to look for difference in timing (ie. earlier/later) in a variable measured at regular intervals between two groups.

This seems like a simple experimental design, and working in R, I'm able to visualize the data in a way that makes sense to me, but somehow I'm getting confused when it comes to testing for significance.

The data consist of weekly measurements of number of flowers for each individual, within and outside of the greenhouse. To take a small example:




If my interest is simply to determine whether there's a significant difference in the time of flowering between the treatments; should I be doing a repeated measures ANOVA and looking at the interaction?

Simplifying (?) the problem even further, what if I remove the quantity of flowers, and just consider how many individuals are flowering? So the summarized data would be

ddply(df, .(treatment,week), function(d) length(d[d$flowers>0,"flowers"]))->indiv

Which looks like this:


Here, my first thought was that I can just think of these as two distributions, and compare with a t-test; however, only individuals and not individualsxweek are independent, so perhaps this should also be a repeated measures ANOVA? Or do I need to venture into the world of more complex time-series math?

Thanks for your help!

Edit As an update, I'm now also considering failure-time / survival analysis as a possible appropriate method.

share|improve this question

1 Answer 1

My answer to Tools to detect jumps in a linear time series could be of interest as it lays out strategies for testing the hypothesis of a constant mean when faced with two time series.What you are proposing is called Intervention Modelling where you know a priori when the series may have shifted and you want to test the hypothesis.Piggyback series2 behind series1: identify the ARIMA model within each series;Estimate a combined causal (0,0,.0,1,1.1) & the ARIMA structure.The test for the hypothesis isthe test for the 0/1 causal series. –

share|improve this answer

Your Answer


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.