construct_penfacs {sparselink} | R Documentation |
Construct penalty factors
Description
Uses internal and external weights as well as internal and external exponents or factors for these weights to construct penalty factors.
Usage
construct_penfacs(w_int, w_ext, v_int, v_ext, type)
Arguments
w_int |
internal weights:
numeric vector of length |
w_ext |
external weights:
numeric vector of length |
v_int |
exponent or factor for internal weights: non-negative scalar |
v_ext |
exponent or factor for external weights: non-negative scalar |
type |
scaling of weights:
character |
Details
While internal weights are from the problem of interest ("supported" problem), external weights are from the other problems ("supporting" problems).
Multiple options exist for scaling prior weights:
-
"exp"
:w_{int}^{v_{int}}+w_{ext}^{v_{ext}}
-
"ari"
:v_{int} w_{int} + v_{ext} w_{ext}
-
"geo"
:w_{int}^{v_{int}} w_{ext}^{v_{ext}}
-
"rem"
:w_{int}^{v_{int}}+w_{ext}^{v_{ext}}-\mathbb{I}(v_{int}=0)-\mathbb{I}(v_{ext}=0))
The constrained versions "exp.con"
, "ari.con"
,
"geo.con"
, and "rem.con"
impose v_{int}+v_{ext}=1
.
The penalty factors are the inverse weights.
Suggested choices are "exp"
for predictivity
and "ari.con"
for interpretability.
Value
Returns a vector of length q
(non-negative entries).
See Also
Use construct_weights
to obtain w_int
and w_ext
.
Examples
n <- 10
w_int <- stats::runif(n)
w_ext <- stats::runif(n)
construct_penfacs(w_int,w_ext,v_int=0.5,v_ext=0.5,type="exp")