upper function

Upper Bound

Upper Bound

Set a upper bound on the coefficient of specific covariates.

upper(kvars)

Arguments

  • kvars: a named vector giving the upper bounds. The names should correspond to the names of the covariates in the model matrix.

Returns

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

Examples

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

References

McDonald, J. W., & Diamond, I. D. (1990). On the Fitting of Generalized Linear Models with Nonnegativity Parameter Constraints. Biometrics, 46 (1): 201–206. tools:::Rd_expr_doi("10.2307/2531643")

Slawski, M., & Hein, M. (2013). Non-negative least squares for high-dimensional linear models: Consistency and sparse recovery without regularization. Electronic Journal of Statistics, 7: 3004-3056. tools:::Rd_expr_doi("10.1214/13-EJS868")

See Also

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

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

Useful links