aic.bic.eric.enetgt.grid | R Documentation |
Chooses tuning parameters via AIC, BIC, and ERIC.
aic.bic.eric.enetgt.grid(enetgt.grid.out, Z, X, Se, Sp, regime)
enetgt.grid.out |
List object returned by the function |
Z |
Group testing output from one of the functions |
X |
Design matrix with first column a column of 1s. |
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. |
regime |
Testing regime which must be equal to one of |
A list object including the tuning parameter combinations selected by AIC, BIC, and ERIC.
Computes the AIC, BIC and ERIC criteria over a grid of lambda, theta pairs coming from enetgt.grid.out
,
which is an object returned by enetgt.grid()
.
data <- model0(200) X <- data$X Y.true <- data$Y # subject individuals to individual testing Se <- c(.94) # individual testing sensitivities Sp <- c(.95) # individual testing specificities assay.data <- individual.assay.gen(Y.true,Se,Sp,cj=1) Z <- assay.data$Z Y <- assay.data$Y # compute the mle on the individual testing data: mlegt.out <- mlegt(X,Y,Z,Se,Sp,tol=.01) b.mle <- mlegt.out$b.mle # compute adaptive elastic net estimator over a grid of tuning parameter values n.lambda <- 8 n.theta <- 2 enetgt.grid.out <- enetgt.grid(X,Y,Z,Se,Sp,n.lambda,n.theta,weights = 1/abs(b.mle[-1]),tol=.01) # make choices of the tuning parameters according to the aic, bic, and eric criteria aic.bic.eric.enetgt.grid.out <- aic.bic.eric.enetgt.grid(enetgt.grid.out,Z,X,Se,Sp,"individual") b.aenet.aic <- aic.bic.eric.enetgt.grid.out$b.enet.aic b.aenet.bic <- aic.bic.eric.enetgt.grid.out$b.enet.bic b.aenet.eric <- aic.bic.eric.enetgt.grid.out$b.enet.eric b.aenet.aic b.aenet.bic b.aenet.eric
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.