k_max function

Constraint on the Number of Covariates

Constraint on the Number of Covariates

Constraint on the maximum number of covariates to be used in the model.

k_max(k)

Arguments

  • k: an positive integer with kkmaxk \leq k_{max} giving the maximum number of covariates to be used in the model.

Returns

A holistic generalized model constraint, object inheriting from class "hglmc".

Note

  • If an intercept is used, the upper bound on kmax+1k_{max} + 1 is given by number of columns of the model matrix.
  • If no intercept is used, the upper bound on kmaxk_{max} is given by number of columns of the model matrix.

Examples

dat <- rhglm(100, c(1, 2, -3, 4, 5, -6)) hglm(y ~ ., constraints = k_max(3), data = dat)

See Also

Other Constraint-Constructors: group_equal(), group_inout(), group_sparsity(), include(), linear(), lower(), pairwise_sign_coherence(), rho_max(), sign_coherence(), upper()

  • Maintainer: Benjamin Schwendinger
  • License: GPL-3
  • Last published: 2024-12-20

Useful links