Hi guys,

Thank you for your feedback.  I agree that presenting the F-statistic and P
value for the intercept is rather pointless, especially considering my
data, but it seems that's the standard in the business and I just wanted to
have it in case it's required down the road.  I could not get KRmodcomp to
run as I got the following message 'Error in KRmodcomp.mer(model.lmer,
model.lmer2) :
  Models have either equal fixed mean stucture or are not nested'.  The
only difference between the two models was model.lmer2 had '0+' to begin
the fixed effects structure, so I'm not sure what's going on.

As far the confidence intervals for the random effects, I suppose I'm just
not getting it.  I was directed to postVar argument to get the conditional
variances which I guess lead me to the overall confidence intervals for the
slope, intercept, and residuals, but I certainly don't understand how this
works.  I've checked ?ranef, along with other resources and apparently I
just don't understand this avenue of mixed models to pull out the CI's.
Could someone please lay out a step-by-step tutorial or at least send me to
the best resource that does the best job of teaching this concept.

Thank you,
Jacob


On Sat, Sep 14, 2013 at 4:07 PM, Ben Bolker <bbolker@gmail.com> wrote:

> Henrik Singmann <henrik.singmann@...> writes:
>
> >
> > Hi,
> >
> > there is a relatively simple way of getting a p-value for the intercept
> > which involves pbkrtest's
> > KRmodcomp for obtaining the Kenward-Rogers ddf:
> >
> > 1. Fit full model
> > 2. Fit model without intercept (e.g., using 0 + model, or model - 1)
> > 3. compre both using KRmodcomp.
> >
> > For example:
> >
> > require(lme4)
> > require(pbkrtest)
> >
> > fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
> > fm2 <- lmer(Reaction ~ 0 +Days + (Days | Subject), sleepstudy)
>
>  Or
>
> fm2 <- update(fm1, . ~ . - 1)
>
> (equivalent but a more compact statement)
>
> >
> > KRmodcomp(fm1, fm2)
> >
> > ## F-test with Kenward-Roger approximation; computing time: 0.25 sec.
> > ## large : Reaction ~ Days + (Days | Subject)
> > ## small : Reaction ~ 0 + Days + (Days | Subject)
> > ##       stat  ndf  ddf F.scaling   p.value
> > ## Ftest 1357    1   17         1 < 2.2e-16 ***
> > ## ---
> > ## Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> >
> > Alternatively (and now comes shameless self-promotion) you can
> > use mixed from my afex package which gives
> > you p-values for all effects including the intercept using KRmodcomp:
> >
>
>   While I don't think presenting it does any great harm, the test of
> the difference of the intercept from zero only rarely says anything
> interesting about the data. (The most obvious exceptions are when the
> response variable is already normalized or scaled so that the value of
> zero is special: e.g., if the response variable is a treatment-control
> difference.)  Consider striking a blow for sensibility by leaving out
> the p-value for the intercept ...
>
> _______________________________________________
> R-sig-mixed-models@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]

