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 the sole...{{dropped:11}}

