grouplasso_gt_cv_fixedgrid | R Documentation |
Choose tuning parameters by crossvalidation for grouplasso logreg when given a fixed grid of lambda values
grouplasso_gt_cv_fixedgrid( Y, Z, Se, Sp, X, groups, lambda.seq, n.folds, b.init.mat, w, tol = 0.001, maxiter = 500 )
Y |
Group testing output in the format as output by one of the functions |
Z |
Group testing output in the format as output by one of the functions |
Se |
A vector of testing sensitivities, where the first element is the testing specificity for pools and the second entry is the test specificity for individual testing, if applicable. |
Sp |
A vector of testing specificities, where the first element is the testing specificity for pools and the second entry is the test specificity for individual testing, if applicable. |
X |
matrix containing the design matrices |
groups |
a vector indicating to which group each covariate belongs |
lambda.seq |
sequence of lambda values |
n.folds |
the number of crossvalidation folds |
b.init.mat |
matrix of which the columns contain initial values for beta for the values of the tuning parameter in |
w |
group-specific weights for different penalization of different groups |
tol |
the convergence tolerance |
maxiter |
the maximum number of iterations allowed for each fit |
a list containing the fits over a grid of lambda values as well as the vector of lambda values
Note that the crossvalidation is carried out using the individual diagnoses as though they were the true individual disease statuses.
grouplasso_gt_data <- get_grouplasso_data(n = 1000, response = "gt") grouplasso_gt_grid.out <- grouplasso_gt_grid(Y = grouplasso_gt_data$Y$I, Z = grouplasso_gt_data$Y$A, Se = grouplasso_gt_data$Y$Se, Sp = grouplasso_gt_data$Y$Sp, X = grouplasso_gt_data$X, E.approx = grouplasso_gt_data$Y$E.approx, groups = grouplasso_gt_data$groups, n.lambda = 10, lambda.min.ratio = 0.01, lambda.max.ratio = 0.50, w = grouplasso_gt_data$w, tol = 1e-3, maxiter = 500, report.prog = TRUE) grouplasso_gt_cv_fixedgrid.out <- grouplasso_gt_cv_fixedgrid(Y = grouplasso_gt_data$Y$I, Z = grouplasso_gt_data$Y$A, Se = grouplasso_gt_data$Y$Se, Sp = grouplasso_gt_data$Y$Sp, X = grouplasso_gt_data$X, groups = grouplasso_gt_data$groups, lambda.seq = grouplasso_gt_grid.out$lambda.seq, n.folds = 5, b.init.mat = grouplasso_gt_grid.out$b.mat, w = grouplasso_gt_data$w, tol = 1e-3, maxiter = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.