[R] Glmnet Variable Questions

Paul Bleicher
Thu, 23 Jun 2011 16:31:19 -0000

Hi all,?

I have two questions about variables in glmnet:
?
1. We are doing a logistic regression with binary outcome variable using a
set of predictors that include continuous and binary predictors(coded 0 and
1). ?If the latter are centered and standardized, they will be transformed
into negative and positive numbers; when multiplied by a single beta, I
believe they will have undesirable effects. ?Is there a way to standardize
only specified variables? ?Alternatively, should glmnet be run with manually
centered and standardized continuous variables, binary variables coded 0 and
1, and with standardize = FALSE.
?
2. We have predictors with missing values. ?We have been handling these by
creating a dummy variable for the predictor with a value of 0 if a value is
present and 1 if a value is absent. ?If the model is forced to include both
the predictor and the dummy variable, the model-assigned coefficient will
effectively "interpolate" for the missing value. ?How can I force the
dummy
variable to be included in glmnet whenever the predictor variable is
included?

--
View this message in context:
http://r.789695.n4.nabble.com/Glmnet-Variable-Questions-tp3620379p3620379.html
Sent from the R help mailing list archive at Nabble.com.