[R-sig-ME] Standard errors of variances; negative variance

James Pustejovsky jepu@to @end|ng |rom gm@||@com
Tue Jun 20 16:02:33 CEST 2023


Regarding standard errors for variance components: Will, I'm not sure if
you were asking about lme4::lmer() or nlme::lme(). If you're not familiar
with the latter, you might find it interesting. It is in some respects more
flexible than lmer(), such as providing model components for different
level-1 error structures and correlation structures, and so you might find
it more comparable to SAS. If you're using nlme::lme(), the lmeInfo package
provides a variance-covariance matrix for the variance component parameters
(based on the inverse expected information or average information):
https://jepusto.github.io/lmeInfo/
That said, I agree with the other folks who've suggested that likelihood
ratio tests and profile likelihood CIs might be a better choice for
inference on variance components.

Regarding negative variances, Ben's post is instructive. In addition, in
some specific problems related to meta-analysis, we've found that allowing
for negative variance components can improve the performance of score and
likelihood ratio tests involving other model parameters. My working theory
here is that bounding variances at zero means that the log likelihood is no
longer smooth, which seems to  muck up the behavior or tests that involve
the first and second derivatives of the log likelihood.

James

On Tue, Jun 20, 2023 at 8:37 AM Ben Bolker <bbolker using gmail.com> wrote:

>
>  From Molenberghs and Verbeke 2011:
>
> In the first view, where the focus is entirely on the resulting marginal
> model (1.2), negative values for λ2 are perfectly acceptable (Nelder,
> 1954; Verbeke and Molenberghs, 2000, Section 5.6.2), because this merely
> corresponds to the occurrence of negative within-cluster correlation ρ =
> λ2/(λ2 + ν2). In such a case, the only requirement is that λ2 + ν2 >
> 0andVi = λ2 Jni + ν2 Ini is a positive definite, marginal covariance
> matrix. Further discussions on negative variance components, and their
> implications for inferences, can be found in Thompson (1962), Searle et
> al. (1996), Verbeke and Molenberghs (2003) and Molenberghs and Verbeke
> (2007). In the second view, when the link between marginal model (1.2)
> and its generating hierarchical model (1.1) is preserved, thereby
> including the concept of random effects bi and perhaps even requiring
> inferences about them, it has been considered imperative to restrict λ2
> to non-negative values.
>
>    Molenberghs, Geert, and Geert Verbeke. 2011. “A Note on a
> Hierarchical Interpretation for Negative Variance Components.”
> Statistical Modelling 11 (5): 389–408.
> https://doi.org/10.1177/1471082X1001100501.
>
>     Since lme4 deals with the hierarchical model, I don't think that
> negative variances are going to work.
>
> On 2023-06-20 9:21 a.m., Sorkin, John wrote:
> >
> > Thierry,
> > I have the same question that you posed, how can a variance, a measure
> > that is squared be negative? Will, please enlighten us!
> > John
> >> John David Sorkin M.D., Ph.D.
> >> Professor of Medicine
> >> Chief, Biostatistics and Informatics
> >> University of Maryland School of Medicine Division of Gerontology and
> >> Geriatric Medicinet
> >> Baltimore VA Medical Center
> >> 10 North Greene Street <x-apple-data-detectors://12>
> >> GRECC <x-apple-data-detectors://12> (BT/18/GR)
> >> Baltimore, MD 21201-1524 <x-apple-data-detectors://13/0>
> >> (Phone) 410-605-711 <tel:410-605-7119>9
> >> (Fax)410-605-7913 <tel:410-605-7913> (Please call phone number above
> >> prior to faxing)
> >
> >> On Jun 20, 2023, at 3:45 AM, Thierry Onkelinx via R-sig-mixed-models
> >> <r-sig-mixed-models using r-project.org> wrote:
> >>
> >> Dear all,
> >>
> >> A negative variance seems odd to me. Isn't a variance positive by
> >> definition? How would you interpret a random intercept with a negative
> >> variance?
> >>
> >> Best regards,
> >>
> >> ir. Thierry Onkelinx
> >> Statisticus / Statistician
> >>
> >> Vlaamse Overheid / Government of Flanders
> >> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE
> AND
> >> FOREST
> >> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> >> thierry.onkelinx using inbo.be
> >> Havenlaan 88 bus 73, 1000 Brussel
> >>
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.inbo.be%2F&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sbP2Xemwg0iHjvxcc6zR8vtPbZf5ZoFCv1BIFIeDdBE%3D&reserved=0
> >>
> >>
> ///////////////////////////////////////////////////////////////////////////////////////////
> >> To call in the statistician after the experiment is done may be no more
> >> than asking him to perform a post-mortem examination: he may be able
> >> to say
> >> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> >> The plural of anecdote is not data. ~ Roger Brinner
> >> The combination of some data and an aching desire for an answer does not
> >> ensure that a reasonable answer can be extracted from a given body of
> >> data.
> >> ~ John Tukey
> >>
> ///////////////////////////////////////////////////////////////////////////////////////////
> >>
> >> <
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.inbo.be%2F&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=I5HJ05o0Bd4ly0GL0Smc1iYm3cuZMc2IGCcxy8OWn%2B8%3D&reserved=0
> >
> >>
> >>
> >> Op di 20 jun 2023 om 01:36 schreef Ben Bolker <bbolker using gmail.com>:
> >>
> >>>   Hi, Will,
> >>>
> >>> Googling
> >>>
> >>>  site:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fr-sig-mixed-models%2F&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vw%2FnMxnvA7L9A0qYuJfHa9suA2YBTnZ%2BqxPltyR3G%2FU%3D&reserved=0
> "negative
> >>> variance"
> >>>
> >>> claims to get you 67 results (although only 11 that Google considers
> >>> worth displaying by default),
> >>>
> >>>   You can filter by date - there are only two hits since 2020:
> >>>
> >>>
> >>>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3Dsite%253Ahttps%253A%252F%252Fstat.ethz.ch%252Fpipermail%252Fr-sig-mixed-models%252F%2B%2522negative%2Bvariance%2522%26client%3Dfirefox-b-d%26tbs%3Dcdr%253A1%252Ccd_min%253A01-01-2020%252Ccd_max%253A%26tbm%3D&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xbWrjRwClEMYFKVkncDFgZga6SPNcmsPvbNs4kpUQjY%3D&reserved=0
> >>>
> >>>
> >>>   and these both look like false positives (they include "negative" and
> >>> "variance" but not "negative variance" ...)
> >>>
> >>>   The short answer is that I am not aware of any mixed effect package
> >>> in R that will allow you to return negative values. You can see my
> >>> answer here:
> >>>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fpipermail%2Fr-sig-mixed-models%2F2018q1%2F026437.html&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2E5S51uIXiPEsuH11f693MEOLYFb2dh5e39t2GSLor8%3D&reserved=0
> ...
> >>>
> >>>
> >>>   As for uncertainties in variances - the merDeriv package (dating back
> >>> to 2017) will give you the standard errors of variances and covariances
> >>> (although again, note that there's a theoretical issue here - the
> >>> standard errors are often extremely poor summaries of the uncertainty
> or
> >>> RE variances, the original authors of lme4 would certainly prefer that
> >>> you use profile confidence intervals to summarize the uncertainty ...)
> >>>
> >>>   That's what I know -- perhaps someone else knows about a package that
> >>> allows for negative variances ... ??
> >>>
> >>> On 2023-06-19 6:13 p.m., Will Hopkins wrote:
> >>>> I've just joined this list to get answers to a few questions. I would
> >>> have
> >>>> searched the archive before posting, but there seems to be no way of
> >>>> searching except via quarterly summaries. I searched the last four
> >>> quarters
> >>>> without success.
> >>>>
> >>>> I'm a SAS user, but a few years ago I tried the mixed model in R, with
> >>> the
> >>>> help of an R user (Alice Sweeting). At that time, the lme package
> >>>> did not
> >>>> provide standard errors for the variances, nor did it allow negative
> >>>> variance. Have these limitations been addressed?  As I recall, Alice
> >>> found
> >>>> some code that provided standard errors, but it gave values different
> >>> from
> >>>> those of the mixed model in SAS (Proc Mixed). I therefore opted to
> stay
> >>> with
> >>>> SAS, because allowing for negative variance for random effects other
> >>>> than
> >>>> residuals and estimating uncertainties in variances are both
> fundamental
> >>> to
> >>>> mixed modeling, in my view. I also became fluent with SAS coding
> >>>> over the
> >>>> years and did not want to make the effort with R coding.
> Interestingly,
> >>> SAS
> >>>> introduced a free cloud version called SAS Studio, evidently modeled
> >>>> on R
> >>>> Studio, to try to win back customers!
> >>>>
> >>>> Will
> >>>>
> >>>> _______________________________________________
> >>>> R-sig-mixed-models using r-project.org mailing list
> >>>>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mixed-models&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cPlRiZIOr3%2B4lUfOPHm26RrP4peEw9ZAkjtm5enO4Uw%3D&reserved=0
> >>>
> >>> _______________________________________________
> >>> R-sig-mixed-models using r-project.org mailing list
> >>>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mixed-models&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cPlRiZIOr3%2B4lUfOPHm26RrP4peEw9ZAkjtm5enO4Uw%3D&reserved=0
> >>>
> >>
> >>    [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-sig-mixed-models using r-project.org mailing list
> >>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mixed-models&data=05%7C01%7Cjsorkin%40som.umaryland.edu%7C2c0d1047636b43c2bfcc08db71625f82%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638228439560019013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cPlRiZIOr3%2B4lUfOPHm26RrP4peEw9ZAkjtm5enO4Uw%3D&reserved=0
>
> --
> Dr. Benjamin Bolker
> Professor, Mathematics & Statistics and Biology, McMaster University
> Director, School of Computational Science and Engineering
> (Acting) Graduate chair, Mathematics & Statistics
>  > E-mail is sent at my convenience; I don't expect replies outside of
> working hours.
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list