Re: [R] How to specify a quadratic term in the contrast function

2025-02-18 Thread Kevin Thorpe
I don’t know if this will make a difference, but I believe it is generally preferred to use the poly() function (for lm()/glm()) or the pol() function (for rms functions) to include the quadratic (and higher order terms). Kevin > On Feb 18, 2025, at 12:23 PM, Ben Bolker wrote: > > Looking a

Re: [R] How to specify a quadratic term in the contrast function

2025-02-18 Thread Ben Bolker
Looking at the 'contrasts' function, it seems to be imported from 'rms' and to take only 'rms'-type fits (which are different from base-R [g]lm() fits) as input. I'm not sure exactly what contrasts you're trying to generate, but I would probably use the emmeans package for the task, since