Skip to contents

Uses gamlss::ri() (L1 penalty) in a gamlss(dist = BE) mean submodel to select variables. The helper works on complete cases of X/Y, targets the mean component, and does not yet expose offset handling.

Usage

betareg_lasso_gamlss(
  X,
  Y,
  method = c("ML", "GAIC"),
  k = 2,
  degf = NULL,
  lambda = NULL,
  trace = FALSE
)

Arguments

X

Numeric matrix (n × p) of mean-submodel predictors.

Y

Numeric response in (0,1). Values are squeezed to (0,1) internally.

method

"ML" or "GAIC" (see gamlss::ri).

k

Penalty multiplier for GAIC when method = "GAIC".

degf

Optional degrees of freedom for the L1 term.

lambda

Optional penalty strength.

trace

Logical; print stepwise trace.

Value

Named numeric vector of coefficients (Intercept) + colnames(X), with 0 for unselected variables.

Examples

set.seed(1); X <- matrix(rnorm(300), 100, 3); Y <- plogis(X[,1]); Y <- rbeta(100, Y*30, (1-Y)*30)
betareg_lasso_gamlss(X, Y, method = "GAIC", k = 2)
#>   (Intercept)            X1            X2            X3 
#>  9.964032e-02  8.139031e-01 -1.277365e-04  2.804953e-06