Skip to content

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

1 message · David Freedman

#
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