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

View source: R/loglikelihood.R

get_alpha_mtR Documentation

Get mixing weights alpha_mt (this function is for internal use)

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

get_alpha_mt(
  M,
  log_mvnvalues,
  alphas,
  epsilon,
  conditional,
  to_return,
  also_l_0 = FALSE
)

Arguments

M
For GMAR and StMAR models:

a positive integer specifying the number of mixture components.

For G-StMAR models:

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

log_mvnvalues

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.

to_return

should the returned object be the log-likelihood value, mixing weights, mixing weights including value for alpha_{m,T+1}, a list containing log-likelihood value and mixing weights, the terms l_{t}: t=1,..,T in the log-likelihood function (see KMS 2015, eq.(13)), the densities in the terms, regimewise conditional means, regimewise conditional variances, total conditional means, total conditional variances, or quantile residuals?

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. (2015).

Value

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

References

  • Galbraith, R., Galbraith, J. 1974. On the inverses of some patterned matrices arising in the theory of stationary time series. Journal of Applied Probability 11, 63-71.

  • Kalliovirta L. (2012) Misspecification tests based on quantile residuals. The Econometrics Journal, 15, 358-393.

  • Kalliovirta L., Meitz M. and Saikkonen P. 2015. Gaussian Mixture Autoregressive model for univariate time series. Journal of Time Series Analysis, 36(2), 247-266.

  • Meitz M., Preve D., Saikkonen P. 2023. A mixture autoregressive model based on Student's t-distribution. Communications in Statistics - Theory and Methods, 52(2), 499-515.

  • Virolainen S. 2022. A mixture autoregressive model based on Gaussian and Student's t-distributions. Studies in Nonlinear Dynamics & Econometrics, 26(4) 559-580.

See Also

loglikelihood_int


uGMAR documentation built on Aug. 19, 2023, 5:10 p.m.