Skip to content
Prev 350336 / 398506 Next

Predictions on training set shorter than training set

Are there missing values in your data?  If so, try adding
the argument
   na.action = na.exclude
to your original call to glm or lm.  It is like the default
na.omit except that it records which rows were omitted
(because they contained missing values) and fills in
the corresponding entries in the predictions, residuals, etc.
with NA's.

You can also set
   options(na.action = "na.exclude")
to make it the default na.action in lm() and similar functions.




Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Apr 23, 2015 at 10:23 AM, Mark Drummond <mark at markdrummond.ca>
wrote: