For balanced mixed-models the varcompci package computes method-of-moments variance estimates, I think.

SL


________________________________
 De : Ben Bolker <bbolker@gmail.com>
À : r-sig-mixed-models@r-project.org 
Envoyé le : Mardi 4 juin 2013 23h28
Objet : Re: [R-sig-ME] Negative Variance


Callie Baird <calliebaird@...> writes:

> 
> I would like to analyze the results of allowing negative variance as part
> of a simulation study, to understand if and how the negative variance 
> cases
> differ from the convergent cases.
> 
> If there is no way to do so already written, does anyone have
>  an idea how I
> might alter the code to allow negative variance estimates?
> 
> Thanks,
> 
> Rachel Baird

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.

_______________________________________________
R-sig-mixed-models@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
	[[alternative HTML version deleted]]

