admin管理员组

文章数量:1122846

I am trying to run a type 3 Anova without an intercept. lme4 automatically adds an intercept when I run a linear model. I have tried running the model and specifying removal of the intercept, but this adds a degree of freedom to variable 'pop' and dramatically increases the F value. Below is the model (A) before and (B) after I try intercept removal. I also attached screenshots of the Anova table (1) with and (2) without the intercept. Any help would be greatly appreciated!

(A) all <- lm(logbasal ~  pop*sex*zPL,  na.action = na.omit, data = totbmr)
(B) all <- lm(logbasal ~  pop*sex*zPL-1,  na.action = na.omit, data = totbmr)

(1)
Response: logbasal
            Sum Sq  Df   F value  Pr(>F)    
(Intercept) 67.388   1 4071.3329 < 2e-16 ***
pop          0.109   2    3.3032 0.04019 *  
sex          0.001   1    0.0346 0.85271    
zPL          0.000   1    0.0187 0.89147    
pop:sex      0.130   2    3.9156 0.02257 *  
pop:zPL      0.022   2    0.6642 0.51659    
sex:zPL      0.044   1    2.6283 0.10764    
pop:sex:zPL  0.097   2    2.9415 0.05667 .  
Residuals    1.953 118                    

(2)
Response: logbasal
             Sum Sq  Df   F value  Pr(>F)    
pop         148.486   3 2990.3318 < 2e-16 ***
sex           0.001   1    0.0346 0.85271    
zPL           0.000   1    0.0187 0.89147    
pop:sex       0.130   2    3.9156 0.02257 *  
pop:zPL       0.022   2    0.6642 0.51659    
sex:zPL       0.044   1    2.6283 0.10764    
pop:sex:zPL   0.097   2    2.9415 0.05667 .  
Residuals     1.953 118                

I have tried two different ways to remove the intercept and both ways increase degrees of freedom for variabel 'pop.' Additionally, I am comparing my outputs to those run by someone using SAS, and we are getting different results even with the same data set. In SAS, the intercept is not automatically added to type 3 Anovas.

本文标签: