Imagine a dataset where there are 3 nested grouping variables: study
$>$ group
$>$ outcome
(read outcome
is nested in group
which in turn is nested in study
.)
We have two predictors. ktype
is a categorical factor (0=direct,1=indirect
) that can vary between study
s, between group
s, and between outcome
s. And, treat
is a continuous variable only varying between study
s.
Question: If I fit 3 models (see below) that only differ in their random-effects specification, then, how does the interpretation or meaning of any of the 3 fixed-effect coefficients (A, B, C
) for each model change?
Estimate
ktype0 A
ktype1 B
treat C
# Syntax in R's `lme4` package (DON'T RUN)
1) lmer(y ~ 0 + ktype + treat + (ktype |study))
2) lmer(y ~ 0 + ktype + treat + (ktype |study) + (treat |study))
3) lmer(y ~ 0 + ktype + treat + (ktype |study/group/outcome) + (treat |study))
# STRUCTURE OF GROUPING VARIABLES:
"
study group outcome
1 1 1
1 1 2
1 1 1
1 1 2
1 1 1
1 1 2
1 2 1
1 2 2
1 2 1
1 2 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
2 2 2"
```