Learn R Programming

gmvarkit (version 1.4.1)

profile_logliks: Plot profile log-likehoods around the estimates

Description

profile_logliks plots profile log-likelihoods around the estimates.

Usage

profile_logliks(
  gmvar,
  which_pars,
  scale = 0.02,
  nrows,
  ncols,
  precission = 200,
  stat_tol = 0.001,
  posdef_tol = 1e-08
)

Arguments

gmvar

an object of class 'gmvar' created with fitGMVAR or GMVAR.

which_pars

the profile log-likelihood function of which parameters should be plotted? An integer vector specifying the positions of the parameters in the parameter vector. The parameter vector has the form...

For unconstrained models:

Should be size \(((M(pd^2+d+d(d+1)/2+1)-1)x1)\) and have form \(\theta\)\( = \)(\(\upsilon\)\(_{1}\), ...,\(\upsilon\)\(_{M}\), \(\alpha_{1},...,\alpha_{M-1}\)), where:

  • \(\upsilon\)\(_{m}\) \( = (\phi_{m,0},\)\(\phi\)\(_{m}\)\(,\sigma_{m})\)

  • \(\phi\)\(_{m}\)\( = (vec(A_{m,1}),...,vec(A_{m,p})\)

  • and \(\sigma_{m} = vech(\Omega_{m})\), m=1,...,M.

For constrained models:

Should be size \(((M(d+d(d+1)/2+1)+q-1)x1)\) and have form \(\theta\)\( = (\phi_{1,0},...,\phi_{M,0},\)\(\psi\) \(,\sigma_{1},...,\sigma_{M},\alpha_{1},...,\alpha_{M-1})\), where:

  • \(\psi\) \((qx1)\) satisfies (\(\phi\)\(_{1}\)\(,...,\) \(\phi\)\(_{M}) =\) \(C \psi\). Here \(C\) is \((Mpd^2xq)\) constraint matrix.

Above, \(\phi_{m,0}\) is the intercept parameter, \(A_{m,i}\) denotes the \(i\):th coefficient matrix of the \(m\):th mixture component, \(\Omega_{m}\) denotes the error term covariance matrix of the \(m\):th mixture component, and \(\alpha_{m}\) is the mixing weight parameter.

The default is that profile log-likelihood functions for all parameters are plotted.

scale

a numeric scalar specifying the interval plotted for each estimate: the estimate plus-minus abs(scale*estimate).

nrows

how many rows should be in the plot-matrix? The default is max(ceiling(log2(length(which_pars)) - 1), 1).

ncols

how many columns should be in the plot-matrix? The default is ceiling(length(which_pars)/nrows). Note that nrows*ncols should not be smaller than the length of which_pars.

precission

at how many points should each profile log-likelihood be evaluated at?

stat_tol

numerical tolerance for stationarity of the AR parameters: if the "bold A" matrix of any regime has eigenvalues larger that 1 - stat_tol the model is classified as non-stationary. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

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 model is classified as not satisfying positive definiteness assumption. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

Value

Only plots to a graphical device and doesn't return anything.

Details

When the number of parameters is large, it might be better to plot a smaller number of profile log-likelihood functions at a time using the argument which_pars.

The red vertical line points the estimate.

References

  • Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.

  • L<U+00FC>tkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.

  • McElroy T. 2017. Computation of vector ARMA autocovariances. Statistics and Probability Letters, 124, 92-96.

  • Virolainen S. 2020. Structural Gaussian mixture vector autoregressive model. Unpublished working paper, available as arXiv:2007.04713.

See Also

get_soc, diagnostic_plot, fitGMVAR, GMVAR, GIRF, LR_test, Wald_test, cond_moment_plot

Examples

Run this code
# NOT RUN {
# Running all the below examples takes approximately 2 minutes.

# These examples use the data 'eurusd' which comes with the
# package, but in a scaled form (similar to Kalliovirta et al. 2016).
data(eurusd, package="gmvarkit")
data <- cbind(10*eurusd[,1], 100*eurusd[,2])
colnames(data) <- colnames(eurusd)

# GMVAR(1,2) model
fit12 <- fitGMVAR(data, p=1, M=2, ncalls=1, seeds=7)
fit12
profile_logliks(fit12)

# Structural GMVAR(1,2) model identified with sign
# constraints: model build based on inaccurate hand-given estimates.
W_122 <- matrix(c(1, 1, -1, 1), nrow=2)
params12s <- c(0.62, -0.13, 3.25, 7.92, 0.96, 0.09, -0.01, 1.01, 0.95, -0.04,
               -0.02, 0.94, 1.31, 0.88, -0.16, 2.24, 4, 1.8, 0.79)
fit12s <- GMVAR(data, p=1, M=2, params=params12s,
                structural_pars=list(W=W_122))
profile_logliks(fit12s)
# }

Run the code above in your browser using DataLab