I collected data on the growth of juvenile fish from 4 different types of crosses using multiple distinct family blocks and I am trying to see if cross type has an effect on growth using linear mixed effects models. I have one fixed factor (Length), 3 categorical random factors (sire, dam and sire/dam interaction) and a continuous random factor (density per tank). As I am relatively new to R and new to mixed effects models, I was wondering if I would have to code the continuous random factor in R differently from the categorical random factors using lme4?
So far I have
model5=lmer(Length~(1|Dam)+(1|Sire)+(1|Sire:Dam)+(1|Density))
model6=lmer(Length~Cross+(1|Dam)+(1|Sire)+(1|Sire:Dam)+(1|Density))
is density coded in properly, or would I have to alter it due to the fact that it is a continuous variable?
cut(Density,5). But I agree it doesn't make much sense. – user3226167 Mar 20 '19 at 02:17