ind_Student_densities_Cpp {sstvars} | R Documentation |
Calculate log independent multivariate Student's t densities
Description
Calculates logs of independent multivariate Student t densities with varying mean and impact matrix AND EXCLUDING the constant term of the density (the constant is calculated and added in R code). The varying impact matrix is calculated within the function from the impact matrices of the regimes and transition weights.
Usage
ind_Student_densities_Cpp(
obs,
means,
impact_matrices,
alpha_mt,
distpars,
minval,
posdef_tol
)
Arguments
obs |
a |
means |
a |
impact_matrices |
a size |
alpha_mt |
a |
distpars |
a numeric vector of length |
minval |
the value that will be returned if the parameter vector does not lie in the parameter space (excluding the identification condition). |
posdef_tol |
numerical tolerance for positive definiteness of the error term covariance matrices: if the error term covariance matrix of any regime has eigenvalues smaller than this, the parameter is considered to be outside the parameter space. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error. |
Details
Returns minval
if the impact matrix B_t
is not invertible for some t up to the numerical tolerance
posdef_tol
.
Value
A numeric vector of length T
, where each element represents the computed density component for
the corresponding observation.