Dear all,

 I'm using the latest version of the package lme4 and R version 2.7.2
(2008-08-25).

After I run the model, I get the results of the model (cf. below). Then, I
run an ANOVA using the "anova" function and I get the following message
"Error in anova(lmer1) : Calculated PWRSS for a LMM is negative".

 I went trough the R-mailing list and a similar error message was reported
but only when using "weights". As I did not use "weights" in my model, I was
wondering what could cause this error message!

Thanks in advance for any advice,

 Sebastien.

R-Console

> (lmer1=lmer(ano$qf~ano$p3+(ano$p3|ano$cxx)+(ano$cxx|ano$id)))
Linear mixed model fit by REML
Formula: ano$qf ~ ano$p3 + (ano$p3 | ano$cxx) + (ano$cxx | ano$id)
   AIC   BIC logLik deviance REMLdev
 34167 34670 -16995    34029   33991
Random effects:
 Groups   Name         Variance Std.Dev.
Corr

 ano$id   (Intercept)  605250
777.98

          ano$cxxcII   674734   821.42
-0.648

          ano$cxxcIII  603555   776.89   -0.279
0.181
          ano$cxxcIV   484725   696.22    0.288 -0.187
-0.080
          ano$cxxcIX   699289   836.24    0.401 -0.260 -0.113
0.115
          ano$cxxcV    642216   801.38   -0.387  0.251  0.108 -0.111
-0.155
          ano$cxxcVI   602526   776.23   -0.433  0.281  0.121 -0.125 -0.173
0.167
          ano$cxxcVII  352721   593.90   -0.491  0.318  0.137 -0.141 -0.196
0.190  0.212
          ano$cxxcVIII 851755   922.91   -0.746  0.484  0.208 -0.215 -0.299
0.289  0.323  0.366
          ano$cxxcX    499538   706.78   -0.189  0.122  0.053 -0.054 -0.075
0.073  0.082  0.093  0.141
          ano$cxxcXI   513851   716.83   -0.125  0.081  0.035 -0.036 -0.050
0.048  0.054  0.061  0.093  0.023
          ano$cxxcXII  802332   895.73   -0.658  0.427  0.184 -0.190 -0.264
0.254  0.285  0.323  0.491  0.124  0.082
 ano$cxx  (Intercept)  251374
501.37

          ano$p32       12140   110.18
-0.866

          ano$p33       48679   220.63   -0.874
0.757
 Residual              150767
388.29

Number of obs: 2238, groups: ano$id, 254; ano$cxx, 12

Fixed effects:
            Estimate Std. Error t value
(Intercept)  76748.8      312.9  245.28
ano$p32      -1343.0      409.3   -3.28
ano$p33      -3054.5      349.6   -8.74

Correlation of Fixed Effects:
        (Intr) an$p32
ano$p32 -0.764
ano$p33 -0.895  0.684
> anova(lmer1)
Error in anova(lmer1) : Calculated PWRSS for a LMM is negative


Sebastien.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to