4
votes

How does glmnet in the R package 'glmnet' handle NA values?

Or can it not tolerate NA values?

1
the data needs to be complete - user20650

1 Answers

10
votes

glmnet doesn't handle missing values. Either you have to keep only those records that are complete. e.g. with complete.cases() or do some imputation on your missing values with packages like mice, mi, amelia, etc etc.

You could have a look at this post which discusses handling missing values and glmnet.