Low-level implementations of ei_ridge()
and ei_riesz()
Source: R/ei_ridge.R
, R/ei_riesz.R
ei-impl.Rd
No checks are performed on the inputs.
Use of ei_ridge()
and ei_riesz()
is strongly recommended unless many
regressions must be fit, e.g., within a tight loop.
Only works for a single outcome, i.e., y
must be a vector, not a matrix.
Arguments
- x
A matrix of predictors
- y
A vector of outcomes
- z
A matrix of covariates
- weights
A vector of estimation weights
- bounds
A vector
c(min, max)
of bounds for the outcome.- penalty
The ridge penalty (a non-negative scalar), which must be specified for
ei_riesz_impl()
but can be automatically estimated withei_ridge_impl()
by providingpenalty=NULL
.- vcov
If
TRUE
, calculate and return the covariance matrix of the estimated coefficients. Ignored whenbounds
are provided.- total
A vector of total observations per unit.