fit_mvst {fitHeavyTail} | 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 |
gamma |
Skewness vector of the skewed |
initial |
List of initial values of the parameters for the iterative estimation method. Possible elements include:
|
max_iter |
Integer indicating the maximum number of iterations for the iterative estimation
method (default is |
ptol |
Positive number indicating the relative tolerance for the change of the variables
to determine convergence of the iterative method (default is |
ftol |
Positive number indicating the relative tolerance for the change of the log-likelihood
value to determine convergence of the iterative method (default is |
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 |
verbose |
Logical value indicating whether to allow the function to print messages (default is |
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 ( |
num_iterations |
Number of iterations executed. |
cpu_time |
Elapsed overall CPU time. |
log_likelihood_vs_iterations |
Value of log-likelihood over the iterations (if |
iterates_record |
Iterates of the parameters ( |
cpu_time_at_iter |
Elapsed CPU time at each iteration (if |
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.
See Also
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)