grouplasso2pop_gt_grid: Compute group lasso for two populations with group testing...

View source: R/grouplasso2pop.R

grouplasso2pop_gt_gridR Documentation

Compute group lasso for two populations with group testing data over a grid of tuning parameter values

Description

Compute group lasso for two populations with group testing data over a grid of tuning parameter values

Usage

grouplasso2pop_gt_grid(
  Y1,
  Z1,
  Se1,
  Sp1,
  X1,
  groups1,
  E.approx1 = FALSE,
  Y2,
  Z2,
  Se2,
  Sp2,
  X2,
  groups2,
  E.approx2 = FALSE,
  rho1,
  rho2,
  n.lambda,
  n.eta,
  lambda.min.ratio,
  lambda.max.ratio = 1,
  eta.min.ratio = 0.001,
  eta.max.ratio = 10,
  w1,
  w2,
  w,
  AA1,
  AA2,
  Com,
  tol = 0.001,
  maxiter = 1000,
  report.prog = TRUE
)

Arguments

Y1

Group testing output for data set 1 in the format as output by one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

Z1

Group testing output for data set 1 in the format as output by one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

Se1

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.

Sp1

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.

X1

the matrix with the observed covariate values for data set 1 (including a column of ones for the intercept)

groups1

a vector indicating to which group each covariate of data set 2 belongs

E.approx1

a logical indicating whether the conditional expectations in the E-step should be computed approximately or exactly for data set 1

Y2

Group testing output for data set 2 in the format as output by one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

Z2

Group testing output for data set 2 in the format as output by one of the functions individual.assay.gen, masterpool.assay.gen, dorfman.assay.gen, or array.assay.gen.

Se2

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.

Sp2

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.

X2

the matrix with the observed covariate values for data set 2 (including a column of ones for the intercept)

groups2

a vector indicating to which group each covariate of data set 2 belongs

E.approx2

a logical indicating whether the conditional expectations in the E-step should be computed approximately or exactly for data set 2

rho1

weight placed on the first data set

rho2

weight placed on the second data set

n.lambda

the number of lambda values

n.eta

the number of eta values

lambda.min.ratio

ratio of the smallest lambda value to the smallest value of lambda which admits no variables to the model

lambda.max.ratio

ratio of the largest lambda value to the smallest value of lambda which admits no variables to the model

eta.min.ratio

ratio of the smallest to largest value in the sequence of eta values

eta.max.ratio

controls the largest value of eta in the eta sequence

w1

group-specific weights for different penalization across groups in data set 1

w2

group-specific weights for different penalization across groups in data set 2

w

group-specific weights for different penalization toward similarity for different groups

AA1

a list of the matrices A2j

Com

the indices of the covariate groups which are common in the two datasets

tol

a convergence criterion

maxiter

the maximum allowed number of iterations (EM steps)

report.prog

a logical. If TRUE then the number of inner loops required to complete the M step of the EM algorithm are returned after each EM step.

Value

Returns the estimator of the parametric model with group testing data

Examples

grouplasso2pop_gt_data <- get_grouplasso2pop_data( n1 = 1000, n2 = 1200, response = "gt")

grouplasso2pop_gt_grid.out <- grouplasso2pop_gt_grid(Y1 = grouplasso2pop_gt_data$Y1$I,
                                                     Z1 = grouplasso2pop_gt_data$Y1$A,
                                                     Se1 = grouplasso2pop_gt_data$Y1$Se,
                                                     Sp1 = grouplasso2pop_gt_data$Y1$Sp,
                                                     X1 = grouplasso2pop_gt_data$X1,
                                                     groups1 = grouplasso2pop_gt_data$groups1,
                                                     E.approx1 = grouplasso2pop_gt_data$Y1$E.approx,
                                                     Y2 = grouplasso2pop_gt_data$Y2$I,
                                                     Z2 = grouplasso2pop_gt_data$Y2$A,
                                                     Se2 = grouplasso2pop_gt_data$Y2$Se,
                                                     Sp2 = grouplasso2pop_gt_data$Y2$Sp,
                                                     X2 = grouplasso2pop_gt_data$X2,
                                                     groups2  = grouplasso2pop_gt_data$groups2,
                                                     E.approx2 = grouplasso2pop_gt_data$Y2$E.approx,
                                                     rho1 = 1,
                                                     rho2 = 1,
                                                     n.lambda = 10,
                                                     n.eta = 5,
                                                     lambda.min.ratio = 0.01,
                                                     lambda.max.ratio = 0.50,
                                                     eta.min.ratio = 0.01,
                                                     eta.max.ratio = 1,
                                                     w1 = grouplasso2pop_gt_data$w1,
                                                     w2 = grouplasso2pop_gt_data$w2,
                                                     w = grouplasso2pop_gt_data$w,
                                                     AA1 = grouplasso2pop_gt_data$AA1,
                                                     AA2 = grouplasso2pop_gt_data$AA2,
                                                     Com = grouplasso2pop_gt_data$Com,
                                                     tol = 1e-3,
                                                     maxiter = 500,
                                                     report.prog = TRUE)

gregorkb/semipadd2pop documentation built on Oct. 2, 2022, 1:37 p.m.