Skip to content
Prev 4627 / 20628 Next

Assessing linearity

Hi Mike,

You would be better off trying out something like polynomials or  
splines, For example:

  fit1 = lmer(
      formula = response ~ (1|individual)+poly(grade_as_numeric,n),
      , data = my_data
      , family = gaussian
  )

where n is the order of the polynomial. n=1 would fit the same model  
as your original fit1, although the covariate (and the regression  
parameter) would be scaled by some number. When n=6 the model would be  
a reparameterised version of your model fit2. When 1<n<6 you would be  
working with a non-linear relationship in between these two extremes,  
although the model is still linear in the parameters.

Cheers,

Jarrod








Quoting Mike Lawrence <Mike.Lawrence at dal.ca>: