[R-sig-ME] Nested error term and unbalanced design
Baldwin, Jim -FS
jbaldwin at fs.fed.us
Sun Feb 24 00:18:20 CET 2013
While there is a definite order to family, genus, and species (no pun intended), I think that the "nestedness" (if any) would be related to how you selected your sampling units rather than the fixed effects of family, genus, and species. (I admit bias in rarely if ever considering species as a random effect.)
Jim
-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Erica Newman
Sent: Saturday, February 23, 2013 2:21 PM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Nested error term and unbalanced design
I am trying to run a model that incorporates both environmental variables and taxonomic relationships, and I am unsure if I am 1) specifying the error term correctly, and 2) accounting for unbalanced data correctly. I would appreciate any guidance you can provide.
As a simplified example, I want to ask if a bird is more likely to be carrying ticks based on the habitat it was caught in, and what kind of bird it is (my actual model has many more environmental variables). We have many related species in multiple genera in multiple families, but all in the same order. Species is nested within genus, and genus is nested within family. I want to estimate a fixed effect for both habitat and species, while accounting for the nestedness of the relationships of the birds, and I also want to account for the fact that we caught more of certain species than others.
My simplified model looks like this:
M1 <- lmer(y ~ HABITAT + SPECIES + (1|FAMILY/GENUS/SPECIES),
family=binomial(link="logit"))
where y is a column vector of (tick presence, tick absence)
So my questions are: is this the correct "grammar" for the nested error?
and does the nested error structure by itself take into account the unbalanced data structure?
Thank you in advance for your time.
Sincerely,
Erica Newman
[[alternative HTML version deleted]]
_______________________________________________
R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
More information about the R-sig-mixed-models
mailing list