[R] level significance

Bernardo Rangel Tura tura at centroin.com.br
Sun Dec 9 11:04:17 CET 2007


On Sat, 2007-12-08 at 22:51 +0100, Irene Mantzouni wrote:
> Hi all!
>  
> I am fitting a (mixed) model with a factor (F) and continuous response and predictor:
> y~F+F:x
>  
> (How) can I check the significance of the model at each factor level (i.e. the model could be significant only at one of the levels)?
>  
> Thank you!

Irene

If I understand your doubt is necessary only use a summary command.

Example
set.seed(123)
x<-rnorm(300,sd=2)
F<-sample(rep(letters[1:3],100))
y<-rnorm(300,mean=2,sd=1.5)
model<-lm(y~F+F:x)
summary(model)

(..)
Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  2.118128   0.151543  13.977   <2e-16 ***
Fb          -0.052866   0.213729  -0.247    0.805    
Fc          -0.229110   0.213726  -1.072    0.285    
Fa:x         0.036987   0.074549   0.496    0.620    
Fb:x         0.059439   0.083823   0.709    0.479    
Fc:x         0.003769   0.082373   0.046    0.964    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
(...)

In this case only the Intercept is significant

-- 
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil



More information about the R-help mailing list