[R] multiple plots in the same graph

2006-11-03 Thread Li Zhang
I'd like to plot y vs x according to the third variable "group" which has three levels. I am wondering how can I put the three plots in one graph? Thank you (http://groups.yahoo.com) ___

[R] Predicted value at a new level in lm

2006-10-17 Thread Li Zhang
Y X Z 42.07.0 33.0 33.04.0 41.0 75.0 16.07.0 28.03.0 49.0 91.0 21.05.0 55.08.0 31.0 data<-read.table("d.txt",header=TRUE) mod<-lm(data$Y~data$X+data$Z) --- I would like to know the predict va

[R] Variance of Y_hat in a linear model

2006-10-17 Thread Li Zhang
Y X Z 42.07.0 33.0 33.04.0 41.0 75.0 16.07.0 28.03.0 49.0 91.0 21.05.0 55.08.0 31.0 data<-read.table("d.txt",header=TRUE) mod<-lm(data$Y~data$X+data$Z) predict(mod) 123456 44.6

[R] Variance of fitted value in lm

2006-10-16 Thread Li Zhang
Hi, I am wondering if a linear model lm(y~ x1+x2) calculates the variance of a fitted value. Thank you Li __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/

[R] Rank Function

2006-10-10 Thread Li Zhang
Does anyone know why the two rank functions gives different results? I need to use the rank function in a "for" loop, so the sequence to be ranked is given values in the form of part (1). How can I use assignment like in part (1) to get correct ranks as in part (2)? Thank You Part (1) i<-1.94 b