50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


sstvars (version 1.2.0)

get_alpha_mt: Get the transition weights alpha_mt

Description

get_alpha_mt computes the transition weights.

Usage

get_alpha_mt(
  data,
  Y2,
  p,
  M,
  d,
  weight_function = c("relative_dens", "logistic", "mlogit", "exponential", "threshold",
    "exogenous"),
  weightfun_pars = NULL,
  all_A,
  all_boldA,
  all_Omegas,
  weightpars,
  all_mu,
  epsilon,
  log_mvdvalues = NULL
)

Value

Returns the mixing weights a (TxM) matrix, so that the tth row is for the time period t

and m:th column is for the regime m.

Arguments

data

a matrix or class 'ts' object with d>1 columns. Each column is taken to represent a univariate time series. Missing values are not supported.

Y2

the data arranged as obtained from reform_data(data, p) but excluding the last row

p

a positive integer specifying the autoregressive order

M

a positive integer specifying the number of regimes

d

the number of time series in the system, i.e., the dimension

weight_function

What type of transition weights αm,t should be used?

"relative_dens":

αm,t=αmfm,dp(yt1,...,ytp+1)n=1Mαnfn,dp(yt1,...,ytp+1), where αm(0,1) are weight parameters that satisfy m=1Mαm=1 and fm,dp() is the dp-dimensional stationary density of the mth regime corresponding to p consecutive observations. Available for Gaussian conditional distribution only.

"logistic":

M=2, α1,t=1α2,t, and α2,t=[1+exp{γ(yitjc)}]1, where yitj is the lag j observation of the ith variable, c is a location parameter, and γ>0 is a scale parameter.

"mlogit":

αm,t=exp{γmzt1}n=1Mexp{γnzt1}, where γm are coefficient vectors, γM=0, and zt1 (k×1) is the vector containing a constant and the (lagged) switching variables.

"exponential":

M=2, α1,t=1α2,t, and α2,t=1exp{γ(yitjc)}, where yitj is the lag j observation of the ith variable, c is a location parameter, and γ>0 is a scale parameter.

"threshold":

αm,t=1 if rm1<yitjrm and 0 otherwise, where r0<r1<<rM1<rM are thresholds yitj is the lag j observation of the ith variable.

"exogenous":

Exogenous nonrandom transition weights, specify the weight series in weightfun_pars.

See the vignette for more details about the weight functions.

weightfun_pars
If weight_function == "relative_dens":

Not used.

If weight_function %in% c("logistic", "exponential", "threshold"):

a numeric vector with the switching variable i{1,...,d} in the first and the lag j{1,...,p} in the second element.

If weight_function == "mlogit":

a list of two elements:

The first element $vars:

a numeric vector containing the variables that should used as switching variables in the weight function in an increasing order, i.e., a vector with unique elements in {1,...,d}.

The second element $lags:

an integer in {1,...,p} specifying the number of lags to be used in the weight function.

If weight_function == "exogenous":

a size (nrow(data) - p x M) matrix containing the exogenous transition weights as [t, m] for time t and regime m. Each row needs to sum to one and only weakly positive values are allowed.

all_A

4D array containing all coefficient matrices Am,i, obtained from pick_allA.

all_boldA

3D array containing the ((dp)x(dp)) "bold A" (companion form) matrices of each regime, obtained from form_boldA. Will be computed if not given.

all_Omegas

A 3D array containing the covariance matrix parameters obtain from pick_Omegas...

If cond_dist %in% c("Gaussian", "Student"):

all covariance matrices Ωm in [, , m].

If cond_dist=="ind_Student":

all impact matrices Bm of the regimes in [, , m].

weightpars

numerical vector containing the transition weight parameters, obtained from pick_weightpars.

all_mu

an (d×M) matrix containing the unconditional regime-specific means

epsilon

the smallest number such that its exponent is wont classified as numerically zero (around -698 is used).

log_mvdvalues

a (T×M) matrix containing log multivariate normal densities (can be used with relative dens weight function only)

Details

Note that we index the time series as p+1,...,0,1,...,T.

References

  • Kheifets I.L., Saikkonen P.J. 2020. Stationarity and ergodicity of Vector STAR models. Econometric Reviews, 39:4, 407-414.

  • Lütkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.

  • 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.

  • Virolainen S. 2025. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.

@keywords internal