How does glmnet handle NA values?
Asked Answered
B

1

7

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

Or can it not tolerate NA values?

Bunion answered 21/7, 2015 at 1:8 Comment(1)
the data needs to be completeJustajustemilieu
S
14

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.

Sparoid answered 21/7, 2015 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.