Dear All,
 
I wonderif there is a simple way to draw  a regression line in  the xyplot:
more specifically, let:
 
age <- c(20:30, 31:40 )
age.cut <- cut(age, breaks = 2 )
y<- rnorm(20)
x <- rnorm(20,4,1)
 

xyplot(y  ~  x| age.cut, xlab="x", ylab="y")

 

How to draw (in the plot given by xyplot)  the two  regression lines (y ~ x) 
corresponding to the two category of age.cut ?

 

Thanks a lot,

 

Bernard

 


                
---------------------------------


        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to