Skip to content
Prev 218807 / 398500 Next

help wiht model.matrix -- how to keep missing values?

I'm not sure what to do with model.matrix, but you might look at some of the
code for ols in the rms package.  The rms package (from frank harrell), has
several options for keeping the NAs in the output from regression models so
that residuals are correctly aligned.

hth
david freedman