View source: R/generateParams.R
smart_weightpars | R Documentation |
smart_weightpars
generates random transition weight parameter values
relatively close to the ones given in weight_pars
smart_weightpars(
M,
weight_pars,
weight_function = c("relative_dens", "logistic", "mlogit", "exponential", "threshold",
"exogenous"),
weight_constraints = NULL,
accuracy
)
M |
a positive integer specifying the number of regimes |
weight_pars |
a vector containing transition weight parameter values.
|
weight_function |
What type of transition weights
See the vignette for more details about the weight functions. |
weight_constraints |
a list of two elements, |
accuracy |
a positive real number adjusting how close to the given parameter vector the returned individual should be. Larger number means larger accuracy. Read the source code for details. |
Returns a numeric vector ...
weight_function == "relative_dens"
:a length M-1
vector (\alpha_1,...,\alpha_{M-1})
.
weight_function == "logistic"
:a length two vector (c,\gamma)
,
where c\in\mathbb{R}
is the location parameter and \gamma >0
is the scale parameter.
weight_function == "mlogit"
:a length ((M-1)k\times 1)
vector (\gamma_1,...,\gamma_{M-1})
,
where \gamma_m
(k\times 1)
, m=1,...,M-1
contains the mlogit-regression coefficients of the m
th
regime. Specifically, for switching variables with indices in I\subset\lbrace 1,...,d\rbrace
, and with
\tilde{p}\in\lbrace 1,...,p\rbrace
lags included, \gamma_m
contains the coefficients for the vector
z_{t-1} = (1,\tilde{z}_{\min\lbrace I\rbrace},...,\tilde{z}_{\max\lbrace I\rbrace})
, where
\tilde{z}_{i} =(y_{it-1},...,y_{it-\tilde{p}})
, i\in I
. So k=1+|I|\tilde{p}
where |I|
denotes the number of elements in I
.
weight_function == "exponential"
:a length two vector (c,\gamma)
,
where c\in\mathbb{R}
is the location parameter and \gamma >0
is the scale parameter.
weight_function == "threshold"
:a length M-1
vector (r_1,...,r_{M-1})
,
where r_1,...,r_{M-1}
are the threshold values in an increasing order.
weight_function == "exogenous"
:of length zero.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.