gentp: Generate tuning parameters for variable selection in the...

Description Usage Arguments Value

View source: R/gentp.R

Description

Use a dynamic tuning parameter algorithm to generate lambads and taus in penalized likelihood estimation of the ZINB model.

Usage

1
2
3
gentp(y, X, nlambda = 30, ntau = 5, unpenalizedx = NULL,
  unpenalizedz = NULL, offsetx = NULL, offsetz = NULL, betaweight = 1,
  gammaweight = 1, pfactor = 0.01, penType = 1)

Arguments

y

zero-inflated count response

X

covariate matrix. Intercept is added within the function. This could take '1' as the input which indicates an intercept-only model.

nlambda

number of unique lambda and tau values - default are 30 and 5.

ntau

number of unique lambda and tau values - default are 30 and 5.

unpenalizedx

Additional unpenalized covariates for negative binomial and logistic regression respectively. Default is NULL.

unpenalizedz

Additional unpenalized covariates for negative binomial and logistic regression respectively. Default is NULL.

offsetx, offsetz

Two vector of observations that are included in the linear predictors of negative binomial regression and logistic regression respectively. Default are NULL.

betaweight, gammaweight

Weights of the coefficients for the penalization in negative binomial regression and logistic regression respectively. Default are 1.

pfactor

default is 1e-2. The multiplier for the largest calculated penalty to determine smallest penalty value. Use in conjunction with nlambda/ntau to control the granularity of the tp grid.

penType

options are 1 (default) or 2. 1 is the group log penalty. 2 is lasso.

Value

A matrix with two columns. Each row represents a pair of tuning parameters: lambda and tau.


yliu433/scZINB documentation built on Nov. 30, 2020, 9:07 p.m.