get_alpha_mt: Get mixing weights alpha_mt (this function is for internal...

Description Usage Arguments Details Value References See Also

View source: R/loglikelihood.R

Description

get_alpha_mt computes the mixing weights based on the logarithm of the multivariate normal densities in the definition of the mixing weights.

Usage

1
get_alpha_mt(M, log_mvdvalues, alphas, epsilon, conditional, also_l_0 = FALSE)

Arguments

M
For GMVAR and StMVAR models:

a positive integer specifying the number of mixture components.

For G-StMVAR models:

a size (2x1) integer vector specifying the number of GMVAR type components M1 in the first element and StMVAR type components M2 in the second element. The total number of mixture components is M=M1+M2.

log_mvdvalues

T x M matrix containing the log multivariate normal densities.

alphas

M x 1 vector containing the mixing weight pa

epsilon

the smallest number such that its exponent is wont classified as numerically zero (around -698 is used).

conditional

a logical argument specifying whether the conditional or exact log-likelihood function should be used.

also_l_0

return also l_0 (the first term in the exact log-likelihood function)?

Details

Note that we index the time series as -p+1,...,0,1,...,T as in Kalliovirta et al. (2016).

Value

Returns the mixing weights a matrix of the same dimension as log_mvdvalues so that the t:th row is for the time point t and m:th column is for the regime m.

References

@keywords internal

See Also

loglikelihood_int


saviviro/gmvarkit documentation built on Oct. 25, 2021, 2:14 a.m.