[R-sig-ME] Very important question regarding the error while using library(lme4)

Ben Bolker bbolker at gmail.com
Wed Jul 16 14:31:26 CEST 2014


On 14-07-15 02:15 PM, Steve Denham wrote:
> I use SAS a LOT, probably in a ratio of 100 to 1 over R, for mixed models.  
> 
> However, one thing I would never do is use the covtest option in PROC
> MIXED to see whether a variance component was "significant" or not.
>  There is a reason that Russ Wolfinger and the other developers pulled
> it out of the default output, and it is that a Wald test here is, well,
> the best I can come up with is "a very bad idea".  Estimation of the
> standard error of a variance component is difficult, and strongly
> sensitive to assumptions, as well as being non-linear and iterative, so
> that there is sensitive dependence on initial conditions (SDIC).  So the
> Hessian inverse may be chaotic.  Thus, any "p value" you get is
> certainly suspect.
> 
> Second, why in the world would you 'test' for significance of a variance
> component to begin with?  What end can be obtained from it?  Variance
> components arise out of design considerations, and I can't imagine a
> null hypothesis relevant in this case.  That may be the fault of my
> imagination, but isn't the whole point estimation and accommodation of
> identifiable sources of variation?
> 
> Pardon the soapbox...
>  
> Steve Denham
> Director, Biostatistics
> MPI Research, Inc.
> 

  Steve, thanks for speaking up.

* for what it's worth, it's fairly hard to get a Wald test out of lme4,
although if you wanted you could do it by inverting
model at optinfo$derivs$Hessian ...
* my personal feeling is that the estimate of the variance-covariance
matrix of the random effects is not "chaotic", but I agree that it could
be numerically unstable.
* I would say there _are_ times when one is interested in a standard
null-hypothesis test of whether the variation among units of the
grouping variable is distinguishable from the effect of noise elsewhere
in the model (e.g. evolutionary/population genetics questions), but I
agree that this null hypothesis is often tested needlessly/thoughtlessly ...

   As a SAS user I would be interested in your comments/opinions about
the pros and cons of PROC MIXED/GLIMMIX vs. lme4 -- *not* with the
intention of starting a flame war, but for the general hope of informing
myself (and others) about the strengths and weaknesses of different
systems, and of finding out how we can improve lme4 ...

  cheers
    Ben Bolker


-- 



>     ------------------------------------------------------------------------
>     *From:* Ben Bolker <bbolker at gmail.com>
>     *To:* Mao Huang <hannahmaohuang at gmail.com>
>     *Cc:* "r-sig-mixed-models at r-project.org"
>     <r-sig-mixed-models at r-project.org>
>     *Sent:* Tuesday, July 15, 2014 1:11 PM
>     *Subject:* Re: [R-sig-ME] Very important question regarding the
>     error while using library(lme4)
> 
>     [cc'ing to r-sig-mixed-models]
> 
>     Please ask these kinds of general question on
>     r-sig-mixed-models at r-project.org
>     <mailto:r-sig-mixed-models at r-project.org> .  And see
>     http://glmm.wikidot.com/faq <http://glmm.wikidot.com/faq>,
>     ?pvalues in the package help, and the lmerTest package ...
> 
> 
>     On Tue, Jul 15, 2014 at 9:51 AM, Mao Huang <hannahmaohuang at gmail.com
>     <mailto:hannahmaohuang at gmail.com>> wrote:
> 
>     > Hi Ben,
>     >
>     > I got a new question for ya:
>     >
>     > lmer can provide the estimates of variance-covariance for the
>     variables
>     > that you put in the model.
>     > e.g. Y= X1 + X2
>     >
>     > But I want to test to see if the effects of X1 or X2  are
>     significant or
>     > not, which needs a test for these variables.
>     >
>     > In SAS proc mixed we could specify "covtest", which then provide the
>     > Z-test value and p-value for each of those variables (along with their
>     > estimated variances).
>     > So based on that, we could see if any of these factors are
>     significant or
>     > not.
>     > example output would be something like this, here X1 and X2 are not
>     > significant:
>     >
>     > Covariance Parameter Estimates
>     > Cov Parm Estimate Standard Error Z Value Pr > Z
>     > X1  222.19 182.50    1.22 0.1117
>     > X2  2.3316 1.8721    1.25 0.1065
>     > Residual 89.0390 2.8537 31.20 <.0001
>     >
>     >
>     >
>     > How do you do such similar tests  in lme4() ?
>     >
>     > Thanks.
>     >
>     >
>     >
>     >
>     >
>     > On Mon, Jul 14, 2014 at 11:08 PM, Ben Bolker <bbolker at gmail.com
>     <mailto:bbolker at gmail.com>> wrote:
>     >
>     >> glad it worked.
>     >>
>     >>
>     >> On Mon, Jul 14, 2014 at 11:01 PM, mao Huang
>     <hannahmaohuang at gmail.com <mailto:hannahmaohuang at gmail.com>>
>     >> wrote:
>     >>
>     >>> It worked. Thanks so much!
>     >>> I hope it was that obvious to me at the beginning too :(
>     >>>
>     >>> I thought it was the library path problem and so was keeping
>     checking on
>     >>> that....:(
>     >>>
>     >>>
>     >>>
>     >>> Sent from my iPhone
>     >>>
>     >>> On Jul 14, 2014, at 9:38 PM, Ben Bolker <bbolker at gmail.com
>     <mailto:bbolker at gmail.com>> wrote:
>     >>>
>     >>>  [cc'ing to r-sig-mixed-models]
>     >>>
>     >>>  The obvious question would be whether you have tried
>     >>>
>     >>> install.packages("minqa")
>     >>>
>     >>> ?
>     >>>
>     >>>  I would try that, then *re*-install lme4.
>     >>>
>     >>>  Otherwise: operating system, results of sessionInfo(), results of
>     >>>
>     >>> installed.packages()[c("lme4","minqa"),]
>     >>>
>     >>> ?
>     >>>
>     >>>
>     >>> On Mon, Jul 14, 2014 at 3:54 PM, Huang, Mao <
>     >>> huang.823 at buckeyemail.osu.edu
>     <mailto:huang.823 at buckeyemail.osu.edu>> wrote:
>     >>>
>     >>>>  Hi Ben,
>     >>>>
>     >>>> Thank you for your work in creating lme4()
>     >>>>
>     >>>>  I need to analyze my data very urgently using lmer in lme4
>     library.
>     >>>>
>     >>>>  I tried different ways to download the package, it can be
>     downloaded
>     >>>> and installed properly.
>     >>>> But once I call the library, it gives error and I can't use it:
>     >>>>
>     >>>>  utils:::menuInstallLocal()
>     >>>> package ‘lme4’ successfully unpacked and MD5 sums checked
>     >>>>
>     >>>>  > library(lme4)
>     >>>> Error in library.dynam(lib, package, package.lib) :
>     >>>>  DLL ‘minqa’ not found: maybe not installed for this architecture?
>     >>>> Error: package or namespace load failed for ‘lme4’
>     >>>>
>     >>>>
>     >>>>  I tried to look for answers online but nothing useful found yet.
>     >>>>
>     >>>>  Do you have any idea what's going on there?
>     >>>>
>     >>>>  Please reply at your earliest convenience.
>     >>>>
>     >>>>  Thanks so much!
>     >>>>
>     >>>>  Mao
>     >>>>
>     >>>> ​
>     >>>>
>     >>>>
>     >>>>
>     >>>
>     >>
>     >
> 
>         [[alternative HTML version deleted]]
> 
>     _______________________________________________
>     R-sig-mixed-models at r-project.org
>     <mailto: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