[R] Testing for differences in amplitude and phase

From: Karin L <karin_l_at_live.at>
Date: Wed, 09 Jun 2010 12:19:00 +0200

Dear
R-helpers,  

I have time
series data from 16 subjects and 2 treatment groups. The seasonal variation can be best described by two harmonics, I called the frequencies omega and omega2.  

I now want
to test whether (1) the seasonal pattern differs between the treatments (some kind of overall test). If this is the case, (2) I want to conduct tests to find out whether the amplitude of the fist harmonic, the amplitude of the second harmonic, the phase of the first harmonic and the phase of the second harmonic differs between the treatment groups.  

My attempt
was to create a lme containing the two oscillations and the treatment group:  

omegaDay=omega*Day                 # there is probably a more
elegant solution

omega2Day=omega2*Day  

m=lme(y~(cos(omegaDay)+sin(omegaDay)+cos(omega2Day)+sin(omega2Day))*treatment, random=~1|subject)

summary(m)    

The summary
table tells me that the respective elements are significant (except for cos(omegaDay):treatmentTRUE). I know how to calculate the amplitudes and phases for both treatment groups from the model estimates, but how do I know if they are significantly different?    

Thanks to
anyone who takes the time to help me with this problem!

Karin                                                  



Hotmail: Vertrauenswrdige E-Mails dank leistungsstarkem SPAM-Schutz. https://signup.live.com/signup.aspx?id=60969

        [[alternative HTML version deleted]]



R-help_at_r-project.org 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. Received on Wed 09 Jun 2010 - 12:03:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 12:10:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive