profile_logliks {gmvarkit} | R Documentation |
Plot profile log-likehoods around the estimates
Description
profile_logliks
plots profile log-likelihoods around the estimates.
Usage
profile_logliks(
gsmvar,
which_pars,
scale = 0.02,
nrows,
ncols,
precision = 200,
stat_tol = 0.001,
posdef_tol = 1e-08,
df_tol = 1e-08
)
Arguments
gsmvar |
an object of class |
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...
Above, 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 |
nrows |
how many rows should be in the plot-matrix? The default is |
ncols |
how many columns should be in the plot-matrix? The default is |
precision |
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 |
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. |
df_tol |
the parameter vector is considered to be outside the parameter space if all degrees of
freedom parameters are not larger than |
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.
Value
Only plots to a graphical device and doesn't return anything.
References
Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.
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.
Virolainen S. (forthcoming). A statistically identified structural vector autoregression with endogenously switching volatility regime. Journal of Business & Economic Statistics.
Virolainen S. 2022. Gaussian and Student's t mixture vector autoregressive model with application to the asymmetric effects of monetary policy shocks in the Euro area. Unpublished working paper, available as arXiv:2109.13648.
See Also
get_soc
, diagnostic_plot
, fitGSMVAR
, GSMVAR
,
GIRF
, LR_test
, Wald_test
, cond_moment_plot
Examples
# Running all the below examples takes approximately 2 minutes.
# GMVAR(1,2) model
fit12 <- fitGSMVAR(gdpdef, p=1, M=2, ncalls=1, seeds=1)
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.55, 0.11, 0.62, 0.17, 0.34, 0.05, -0.01, 0.72, 0.25,
0.02, -0.14, 0.86, 0.54, 0.06, -0.16, 0.16, 3.62, 4.73, 0.67)
mod12s <- GSMVAR(gdpdef, p=1, M=2, params=params12s,
structural_pars=list(W=W_122))
profile_logliks(mod12s)
#' # G-StMVAR(2, 1, 1), d=2 model:
params22gs <- c(0.697, 0.154, 0.049, 0.374, 0.476, 0.318, -0.645, -0.302,
-0.222, 0.193, 0.042, -0.013, 0.048, 0.554, 0.033, 0.184, 0.005, -0.186,
0.683, 0.256, 0.031, 0.026, 0.204, 0.583, -0.002, 0.048, 0.182, 4.334)
mod22gs <- GSMVAR(gdpdef, p=2, M=c(1, 1), params=params22gs, model="G-StMVAR")
profile_logliks(mod22gs, which_pars=c(1, 3, 28))