
Last chance! 50% off unlimited learning
Sale ends in
These helper functions transform model parameters between
constrained spaces (suffix *Con
)
and unconstrained spaces (suffix *Uncon
).
The former is useful for interpretation, the latter for unconstrained optimization.
par2parUncon(par, controls, use_parameter_labels = TRUE)parUncon2parCon(parUncon, controls, use_parameter_labels = TRUE)
parCon2par(parCon, controls, use_parameter_labels = TRUE)
par2parCon(par, controls, use_parameter_labels = TRUE)
parCon2parUncon(parCon, controls, use_parameter_labels = TRUE)
parUncon2par(parUncon, controls, use_parameter_labels = TRUE)
muCon2muUncon(muCon, link, prefix = "muUncon_", use_parameter_labels = TRUE)
muUncon2muCon(muUncon, link, prefix = "muCon_", use_parameter_labels = TRUE)
sigmaCon2sigmaUncon(
sigmaCon,
prefix = "sigmaUncon_",
use_parameter_labels = TRUE
)
sigmaUncon2sigmaCon(
sigmaUncon,
prefix = "sigmaCon_",
use_parameter_labels = TRUE
)
dfCon2dfUncon(dfCon, prefix = "dfUncon_", use_parameter_labels = TRUE)
dfUncon2dfCon(dfUncon, prefix = "dfCon_", use_parameter_labels = TRUE)
Gamma2gammasCon(
Gamma,
shift = 0.001,
prefix = "gammasCon_",
use_parameter_labels = TRUE
)
Gamma2gammasUncon(Gamma, prefix = "gammasUncon_", use_parameter_labels = TRUE)
gammasCon2Gamma(gammasCon, dim, prefix = "state_", use_parameter_labels = TRUE)
gammasCon2gammasUncon(
gammasCon,
dim,
prefix = "gammasUncon_",
use_parameter_labels = TRUE
)
gammasUncon2Gamma(
gammasUncon,
dim,
prefix = "state_",
use_parameter_labels = TRUE
)
gammasUncon2gammasCon(
gammasUncon,
dim,
prefix = "gammasCon_",
use_parameter_labels = TRUE
)
For par2parUncon
: a vector of unconstrained model parameters.
For parUncon2parCon
: a vector of constrained model parameters.
For parCon2par
: an object of class fHMM_parameters
.
For par2parCon
: a vector of constrained model parameters.
For parCon2parUncon
: a vector of unconstrained model parameters.
For parUncon2par
: an object of class fHMM_parameters
.
For muCon2muUncon
: a vector of unconstrained expected values.
For muUncon2muCon
: a vector of constrained expected values.
For sigmaCon2sigmaUncon
: a vector of unconstrained standard
deviations.
For sigmaUncon2sigmaCon
: a vector of constrained standard deviations.
For dfCon2dfUncon
: a vector of unconstrained degrees of freedom.
For dfUncon2dfCon
: a vector of constrained degrees of freedom.
For Gamma2gammasCon
: a vector of constrained non-diagonal matrix
elements (column-wise).
For Gamma2gammasUncon
: a vector of unconstrained non-diagonal matrix
elements (column-wise).
For gammasCon2Gamma
: a transition probability matrix.
For gammasCon2gammasUncon
: a vector of unconstrained non-diagonal
elements of the transition probability matrix.
For gammasUncon2Gamma
: a transition probability matrix.
For gammasUncon2gammasCon
: a vector of constrained non-diagonal
elements of a transition probability matrix.
An object of class fHMM_parameters
, which is a list
of model parameters.
Either a list
or an object of class fHMM_controls
.
The list
can contain the following elements, which are described
in more detail below:
hierarchy
, defines an hierarchical HMM,
states
, defines the number of states,
sdds
, defines the state-dependent distributions,
horizon
, defines the time horizon,
period
, defines a flexible, periodic fine-scale time horizon,
data
, a list
of controls that define the data,
fit
, a list
of controls that define the model fitting
Either none, all, or selected elements can be specified.
Unspecified parameters are set to their default values, see below.
Specifications in controls
override individual specifications.
Either TRUE
to label the parameters or FALSE
, if not (this can
save computation time).
An object of class parUncon
, which is a numeric
vector
with identified and unconstrained model parameters in the following order:
non-diagonal transition probabilities gammasUncon
expectations muUncon
standard deviations sigmaUncon
(if any)
degrees of freedom dfUncon
(if any)
fine-scale parameters for each coarse-scale state, in the same order (if any)
An object of class parCon
, which is a numeric
vector
with identified (and constrained) model parameters in the following order:
non-diagonal transition probabilities gammasCon
expectations muCon
standard deviations sigmaCon
(if any)
degrees of freedom dfCon
(if any)
fine-scale parameters for each coarse-scale state, in the same order (if any)
A vector of (un-) constrained expected values.
Either TRUE
or FALSE
, determining whether to apply the link
function.
A character
prefix for labeling the parameters.
A vector of (un-) constrained standard deviations.
A vector of (un-) constrained degrees of freedom.
A small, positive numeric
for shifting boundary probabilities.
By default, shift = 1e-3
.
A vector of (un-) constrained non-diagonal transition probabilities.
An integer
, the dimension of the transition probability matrix.