> hi: sorry to bother you all again. I am running a simple lm(y~x+z) > regression, in which some of the observations are missing. > Unfortunately, the residuals vector from the lm object omits all the > missing values, which means that I cannot simply do residual > diagnostics (e.g., plot(y,x)). Would it not make more sense to have > the residuals propagate the missing values, so that the residuals > are guaranteed to have the same length as the variables? > Alternatively, maybe the residuals() function could do this instead. > But the documentation is not clear:
I had a similar situation, and Brian Ripley said to me: If you have missing data in your data frame and want residuals for all observations, you need to use na.action=na.exclude, not the default na.omit. -- Ajay Shah Consultant [EMAIL PROTECTED] Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html