# Suggestion about morphometric analysis in R using lm or lme

Maybe this is an over-the-top question but I have many doubts regarding my recent analysis about deer skull measurements and how to proceed with the analysis. This is a sample of my dataset:

   Factor1 population manage foraging height biome abundance area  forest plough
-0.6033788 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
0.3250981 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
0.5577059 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
-0.1596194 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
-1.3089952 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
-2.1693392 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
-0.9669080 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
-1.8857842 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
0.7242678 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000
1.6815373 ADA_BEC   best    fields   plain  agS    1500    73154  61154 12000


Factor1 are factor scores of all individuals (567) divided into 12 populations (population column). Others are either factor (manage (4lvl), foraging (3lvl), height (2lvl) and biome (4lvl)) or continuous, different for every population, (abundance, area (in ha), which totals forest+ploughland (also in ha)). Now I tried with all traditional uni-variate statistics such as anova, ancova, lm but, off course, my design is unballanced. My question is are there any general modeling solutions to incoporating all of these in a maximal model, simplifying it further and decide what is the most influential factor. Could mixed-effects model be used? Basic data are in fact, 50 measurements on every individual skull.

## 1 Answer

A mixed effect model seems appropriate for your study. You appear to be asking the question, "Which covarietes predict skull size (represented by Factor1)?" However, your observations are not independent. For example, covariate observations within populations are perfectly correlated. Thus, a standard fixed effects-only model will underestimate the standard error. For a mixed effects model, the covariates are fixed effects and population is a random effect. Using the lme4 package in R, you might start with:

lmer(Factor1 ~ manage + foraging + height + biome + abundance + area + forest + plough + (1|population), data = your.dataset)

• Great advice. So it is mixed-model after all. Although I get "Downdated X'X is not positive definite, 12" when using all possible covariates I think that I can strip down some of them. Mostly I would be interested in this question "Is it possible to predict skull size from the forested areas to ploughland ratio in total area?" Also, reading lmer output is currently problematic to me... Jun 18, 2012 at 22:27
• @IanStuart: "reading lmer output is currently problematic to me..." - Doug Bates has made a draft of an upcoming book on the lme4 package available online Jun 19, 2012 at 18:20
• Unfortunately it says file does not start with %PDF, and does not open from the link Jun 19, 2012 at 20:50
• @IanStuart: Try this instead: lme4.r-forge.r-project.org/lMMwR/lrgprt.pdf Jun 19, 2012 at 20:57