[R] calculate residue by groups

2007-10-24 Thread Jiong Zhang, PhD
Hi Folks, I want to get the regression residue which each Race. But using: sample$resid - by(sample,sample$Race),function(x)resid(lm( stroke ~ Sex + Age + Smoker + BMI, data = x))) Does not work. How do I calculate residue by grops? thanks. jiong The email message (and any attachments) is for

[R] how to get the sample size in lm

2007-10-11 Thread Jiong Zhang, PhD
Hi All, How do I get the sample size in lm? I know it is not reported by summary. Thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}} __ R-help@r-project.org mailing list

[R] save lm output into vectors

2007-10-10 Thread Jiong Zhang, PhD
Hi, May I ask how I can save the coefficients and the p values into a table? thanks. jiong The email message (and any attachments) is for the sole...{{dropped:11}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help