Usage
# S3 method for class 'cv.corila'
coef(object, s = "lambda.min", ...)Arguments
- object
object of class
"cv.corila"- s
character
"lambda.min"or numeric non-negative scalar- ...
(for compatibility with stats::coef)
Value
Returns an \((1 + p)\)-dimensional vector of the estimated coefficients. The first entry is the estimated intercept, and the other \(p\) entries are the estimated slopes.
Details
This function calls .combine_slopes()
to combine positive and negative coefficients
and .backscale() to bring coefficients back to the original scale.
References
Armin Rauschenberger (2026). "Sparse modelling with grouped and correlated features allowing for privileged information". In preparation.
See also
Fit models with cv.corila()
and make predictions with predict().
Examples
# \donttest{
data <- simulate_data()
model <- cv.corila(x = data$x_train,
y = data$y_train,
group = data$group,
primary = data$primary)
#> wgt_local exp_local wgt_global exp_global threshold cvm
#> 2 0.1 0 0.9 2 0 10.40527
beta_hat <- coef(object = model)
y_hat <- predict(object = model, newx = data$x_test)
# }
# example for automatic mutation testing (with the R package autotest)
data <- simulate_data()
model <- cv.corila(x = data$x_train,
y = data$y_train,
group = as.double(data$group),
primary = data$primary,
alpha_init = 0.0,
foldid = rep(x = seq_len(10L),
length.out = nrow(data$x_train)))
#> wgt_local exp_local wgt_global exp_global threshold cvm
#> 11 1 0 0 Inf 0 10.19317