2
$\begingroup$

I have dataset with both linear and quadratic relationships for my response variable among individuals. My dataset includes individuals sampled from two populations (9 individuals from population A and 8 from population B). For each individual I have measured stable nitrogen-isotopes from 9 sequentially grown wing feathers (time series).

I have two hypotheses:

  1. their are differences in the mean isotope values across the wing for individuals between the two regions
  2. their differences in the variation of the isotope values across the wing for individuals between the two regions

I must admit I am a novice to mixed models. Originally I had falsely assumed that my data for each individual were 'linear'. Thanks to Ben Bolker I now know how to test these assumptions and have discover one individual from the 17 has a quadratic relationship. I had built the following GLMMs using the 'nlme' package in 'R' before discovering my error:

model1 <- lme(Delta15N ~ factor(Population), method = "REML", data = Data, random = ~ 1 | Individual, correlation = corAR1(form = ~ 1 | Individual))

model2 <- lme(Delta15N ~ factor(Population)*Feather, method = "REML", data = Data, random = ~ 1 | Individual, correlation = corAR1(form = ~ 1 | Individual))

Can you please suggest a reference or example code that I might use to correctly model my data?

$\endgroup$

1 Answer 1

2
$\begingroup$

I think you may be confusing nonlinearity in the parameters with nonlinearity in the variables. As in ordinary least squares, you can have quadratic terms in a linear model. A nonlinear mixed model usually refers to a dependent variable that is not continuous.

Just as an OLS model can be represented as

$Y = X\beta + \epsilon$

so a linear mixed model can be represented as

$Y = X\beta + Z\gamma + \epsilon$

and so you can have quadratic terms.

$\endgroup$
3
  • $\begingroup$ When I plot my data (feather isotopes by feather position), one of my individuals shows a nice "U"-shaped curve. I am not sure how to rephrase my question more clearly. Delta15N is my dependent variable. $\endgroup$ Commented Feb 12, 2013 at 11:44
  • 1
    $\begingroup$ No, I don't think you do. But it may be tricky to handle a quadratic relations for just ONE person (just as it would for an OLS model). $\endgroup$
    – Peter Flom
    Commented Feb 12, 2013 at 11:46
  • $\begingroup$ I understand, but it hardly seems reasonable to throw out one individual because they did not do what everyone else did! $\endgroup$ Commented Feb 12, 2013 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.