profile_logliks function

Plot profile log-likelihood functions about the estimates

Plot profile log-likelihood functions about the estimates

profile_logliks plots profile log-likelihood functions about the estimates.

profile_logliks( stvar, which_pars, scale = 0.1, nrows, ncols, precision = 50, stab_tol = 0.001, posdef_tol = 1e-08, distpar_tol = 1e-08, weightpar_tol = 1e-08 )

Arguments

  • stvar: an object of class 'stvar', created by, e.g., fitSTVAR or fitSSTVAR.
  • 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...
  • 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.
  • precision: at how many points should each profile log-likelihood function be evaluated at?
  • stab_tol: numerical tolerance for stability of condition of the regimes: if the "bold A" matrix of any regime has eigenvalues larger that 1 - stat_tol the parameter is considered to be outside the parameter space. Note that if 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 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.
  • distpar_tol: the parameter vector is considered to be outside the parameter space if the degrees of freedom parameters is not larger than 2 + distpar_tol (applies only if cond_dist="Student").
  • weightpar_tol: numerical tolerance for weight parameters being in the parameter space. Values closer to to the border of the parameter space than this are considered to be "outside" the parameter space.

Returns

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.

Examples

# Threshold STVAR with p=1, M=2, the first lag of the second variable as switching variable: pars <- c(0.5231, 0.1015, 1.9471, 0.3253, 0.3476, 0.0649, -0.035, 0.7513, 0.1651, -0.029, -0.7947, 0.7925, 0.4233, 5e-04, 0.0439, 1.2332, -0.0402, 0.1481, 1.2036) mod12thres <- STVAR(data=gdpdef, p=1, M=2, params=pars, weight_function="threshold", weightfun_pars=c(2, 1)) # Plot the profile log-likelihood functions of all parameters: profile_logliks(mod12thres, precision=50) # Plots fast with precision=50 # Plot only the profile log-likelihood function of the threshold parameter # (which is the last parameter in the parameter vector): profile_logliks(mod12thres, which_pars=length(pars), precision=100) # Plot only the profile log-likelihood functions of the intercept parameters # (which are the first four parameters in the parameter vector, as d=2 and M=2): profile_logliks(mod12thres, which_pars=1:4, precision=100)

References

  • Anderson H., Vahid F. 1998. Testing multiple equation systems for common nonlinear components. Journal of Econometrics, 84 :1, 1-36.
  • Hansen B.E. 1994. Autoregressive Conditional Density estimation. Journal of Econometrics, 35 :3, 705-730.
  • Kheifets I.L., Saikkonen P.J. 2020. Stationarity and ergodicity of Vector STAR models. International Economic Review, 35 :3, 407-414.
  • Lanne M., Virolainen S. 2025. A Gaussian smooth transition vector autoregressive model: An application to the macroeconomic effects of severe weather shocks. Unpublished working paper, available as arXiv:2403.14216.
  • Lü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.
  • Kilian L., Lütkepohl H. 20017. Structural Vector Autoregressive Analysis. 1st edition. Cambridge University Press, Cambridge.
  • Tsay R. 1998. Testing and Modeling Multivariate Threshold Models. Journal of the American Statistical Association, 93 :443, 1188-1202.
  • Virolainen S. 2025. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.

See Also

get_foc, get_soc, diagnostic_plot

  • Maintainer: Savi Virolainen
  • License: GPL-3
  • Last published: 2025-02-27