1

I'm struggling to extract F-values and/or p-values from an ANOVA with all random effects or an ANOVA with both mixed and random effects.

I would expect to be able to get F- and p-values regarding the variance of the random effects based on the expected mean squares. Maybe the aov() function just doesn't return what I'm looking for? Or I'm specifying my model incorrectly?

Here's a simple example where I want to have cyl as a fixed effect and carb as a random effect:

data(mtcars)
summary(aov(formula = mpg ~ cyl + Error(carb), data = mtcars))

But no p-values for the random effect are reported.

Error: carb
    Df Sum Sq Mean Sq
cyl  1  341.8   341.8

Error: Within
          Df Sum Sq Mean Sq F value  Pr(>F)    
cyl        1  492.1   492.1   48.85 1.1e-07 ***
Residuals 29  292.2    10.1                    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Jeff Keller
  • 111
  • 1
  • 3
    This question appears to be off-topic because it is about statistics – Metrics Oct 07 '13 at 22:01
  • I think this question relates enough to the structure of ANOVA objects in R to remain here. – Señor O Oct 07 '13 at 22:06
  • 1
    You really ought to post the output. I think a p-value _is_ reported, even though I question whether it should be. What do you think that `Pr(>F)` is doing there. (Agree should be closed. No programming issues here. Just a need for further statistical education.) – DWin Oct 07 '13 at 22:08
  • 1
    You do not get $p$-values of a random effect generally speaking. You can test its significant with a LR-test using a mixture of $\chi^2$ distributions (Self & Liang, 1987) but I wouldn't recommended it. Information criteria (AIC, BIC, etc.), or (parametric?) bootstrapping probably will get you further. – usεr11852 Oct 08 '13 at 05:02

0 Answers0