title: How does glmnet standardize variables when weights are present?
body: <p>glmnet allows the user to input a vector of observation weights through the <code>weights</code> argument. glmnet also standardizes (by default) the predictor variables to have zero mean and unit variance. My question is: when <code>weights</code> is provided, does glmnet standardize the predictors using the weighted mean (and standard deviation) of each column or the unweighted mean (and standard deviation)?</p>