[R] how to use glm for a time course data set
Jin, Jp
jjin at email.unc.edu
Fri Aug 27 19:38:41 CEST 2010
Dear list,
I used glm to analyze the effect of treatment, measurement-methods etc. on lesion size in a time course experiments. Could anyone points me out how to extract detailed comparisons of interest? For example:
Measurement.T2.M6 vs. Measurement.T2.Baseline, Or even
Measurement.T2.M6.Treatment vs. Measurement.T2.M6.placebo (I did not include Treatment as a factor in the query below yet).
Thanks for your help (data was attached)!
Jp Jin
> summary(glm(data$Lesion.Size~Time+Measurement+Time*Measurement, data=data))
Call:
glm(formula = data$Lesion.Size ~ Time + Measurement + Time *
Measurement, data = data)
Deviance Residuals:
Min 1Q Median 3Q Max
-5344.9 -2494.8 -1289.5 981.7 29248.7
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1352.7 1180.6 1.146 0.2546
Timem12 708.4 1669.7 0.424 0.6723
Timem6 630.6 1669.7 0.378 0.7064
MeasurementT2 4079.8 1669.7 2.443 0.0163 *
Timem12:MeasurementT2 -2400.5 2361.3 -1.017 0.3117
Timem6:MeasurementT2 -1763.5 2361.3 -0.747 0.4569
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 25090570)
Null deviance: 2787055253 on 107 degrees of freedom
Residual deviance: 2559238182 on 102 degrees of freedom
AIC: 2154.4
Number of Fisher Scoring iterations: 2
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: data.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100827/956ffe33/attachment.txt>
More information about the R-help
mailing list