[R-sig-ME] parsimonious mixed models
Phillip Alday
Phillip.Alday at unisa.edu.au
Thu Nov 10 13:23:52 CET 2016
Having an interaction without the corresponding main effect is a bit unusual, but not unheard of ... in your case though, I would remove the interactions and take look at the new random-effects estimates. I suspect you'll see that more variance is now explained by the main effects.
I also suspect that your variables aren't quite coded right -- cSenttype is probably categorical, is it not? Yet it's estimate in the random-effects structure is that of a continuous variable (single estimate) and not a factor (set of estimates for different levels / contrasts).
Best,
Phillip
> On 9 Nov 2016, at 21:14, Wing Yee Chow <wingyeechow.zoey at gmail.com> wrote:
>
> Hi there,
>
> I'm trying to follow Bates et al.'s guidelines for parsimonious mixed models
> and have two questions:
>
> 1. In reducing (near-zero) variance components from the random effects
> structure, is the criterion simply the size of the variance? Or do I need to
> keep a simple effect as long as I'm keeping a higher order effect that
> involves that factor? That is, with the following random effects structure,
> do I take out (i) just cSenttype:cCongruity for item, or (ii) both
> cSenttype:cCongruity for item AND cCongruity for subj?
>
>
>
> Random effects:
>
> Groups Name Variance Std.Dev.
>
> item cSenttype:cCongruity 0 0.0
>
> item.1 cCongruity 205437 453.3
>
> item.2 cSenttype 100765 317.4
>
> item.3 (Intercept) 124422 352.7
>
> subj cSenttype:cCongruity 134752 367.1
>
> subj.1 cCongruity 0 0.0
>
> subj.2 cSenttype 87161 295.2
>
> subj.3 (Intercept) 2434746 1560.4
>
> Residual 4891977 2211.8
>
> Number of obs: 1082, groups: item, 48; subj, 24
>
>
>
> 2. In another dataset, I have a 3 x 2 within-participant and
> within-item design. I specified the contrasts for the two factors in this
> way:
>
> contrasts(tempdata$congruity) <- contr.sum(2)/2
>
> contrasts(tempdata$sentencetype)=cbind("AvsBC" = c(-2/3, 1/3, 1/3), "BvsC" =
> c(0, -1/2, 1/2))
>
>
>
> I got the model matrix (mmatrix) from the maximal model (m0) to construct
> the zero-correlation parameter model (m1). I think I know how to do this for
> a factor with two levels (i.e., only one contrast), but I'm not sure about
> the current case since I have both cSenttypeAvsBC and cSenttypeBvsC for the
> 3-level factor sentencetype. Is this the right syntax?
>
>
>
> cSenttypeAvsBC <- mmatrix [,2] # columns 2 and 3 encode different contrasts
> of sentencetype
>
> cSenttypeBvsC <- mmatrix[,3]
>
> cCongruity <- mmatrix[,4]
>
> m1<- lmer(value ~ sentencetype * congruity + ((cSenttypeAvsBC +
> cSenttypeBvsC) * cCongruity||subj) + ((cSenttypeAvsBC + cSenttypeBvsC) *
> cCongruity||item), REML=FALSE,
>
> data=tempdata)
>
>
>
> Many thanks!!
>
> Wing-Yee Chow
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list