Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a model:

$y=a+bx+\varepsilon_1$ for each observation (tree)

$b=c+dz+\varepsilon_2$ for each forest (group of trees)

$y$, $x$, $z$ are continuous variables. $a$, $b$, $c$, $d$ are coefficients. $z$ is a property of forests (not individual trees). Error $\varepsilon_1$ is normally distributed and varies by tree. Error $\varepsilon_2$ varies by forest and not much is known about its distribution.

Is this lme4 model specification correct?

lmer(y~x+x:z+(0+x|forest))

I will greatly appreciate your help!

share|improve this question

1 Answer

up vote 4 down vote accepted

Nominally, you are right, but it looks odd that you force no random intercept in the model, which smells like regression through the origin, in terms of making strong assumptions that some terms (or some sources of variability) in the model are zero. I would start with

lmer(y~x+x:z+(1+x|forest))

instead and see how that works.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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