| upper | R Documentation |
Set a upper bound on the coefficient of specific covariates.
upper(kvars)
kvars |
a named vector giving the upper bounds. The names should correspond to the names of the covariates in the model matrix. |
A holistic generalized model constraint, object inheriting from class "hglmc".
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")}
Other Constraint-Constructors:
group_equal(),
group_inout(),
group_sparsity(),
include(),
k_max(),
linear(),
lower(),
pairwise_sign_coherence(),
rho_max(),
sign_coherence()
dat <- rhglm(100, c(1, 2, -3, 4, 5, -6))
constraints <- upper(c(x1 = 0, x4 = 1))
hglm(y ~ ., constraints = constraints, data = dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.