alt_gsmvar: Construct a GMVAR, StMVAR, or G-StMVAR model based on results...

Description Usage Arguments Details Value References See Also Examples

View source: R/GSMVARconstruction.R

Description

alt_gsmvar constructs a GMVAR, StMVAR, or G-StMVAR model based on results from an arbitrary estimation round of fitGSMVAR.

Usage

1
2
3
4
5
6
7
alt_gsmvar(
  gsmvar,
  which_round = 1,
  which_largest,
  calc_cond_moments = TRUE,
  calc_std_errors = TRUE
)

Arguments

gsmvar

an object of class 'gsmvar', typically created with fitGSMVAR or GSMVAR.

which_round

based on which estimation round should the model be constructed? An integer value in 1,...,ncalls.

which_largest

based on estimation round with which largest log-likelihood should the model be constructed? An integer value in 1,...,ncalls. For example, which_largest=2 would take the second largest log-likelihood and construct the model based on the corresponding estimates. If used, then which_round is ignored.

calc_cond_moments

should conditional means and covariance matrices should be calculated? Default is TRUE if the model contains data and FALSE otherwise.

calc_std_errors

should approximate standard errors be calculated?

Details

It's sometimes useful to examine other estimates than the one with the highest log-likelihood. This function is wrapper around GSMVAR that picks the correct estimates from an object returned by fitGSMVAR.

Value

Returns an object of class 'gsmvar' defining the specified reduced form or structural GMVAR, StMVAR, or G-StMVAR model. Can be used to work with other functions provided in gmvarkit.

Note that the first autocovariance/correlation matrix in $uncond_moments is for the lag zero, the second one for the lag one, etc.

References

See Also

fitGSMVAR, GSMVAR, iterate_more, update_numtols

Examples

1
2
3
4
5
# GMVAR(1,2) model
fit12 <- fitGSMVAR(gdpdef, p=1, M=2, ncalls=2, seeds=4:5)
fit12
fit12_2 <- alt_gsmvar(fit12, which_largest=2)
fit12_2

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