upper: Upper Bound

View source: R/constraints.R

upperR Documentation

Upper Bound

Description

Set a upper bound on the coefficient of specific covariates.

Usage

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.

Value

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

References

McDonald, J. W., & Diamond, I. D. (1990). On the Fitting of Generalized Linear Models with Nonnegativity Parameter Constraints. Biometrics, 46 (1): 201–206. \Sexpr[results=rd]{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. \Sexpr[results=rd]{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()

Examples

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


holiglm documentation built on April 3, 2025, 7:09 p.m.