I have a data frame which has lots of variables and I want to use elastic net in order to reduce the dimensionality, but each variable has also NAs present in it (missing values).
What I've done is to calculate decile-bins in each variable (10 or less bins in each variable - depends on the value range) and then transform each variable into a categorical variable where each observation will be replaced with the bin range it belongs to. My question is - I am still left with NAs, only now it is a category.
glmnet cannot work with NAs being present in the data frame so I was thinking to replace those NAs by some arbitrary value (e.g., 99).
Can I do that? Will it affect the dimension reduction process carried out by Elastic Net?