# fit_mvst: Estimate parameters of a multivariate (generalized... In fitHeavyTail: Mean and Covariance Matrix Estimation under Heavy Tails

 fit_mvst R Documentation

## Estimate parameters of a multivariate (generalized hyperbolic) skewed t distribution to fit data

### Description

Estimate parameters of a multivariate (generalized hyperbolic) skewed Student's t distribution to fit data, namely, the location vector, the scatter matrix, the skewness vector, and the degrees of freedom. The estimation is based on the maximum likelihood estimation (MLE) and the algorithm is obtained from the expectation-maximization (EM) method.

### Usage

``````fit_mvst(
X,
nu = NULL,
gamma = NULL,
initial = NULL,
max_iter = 500,
ptol = 0.001,
ftol = Inf,
PXEM = TRUE,
return_iterates = FALSE,
verbose = FALSE
)
``````

### Arguments

 `X` Data matrix containing the multivariate time series (each column is one time series). `nu` Degrees of freedom of the skewed `t` distribution (otherwise it will be iteratively estimated). `gamma` Skewness vector of the skewed `t` distribution (otherwise it will be iteratively estimated). `initial` List of initial values of the parameters for the iterative estimation method. Possible elements include: `nu`: default is `4`, `mu`: default is the data sample mean, `gamma`: default is the sample skewness vector, `scatter`: default follows from the scaled sample covariance matrix, `max_iter` Integer indicating the maximum number of iterations for the iterative estimation method (default is `500`). `ptol` Positive number indicating the relative tolerance for the change of the variables to determine convergence of the iterative method (default is `1e-3`). `ftol` Positive number indicating the relative tolerance for the change of the log-likelihood value to determine convergence of the iterative method (default is `Inf`, so it is not active). Note that using this argument might have a computational cost as a convergence criterion due to the computation of the log-likelihood (especially when `X` is high-dimensional). `PXEM` Logical value indicating whether to use the parameter expansion (PX) EM method to accelerating the convergence. `return_iterates` Logical value indicating whether to record the values of the parameters (and possibly the log-likelihood if `ftol < Inf`) at each iteration (default is `FALSE`). `verbose` Logical value indicating whether to allow the function to print messages (default is `FALSE`).

### Details

This function estimates the parameters of a (generalized hyperbolic) multivariate Student's t distribution (`mu`, `scatter`, `gamma` and `nu`) to fit the data via the expectation-maximization (EM) algorithm.

### Value

A list containing (possibly) the following elements:

 `mu` Location vector estimate (not the mean). `gamma` Skewness vector estimate. `scatter` Scatter matrix estimate. `nu` Degrees of freedom estimate. `mean` Mean vector estimate: ` mean = mu + nu/(nu-2) * gamma` `cov` Covariance matrix estimate: ` cov = nu/(nu-2) * scatter + 2*nu^2 / (nu-2)^2 / (nu-4) * gamma*gamma'` `converged` Boolean denoting whether the algorithm has converged (`TRUE`) or the maximum number of iterations `max_iter` has been reached (`FALSE`). `num_iterations` Number of iterations executed. `cpu_time` Elapsed overall CPU time. `log_likelihood_vs_iterations` Value of log-likelihood over the iterations (if `ftol < Inf`). `iterates_record` Iterates of the parameters (`mu`, `scatter`, `nu`, and possibly `log_likelihood` (if `ftol < Inf`)) along the iterations (if `return_iterates = TRUE`). `cpu_time_at_iter` Elapsed CPU time at each iteration (if `return_iterates = TRUE`).

### Author(s)

Rui Zhou, Xiwen Wang, and Daniel P. Palomar

### References

Aas Kjersti and Ingrid Hobæk Haff. "The generalized hyperbolic skew Student’s t-distribution," Journal of financial econometrics, pp. 275-309, 2006.

`fit_mvt`

### Examples

``````library(mvtnorm)       # to generate heavy-tailed data
library(fitHeavyTail)

# parameter setting
N <- 5
T <- 200
nu <- 6
mu <- rnorm(N)
scatter <- diag(N)
gamma <- rnorm(N)   # skewness vector

# generate GH Skew t data
taus <- rgamma(n = T, shape = nu/2, rate = nu/2)
X <- matrix(data = mu, nrow = T, ncol = N, byrow = TRUE) +
matrix(data = gamma, nrow = T, ncol = N, byrow = TRUE) / taus +
rmvnorm(n = T, mean = rep(0, N), sigma = scatter) / sqrt(taus)

# fit skew t model
fit_mvst(X)

# setting lower limit for nu (e.g., to guarantee existence of co-skewness and co-kurtosis matrices)
options(nu_min = 8.01)
fit_mvst(X)

``````

fitHeavyTail documentation built on May 1, 2023, 5:21 p.m.