Learn R Programming

sstvars (version 1.1.6)

pick_weightpars: Pick transition weight parameters

Description

pick_weightpars picks the transition weight parameters from the given parameter vector.

Usage

pick_weightpars(
  p,
  M,
  d,
  params,
  weight_function = c("relative_dens", "logistic", "mlogit", "exponential", "threshold",
    "exogenous"),
  weightfun_pars = NULL,
  cond_dist = c("Gaussian", "Student", "ind_Student", "ind_skewed_t")
)

Value

If weight_function = "relative_dens":

Returns a length \(M\) vector containing the transition weight parameters \(\alpha_{m}, m=1,...,M\), including the non-parametrized \(\alpha_{M}\).

weight_function="logistic":

Returns a length two vector \((c,\gamma)\), where \(c\in\mathbb{R}\) is the location parameter and \(\gamma >0\) is the scale parameter.

If weight_function = "mlogit":

Returns a length \((M-1)k\) vector \((\gamma_1,...,\gamma_M)\), where \(\gamma_m\) \((k\times 1)\), \(m=1,...,M-1\) (\(\gamma_M=0\)) contains the mlogit-regression coefficients of the \(m\)th regime. Specifically, for switching variables with indices in \(J\subset\lbrace 1,...,d\rbrace\), and with \(\tilde{p}\in\lbrace 1,...,p\rbrace\) lags included, \(\gamma_m\) contains the coefficients for the vector \(z_{t-1} = (1,\tilde{z}_{\min\lbrace I\rbrace},...,\tilde{z}_{\max\lbrace I\rbrace})\), where \(\tilde{z}_{i} =(y_{j,t-1},...,y_{j,t-\tilde{p}})\), \(i\in I\). So \(k=1+|I|\tilde{p}\) where \(|I|\) denotes the number of elements in \(I\).

weight_function="exponential":

Returns a length two vector \((c,\gamma)\), where \(c\in\mathbb{R}\) is the location parameter and \(\gamma >0\) is the scale parameter.

weight_function="threshold":

Returns a length \(M-1\) vector \((r_1,...,r_{M-1})\), where \(r_1,...,r_{M-1}\) are the threshold values.

weight_function="exogenous":

Returns numeric(0).

Arguments

p

the autoregressive order of the model

M

the number of regimes

d

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

params

a real valued vector specifying the parameter values. Should have the form \(\theta = (\phi_{1},...,\phi_{M},\varphi_1,...,\varphi_M,\sigma,\alpha,\nu)\), where (see exceptions below):

  • \(\phi_{m} = \) the \((d \times 1)\) intercept (or mean) vector of the \(m\)th regime.

  • \(\varphi_m = (vec(A_{m,1}),...,vec(A_{m,p}))\) \((pd^2 \times 1)\).

  • if cond_dist="Gaussian" or "Student":

    \(\sigma = (vech(\Omega_1),...,vech(\Omega_M))\) \((Md(d + 1)/2 \times 1)\).

    if cond_dist="ind_Student" or "ind_skewed_t":

    \(\sigma = (vec(B_1),...,vec(B_M)\) \((Md^2 \times 1)\).

  • \(\alpha = \) the \((a\times 1)\) vector containing the transition weight parameters (see below).

  • if cond_dist = "Gaussian"):

    Omit \(\nu\) from the parameter vector.

    if cond_dist="Student":

    \(\nu > 2\) is the single degrees of freedom parameter.

    if cond_dist="ind_Student":

    \(\nu = (\nu_1,...,\nu_d)\) \((d \times 1)\), \(\nu_i > 2\).

    if cond_dist="ind_skewed_t":

    \(\nu = (\nu_1,...,\nu_d,\lambda_1,...,\lambda_d)\) \((2d \times 1)\), \(\nu_i > 2\) and \(\lambda_i \in (0, 1)\).

For models with...

weight_function="relative_dens":

\(\alpha = (\alpha_1,...,\alpha_{M-1})\) \((M - 1 \times 1)\), where \(\alpha_m\) \((1\times 1), m=1,...,M-1\) are the transition weight parameters.

weight_function="logistic":

\(\alpha = (c,\gamma)\) \((2 \times 1)\), where \(c\in\mathbb{R}\) is the location parameter and \(\gamma >0\) is the scale parameter.

weight_function="mlogit":

\(\alpha = (\gamma_1,...,\gamma_M)\) \(((M-1)k\times 1)\), where \(\gamma_m\) \((k\times 1)\), \(m=1,...,M-1\) contains the multinomial logit-regression coefficients of the \(m\)th regime. Specifically, for switching variables with indices in \(I\subset\lbrace 1,...,d\rbrace\), and with \(\tilde{p}\in\lbrace 1,...,p\rbrace\) lags included, \(\gamma_m\) contains the coefficients for the vector \(z_{t-1} = (1,\tilde{z}_{\min\lbrace I\rbrace},...,\tilde{z}_{\max\lbrace I\rbrace})\), where \(\tilde{z}_{i} =(y_{it-1},...,y_{it-\tilde{p}})\), \(i\in I\). So \(k=1+|I|\tilde{p}\) where \(|I|\) denotes the number of elements in \(I\).

weight_function="exponential":

\(\alpha = (c,\gamma)\) \((2 \times 1)\), where \(c\in\mathbb{R}\) is the location parameter and \(\gamma >0\) is the scale parameter.

weight_function="threshold":

\(\alpha = (r_1,...,r_{M-1})\) \((M-1 \times 1)\), where \(r_1,...,r_{M-1}\) are the threshold values.

weight_function="exogenous":

Omit \(\alpha\) from the parameter vector.

identification="heteroskedasticity":

\(\sigma = (vec(W),\lambda_2,...,\lambda_M)\), where \(W\) \((d\times d)\) and \(\lambda_m\) \((d\times 1)\), \(m=2,...,M\), satisfy \(\Omega_1=WW'\) and \(\Omega_m=W\Lambda_mW'\), \(\Lambda_m=diag(\lambda_{m1},...,\lambda_{md})\), \(\lambda_{mi}>0\), \(m=2,...,M\), \(i=1,...,d\).

Above, \(\phi_{m}\) is the intercept parameter, \(A_{m,i}\) denotes the \(i\)th coefficient matrix of the \(m\)th regime, \(\Omega_{m}\) denotes the positive definite error term covariance matrix of the \(m\)th regime, and \(B_m\) is the invertible \((d\times d)\) impact matrix of the \(m\)th regime. \(\nu_m\) is the degrees of freedom parameter of the \(m\)th regime. If parametrization=="mean", just replace each \(\phi_{m}\) with regimewise mean \(\mu_{m}\).

weight_function

What type of transition weights \(\alpha_{m,t}\) should be used?

"relative_dens":

\(\alpha_{m,t}= \frac{\alpha_mf_{m,dp}(y_{t-1},...,y_{t-p+1})}{\sum_{n=1}^M\alpha_nf_{n,dp}(y_{t-1},...,y_{t-p+1})}\), where \(\alpha_m\in (0,1)\) are weight parameters that satisfy \(\sum_{m=1}^M\alpha_m=1\) and \(f_{m,dp}(\cdot)\) is the \(dp\)-dimensional stationary density of the \(m\)th regime corresponding to \(p\) consecutive observations. Available for Gaussian conditional distribution only.

"logistic":

\(M=2\), \(\alpha_{1,t}=1-\alpha_{2,t}\), and \(\alpha_{2,t}=[1+\exp\lbrace -\gamma(y_{it-j}-c) \rbrace]^{-1}\), where \(y_{it-j}\) is the lag \(j\) observation of the \(i\)th variable, \(c\) is a location parameter, and \(\gamma > 0\) is a scale parameter.

"mlogit":

\(\alpha_{m,t}=\frac{\exp\lbrace \gamma_m'z_{t-1} \rbrace} {\sum_{n=1}^M\exp\lbrace \gamma_n'z_{t-1} \rbrace}\), where \(\gamma_m\) are coefficient vectors, \(\gamma_M=0\), and \(z_{t-1}\) \((k\times 1)\) is the vector containing a constant and the (lagged) switching variables.

"exponential":

\(M=2\), \(\alpha_{1,t}=1-\alpha_{2,t}\), and \(\alpha_{2,t}=1-\exp\lbrace -\gamma(y_{it-j}-c) \rbrace\), where \(y_{it-j}\) is the lag \(j\) observation of the \(i\)th variable, \(c\) is a location parameter, and \(\gamma > 0\) is a scale parameter.

"threshold":

\(\alpha_{m,t} = 1\) if \(r_{m-1}<y_{it-j}\leq r_{m}\) and \(0\) otherwise, where \(-\infty\equiv r_0<r_1<\cdots <r_{M-1}<r_M\equiv\infty\) are thresholds \(y_{it-j}\) is the lag \(j\) observation of the \(i\)th 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\in\lbrace 1,...,d \rbrace\) in the first and the lag \(j\in\lbrace 1,...,p \rbrace\) 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 \(\lbrace 1,...,d \rbrace\).

The second element $lags:

an integer in \(\lbrace 1,...,p \rbrace\) 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.

cond_dist

specifies the conditional distribution of the model as "Gaussian", "Student", "ind_Student", or "ind_skewed_t", where "ind_Student" the Student's \(t\) distribution with independent components, and "ind_skewed_t" is the skewed \(t\) distribution with independent components (see Hansen, 1994).

Warning

No argument checks!