periodic time series

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

periodic time series

pengcafe
Hi all,

A beginner's question: I have to analyse univariate, strongly periodic data collected every hour for a period of 1 week and I need to compare 5 different groups for significant differences between them.

Is there a better way to do this in R, other than pairwise t-tests of summary statistics?

Thanks in advance,
Andy
Reply | Threaded
Open this post in threaded view
|

Re: periodic time series

Wu Gong
Hi Andy,

If you could provide a sample data set, it would help others to give a solution.

I suggest look at the data and select a model, then anova. Take group as one variable, record time (1 to 24 ) as the second variable and the week day (Monday to Friday) as the third variable. Then test the interaction between three variables at first. I hope the following code helps.

df <- data.frame(value = rnorm(24*5*5),
        group = rep(1:5,5*24),
        time = rep(1:24,each=5),
        day = rep(c("M","T","W","R","F"),each=24))

anova(lm(value ~ group*time*day,data=df),lm(value ~ group*time*day-group:time:day,data=df))


Reply | Threaded
Open this post in threaded view
|

Re: periodic time series

pengcafe
sample.xlsx

So, here are some sample data.
1st column is a label for "12 hour long" days
2nd one a time stamp
The rest are the actual measured values for 4 different groups.

What would be the best model for such periodic data?

Thanks,
Andy
Reply | Threaded
Open this post in threaded view
|

Re: periodic time series

Mike Marchywka
In reply to this post by pengcafe







----------------------------------------

> Date: Sun, 28 Nov 2010 14:48:54 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: [R] periodic time series
>
>
> Hi all,
>
> A beginner's question: I have to analyse univariate, strongly periodic data
> collected every hour for a period of 1 week and I need to compare 5
> different groups for significant differences between them.

I don't know if anyone replied but I would mention of course
that significant needs to be qualified: statistically significant
meaning a difference could be real and clinically significant
meaning something anyone cares about.  Presumably you have
some features in your data that you care about. You want
to design some tests to look at these. If you can describe
what you want to do someone here can maybe help your
definition a bit and then explain how it could be evaluated
in R or some easier approximation etc.

Periodic suggests that you expect the samples to differ at different
times, this isn't just like sampling a a bunch of points from a
box of supposedly identical widgets perhaps.

If you have a time series, there are a lot of questions you could
want to ask.



>
> Is there a better way to do this in R, other than pairwise t-tests of
> summary statistics?
>
> Thanks in advance,
> Andy
> --
> View this message in context: http://r.789695.n4.nabble.com/periodic-time-series-tp3062866p3062866.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
     
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.