Re: [R] level significance

From: Bernardo Rangel Tura <tura_at_centroin.com.br>
Date: Sun, 09 Dec 2007 08:04:17 -0200

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

______________________________________________
R-help_at_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.
Received on Sun 09 Dec 2007 - 10:14:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Dec 2007 - 11:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.