[R-sig-ME] Assessing linearity

Ken Knoblauch ken.knoblauch at inserm.fr
Sun Oct 24 15:11:40 CEST 2010


Mike Lawrence <Mike.Lawrence at ...> writes:
> I have developmental data collected across several grades (1-6). I
> would like to be able to assess whether there are any linear or
> non-linear trends across grade. Does it make sense to run a first lmer
> treating grade as continuous, obtain the residuals, then run a second
> lmer treating grade as a factor? That is:
> 
> fit1 = lmer(
>     formula = response ~ (1|individual)+grade_as_numeric
>     , data = my_data
>     , family = gaussian
> )
> my_data$resid = residuals(fit1)
> fit2 = lmer(
>     formula = resid ~ (1|individual)+grade_as_factor
>     , data = my_data
>     , family = gaussian
> )
> 
> If this is sensible, how might I apply it to a second binomial
> response variable given that the residuals from a binomial model are
> not 0/1?
> 
> Mike
> Mike Lawrence
> Graduate Student
> Department of Psychology
> Dalhousie University
> 

Or just make grade and ordered factor and see whether there
are significant higher order terms.

If the response variable is binomial, why not use glmer with a
binomial family?

Ken 

-- 
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html




More information about the R-sig-mixed-models mailing list