Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
327 views
in Technique[技术] by (71.8m points)

r - Using the weight argument with cv.glmnet: how are weights rescaled to sum to N?

After performing multiple imputation with PMM and chained equations (M=30), I am attempting to use cv.glmnet() with the weights argument. I am using individual-level weights to address both the differing levels of predictor missingness among participants prior to imputation and the artificially inflated sample size from the imputations. Weights are individual-level, defined as w = {proportion of non-missing predictors for that individual}/M. In other words, with M=30 imputations, the weights across an individual's M=30 entries sum to {proportion of non-missing predictors of that individual}. Here is the model call:

lasso_mod <- cv.glmnet(predictors, mi_derived$outcome, weights=mi_derived$w,
                   family="binomial", nfolds=10, alpha=1, foldid=mi_derived$k, standardize=FALSE)

I am choosing not to standardize predictors, as I already standardized prior to imputation (see Wan et al. 2015 Variable selection models based on multiple imputation with an application for predicting median effective dose and maximum effect for justification). Regardless, I obtain the same issues described below whether I standardize or not.

My model call selects 90% of predictors, despite models on individual imputations selecting only 20-40% of predictors. Furthermore, I get identical results between model calls with weights as defined above and with weights defined as {proportion of non-missing predictors of that individual}.

I understand that glmnet automatically re-scales the inputted weights to sum to the sample size N. How exactly does glmnet scale these inputted weights to sum to N? I am concerned that this re-scaling is the source of my unexpected results - both too many predictors chosen and the identical results between calls with distinct weights.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...