PWLS | R Documentation |
This is a functions to estimate coefficients of wighted leat-squares model and select variables for multiple imputed data sets ,considering the correlation of multiple imputed observations.
PWLS(
missdata,
mice_time = 5,
penalty = "alasso",
lamda.vec = seq(6, 24, length.out = 40),
Gamma = c(0.5, 1, 2)
)
missdata |
A Matrix,missing data with variables X in the first p columns and response Y at the last column. |
mice_time |
An intedevger, number of imputation. |
penalty |
The method for variable selection,choose from "lasso" or "alasso". |
lamda.vec |
Optimal tuning parameter for penalty,default seq(1,4,length.out=12). |
Gamma |
Parameter for adjustment of the Adaptive Weights vector in adaptive LASSO,default c(0.5,1,1.5). |
A Vsmi_est object, contians estcoef and index_sig , estcoef for estimate coefficients and index_sig for selected variable index.
library(MASS)
library(mice)
library(qif)
entire<-generate_pwls_missing_data()
est_lasso<-PWLS(entire,penalty="lasso")
est_alasso <- PWLS(entire,penalty = "alasso")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.