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

View source: R/grouplasso2pop.R

grouplasso2pop_gtR Documentation

Compute group lasso for two populations with group testing data

Description

Compute group lasso for two populations with group testing data

Usage

grouplasso2pop_gt(
  Y1,
  Z1,
  Se1,
  Sp1,
  X1,
  groups1,
  E.approx1 = FALSE,
  Y2,
  Z2,
  Se2,
  Sp2,
  X2,
  groups2,
  E.approx2 = FALSE,
  rho1,
  rho2,
  lambda,
  eta,
  w1,
  w2,
  w,
  AA1,
  AA2,
  Com,
  tol = 0.001,
  maxiter = 1000,
  init = NULL,
  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 the first data set

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 the second data set

rho1

weight placed on the first data set

rho2

weight placed on the second data set

lambda

the level of sparsity penalization

eta

the level of penalization towards model similarity

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)

init

a list of initial values for the coefficient for each of the two data sets

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 semiparametric additive model with group testing data

Examples

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

grouplassogr2pop.out <- grouplasso2pop_gt(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,
                                          lambda = 1,
                                          eta = 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.