70 likes | 236 Views
Excercise 3, week 3: Activity of rats. Stina , Helle, Bernhardt. Dataset:. ACTIVITY OF RATS Kebede, Wibke The effect of three different treatments on the activity of rats was studied by measuring their activity (intersection of a light beam) for a period of 57 hours,
E N D
Excercise 3, week 3:Activityofrats Stina, Helle, Bernhardt
Dataset: ACTIVITY OF RATS Kebede, Wibke The effect of three different treatments on the activity of rats was studied by measuring their activity (intersection of a light beam) for a period of 57 hours, once monthly for a time period of 10 months. log activity (outcome) 3 treatments (explanatory factor) time,10 months (explanatory factor) replicates,10 cages with 2 rats each (random factor)
Task 1: redotheanalyses in exercise 2 using a Diggle model insteadof a randomintercepts model rat<-read.table(file.choose(),header=TRUE) library(nlme) model3<-lme(logact~factor(month)*factor(treat),random=~1|factor(cage), +correlation=corGaus(form=~month|factor(cage),nugget=TRUE),method="ML",data=rat) model4<lme(logact~factor(month)+factor(treat),random=~1|factor(cage), +correlation=corGaus(form=~month|factor(cage),nugget=TRUE),method="ML",data=rat) anova(model3,model4) Model df AIC BIC logLik Test L.Ratio p-value model3 1 34 -157.3710 -31.44237 112.68549 model4 2 16 -162.3058 -103.04530 97.15291 1 vs 2 31.06516 0.0283
WechoosetheDiggle model, because… • respectsthe design ofthedata • large numberofmeasurementsover time • considersthecorrelationbetween time ofmeasurement • weget a morepreciseestimationofthesignificancelevel • andithas a cool name! Peter J. Diggle
Report Statistical method: The time dependent effect of treatment on log(rat activity) was modelled by a linear mixed model with cage as a random effect to account for the variation between cages and including a spatial Gaussian serial correlation structure todescribe the dependency between measurements of log rat activity that are close in time. P-values are obtained by maximum likelihood ratio tests and are evaluated at a 5% significance level. All analyses were made in R version 2.8.1 Results:There was a significant combined effect of treatment and time of measurement on the log activity of rats (p=0.028).