[R] Treatment-response analysis along time

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed Aug 10 11:15:58 CEST 2005


"Felix Royo" <z319112 at hotmail.com> writes:

> Dear R people,
> I wonder if you could give me a hand with some of my data. I have a very 
> typical analysis in biology, however it is difficult for me to find the 
> right way to analyse. I had a group of animals, I gave them a treatment, and 
> I measure a variable along time -one´s per day- along 5 days,for 
> example(fake data):
> Animals Time1 Time2 Time3 Time4
> 1            1         5        3        1
> 2            2         7        4        1
> 3            5         5        3        1
> 4            1         3        7        2
> 5            2         7        7        1
> Please, notice that all the animals get the same treatment, and there are no 
>   control -animals which has no received any treatment.
> Normally I handle this kind of data with SPSS and Repeated Measurement 
> analysis. That tell me if there is a change along the time, but no 
> information about when the treatment start to be effective, when the effect 
> has pass. Besides, i would like to be able to handle this data with R.
> I have been looking at Crawley's S-plus book, and I cannot find similar 
> example as I have, not either in the Dalgaard´s introduction to R, because 
> he uses an example where different animals are measured as each time -using 
> time as a factor in a one way anova (I am hope I am right).
> Thanks for your help and time.
> Best regards
> Felix

ISwR is hardly an extensive treatise on repeated measurements, but
two-way ANOVA *is* in there (Section 6.3 and 10.6 for the replicated
case). Notice that you need a different data layout for that,
basically the result of a reshape(...direction="long"). 

Also, the capabilities of the newer mlm methods are relevant for this
kind of data (see ?anova.mlm, and the examples).

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list