Dear R-help, I'm applying the surrogate Poisson glm, by following Venables & Ripley (7.3 pp238-42).>overall_cbind(expand.grid(treatment=c("Pema","control"),age=c("young","adult","old"),repair=c("excellent","good","poor")),Fr=c(8,0,7,1,2,0,2,7,1,4,7,1,0,3,2,5,1,9))>overall$age_ordered(overall$age,levels=c("young","adult","old")) >overall$repair_ordered(overall$repair,levels=c("poor","good","excellent")) >overall.lm1_glm(terms(Fr~treatment*age+(treatment+age)*repair,keep.order=T),family=poisson,data=overall)> summary(overall.lm1)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. Any help is much appreciated. Simon Bond. ------- End of forwarded message ------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Seemingly Similar Threads
- Ordered factors , was: surrogate poisson models
- Surrogate splits for decision trees
- Multivariate regression tree: problems with surrogate splits
- proportion of treatment effect by a surrogate (fitting multivariate survival model)
- RTisean generating multivariate surrogates;