[R] surrogate poisson models
Thomas Lumley
thomas at biostat.washington.edu
Tue May 4 17:59:43 CEST 1999
On Tue, 4 May 1999, Simon Bond wrote:
>
> Call:
> glm(formula = terms(Fr ~ treatment * age + (treatment + age) *
> repair, keep.order = T), family = poisson, data = overall)
>
>
> Coefficients:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) 0.68441 0.28979 2.362 0.01819 *
> treatment -0.28096 0.43716 -0.643 0.52043
> age.L 0.55595 0.42669 1.303 0.19259
> age.Q 0.03404 0.42817 0.079 0.93664
> treatment.age.L -1.31805 0.66813 -1.973 0.04853 *
> treatment.age.Q -0.37452 0.67332 -0.556 0.57805
> repair.L 1.53962 0.54255 2.838 0.00454 **
> repair.Q -0.49447 0.40128 -1.232 0.21787
> treatment.repair.L -3.93138 0.96310 -4.082 4.46e-05 ***
> treatment.repair.Q -0.58937 0.62739 -0.939 0.34753
> age.L.repair.L -2.08339 0.67093 -3.105 0.00190 **
> age.Q.repair.L -0.47257 0.59116 -0.799 0.42406
> age.L.repair.Q -0.04208 0.42881 -0.098 0.92183
> age.Q.repair.Q -0.64314 0.42800 -1.503 0.13293
> - ---
>
> How do you interpret the suffixes .L and .Q in the summary? I tried
> redefining overall$age_ordered(.... labels=c(...)), to no avail. When the
> factors are unordered, the suffixes are the labels, but the fitted model is
> different.
For an ordered factor polynomial contrasts are used by default (this can
be set with options(contrasts=)). Polynomial contrasts decompose the
effect of a variable into orthogonal linear, quadratic, cubic,... terms.
Based on the analysis above you might argue that all the quadratic terms
are relatively small and not statistically significant and that the linear
terms capture most of the variation.
You can see what the contrast matrix looks like by typing eg
R> contr.poly(3)
.L .Q
[1,] -7.071068e-01 0.4082483
[2,] -7.850462e-17 -0.8164966
[3,] 7.071068e-01 0.4082483
to get the polynomial contrasts for a three-level ordered factor.
For an unordered factor we use treatment contrasts by default (that is,
indicator variables for all but one level of the factor). Any full rank
set of contrasts gives the same model, but the coefficients are different,
and allow you to answer different questions. The choice of contrasts
depends on which questions you want to answer.
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list