Skip to content

Negative Variance

12 messages · Callie Baird, Ben Bolker, Douglas Bates +3 more

#
Callie Baird <calliebaird at ...> writes:
I don't know of one.  This is typically a 'feature' of 
method-of-moments estimators; most of the approaches I know of
that are implemented in R use Bayesian or (restricted) maximum
likelihood approaches for which negative variances would be
completely nonsensical ...

  Just out of curiosity, why would you _want_ negative variance
estimates ... ?  The only reason I can think of would be to
match previous estimates ...

  Ben Bolker
#
Hi,

Negative variance estimates could make sense if viewed as covariances.  
For example, you could imagine controlling the amount of food for a  
nest of chicks very carefully such that negative correlations between  
the weights of nest-mates exist because of competition (if I take a  
large slice of the pie you're left with a little slice). Having a  
negative estimate of the nest variance would then make sense if viewed  
as an estimate of the covariance. asreml-R will allow you to let the  
variance go negative (or model them as residual correlations if you  
prefer).

Cheers,

Jarrod


Quoting Ben Bolker <bbolker at gmail.com> on Tue, 4 Jun 2013 15:44:51  
+0000 (UTC):

  
    
#
On 13-06-04 12:00 PM, Jarrod Hadfield wrote:
OK.  lme won't let variances go negative, but it will allow you to
estimate negative residual correlations:

lme(prevalence~sex,random=list(tripsite=pdCompSymm(~sex-1)),data=g6)

 is one example I quickly pulled out of a previous analysis (correlation
between male and female prevalences measured within a trip:site
combination, which could be either positive or negative).

  So far this is not easily done in lme4::lmer.
#
Callie Baird <calliebaird at ...> writes:
1. I assume you don't mean that you're going to simulate with
negative variances (since, even accepting Jarrod's arguments about
when a negative _estimate_ of variance would be meaningful, it would
be hard to imagine a sensible way of _simulating_ with negative
variances) ...  if you're doing a simulation that includes cases with
negative variance estimates, that presumably means that you're going
to be exploring fitting as done by some software package (AS-REML,
SAS) that _does_ allow fitting of negative variances.  If so, why not
use those packages?

 2. As discussed elsewhere in this thread, negative variance estimates
would typically correspond to a case of negative within-group
correlations.  You can see whether the correlation parameter is
negative by fitting with pdCompSymm() (again, as mentioned elsewhere)
-- that would probably correspond to "negative variance cases" as
estimated by some other packages.  To me this seems reasonable, and
very much your best bet if you are going to stick with R and
nlme/lme4.

 3. It would be **very difficult** to modify the nlme or lme4 code to
allow for negative variances -- they're simply not set up in a way
that allows that case to make any sense.  lme4's code would probably
(figuratively) blow up if you tried to compute a deviance for a
negative variance; lme effectively fits the variances on a log scale
and would probably similarly blow up if you went to the (large) effort
of changing to a linear scale.

It's possible (???) that someone has written method-of-moments
variance estimators in some other R package that would either do what
you want or be modifiable, but I'm not aware of it.
#
Negative variance estimates can be very useful in alerting that the
variance-covariance structure is not what one expects.  Or they may
allow the simplest way of specifying the overall variance-covariance
structure, short of specifying the variance-covariance structure in
some detail.

I was told of an experiment where the experimenters had chosen 
blocks to be at right angles to the river bank, accordingly maximising
between plot variance.  This came to light, in data analysed away
from the scene of the original trial, when the block variance was
estimated as negative -- a very useful diagnostic.  Certainly, one can 
check on such a possibility by specifying a suitable variance-covariance 
structure, but how many analysts will take that trouble?

Or one has results from each of two eyes per person.  After allowing
for any systematic left/right difference, are two eyes from the same
individual more or less different than two eyes from different 
individuals?  I doubt that there is a general answer that applies to all
types of eye measurements.

The job of computer output, in my view, is to be as informative as
possible while keeping the output as terse as possible.

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
http://www.maths.anu.edu.au/~johnm
On 05/06/2013, at 1:44 AM, Ben Bolker <bbolker at gmail.com> wrote:

            
#
John Maindonald <john.maindonald at ...> writes:
I don't quite get the geometry you're talking about, but
I take the general point that diagnostics are good and that
one wouldn't necessarily think to consider negative correlation.
I find this one a little bit less convincing -- here it would
seem to be perfectly natural to fit a model that allowed for
positive or negative correlation.

  The fact remains that, whether or not it's a good idea,
 this is very hard to do in nlme/lme4 for
structural reasons. Luckily people are suggesting alternative
packages.  (Anyone who would like to edit 
http://glmm.wikidot.com/pkg-comparison accordingly is welcome
to do so ...)

  I don't think "how do I estimate negative variances?" has quite
risen to the level of a FAQ yet, so I won't bother adding it
to http://glmm.wikidot.com/faq (although again, if anyone wants
to take the initiative to do so I wouldn't complain).

    Ben Bolker
#
A variance components model that has a variance structure 

  block variance + plot (within block) variance + subplot (within plot) variance

makes sense only if blocks take out some part of the variation, i.e., variation
between plots within blocks is (in the absence of treatment effects) smaller
than variation between plots in different blocks.  Similarly for subplots
within/between plots.  

If on the contrary, there is more variation between between plots within blocks
than between plots in different blocks (this is likely to happen if there is a 
nutrient or fertility or moisture gradient within blocks), then a model that has
the form on the second line above will if allowed account for this by returning
a negative block component of variance estimate.  It does this in order to get
a plausible variance-covariance structure.

Of course, once a gradient has been identified, it can be accommodated in the
model.  This does not however undo all the malign effects of an unfortunate
experimental design.

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Mathematics & Its Applications, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.
http://www.maths.anu.edu.au/~johnm
On 05/06/2013, at 11:05 AM, Ben Bolker <bbolker at gmail.com> wrote: