fit_mvt {fitHeavyTail} | R Documentation |
Estimate parameters of a multivariate Student's t distribution to fit data
Description
Estimate parameters of a multivariate Student's t distribution to fit data, namely, the mean vector, the covariance matrix, the scatter matrix, and the degrees of freedom. The data can contain missing values denoted by NAs. It can also consider a factor model structure on the covariance matrix. The estimation is based on the maximum likelihood estimation (MLE) and the algorithm is obtained from the expectation-maximization (EM) method.
Usage
fit_mvt(
X,
na_rm = TRUE,
nu = c("iterative", "kurtosis", "MLE-diag", "MLE-diag-resampled", "cross-cumulants",
"all-cumulants", "Hill"),
nu_iterative_method = c("POP", "OPP", "OPP-harmonic", "ECME", "ECM", "POP-approx-1",
"POP-approx-2", "POP-approx-3", "POP-approx-4", "POP-exact", "POP-sigma-corrected",
"POP-sigma-corrected-true"),
initial = NULL,
optimize_mu = TRUE,
weights = NULL,
scale_covmat = FALSE,
PX_EM_acceleration = TRUE,
nu_update_start_at_iter = 1,
nu_update_every_num_iter = 1,
factors = ncol(X),
max_iter = 100,
ptol = 0.001,
ftol = Inf,
return_iterates = FALSE,
verbose = FALSE
)
Arguments
X |
Data matrix containing the multivariate time series (each column is one time series). |
na_rm |
Logical value indicating whether to remove observations with some NAs (default is |
nu |
Degrees of freedom of the
|
nu_iterative_method |
String indicating the method for iteratively estimating
|
initial |
List of initial values of the parameters for the iterative estimation method (in case
|
optimize_mu |
Boolean indicating whether to optimize |
weights |
Optional weights for each of the observations (the length should be equal to the number of rows of X). |
scale_covmat |
Logical value indicating whether to scale the scatter and covariance matrices to minimize the MSE
estimation error by introducing bias (default is |
PX_EM_acceleration |
Logical value indicating whether to accelerate the iterative method via
the PX-EM acceleration technique (default is |
nu_update_start_at_iter |
Starting iteration (default is 1) for
iteratively estimating |
nu_update_every_num_iter |
Frequency (default is 1) for
iteratively estimating |
factors |
Integer indicating number of factors (default is |
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 |
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 multivariate Student's t distribution (mu
,
cov
, scatter
, and nu
) to fit the data via the expectation-maximization (EM) algorithm.
The data matrix X
can contain missing values denoted by NAs.
The estimation of nu
if very flexible: it can be directly passed as an argument (without being estimated),
it can be estimated with several one-shot methods (namely, "kurtosis"
, "MLE-diag"
,
"MLE-diag-resampled"
), and it can also be iteratively estimated with the other parameters via the EM
algorithm.
Value
A list containing (possibly) the following elements:
mu |
Mu vector estimate. |
scatter |
Scatter matrix estimate. |
nu |
Degrees of freedom estimate. |
mean |
Mean vector estimate: mean = mu |
cov |
Covariance matrix estimate: cov = nu/(nu-2) * scatter |
converged |
Boolean denoting whether the algorithm has converged ( |
num_iterations |
Number of iterations executed. |
cpu_time |
Elapsed CPU time. |
B |
Factor model loading matrix estimate according to |
psi |
Factor model idiosynchratic variances estimates according to |
log_likelihood_vs_iterations |
Value of log-likelihood over the iterations (if |
iterates_record |
Iterates of the parameters ( |
Author(s)
Daniel P. Palomar and Rui Zhou
References
Chuanhai Liu and Donald B. Rubin, "ML estimation of the t-distribution using EM and its extensions, ECM and ECME," Statistica Sinica (5), pp. 19-39, 1995.
Chuanhai Liu, Donald B. Rubin, and Ying Nian Wu, "Parameter Expansion to Accelerate EM: The PX-EM Algorithm," Biometrika, Vol. 85, No. 4, pp. 755-770, Dec., 1998
Rui Zhou, Junyan Liu, Sandeep Kumar, and Daniel P. Palomar, "Robust factor analysis parameter estimation," Lecture Notes in Computer Science (LNCS), 2019. <https://arxiv.org/abs/1909.12530>
Esa Ollila, Daniel P. Palomar, and Frédéric Pascal, "Shrinking the Eigenvalues of M-estimators of Covariance Matrix," IEEE Trans. on Signal Processing, vol. 69, pp. 256-269, Jan. 2021. <https://doi.org/10.1109/TSP.2020.3043952>
Frédéric Pascal, Esa Ollila, and Daniel P. Palomar, "Improved estimation of the degree of freedom parameter of multivariate t-distribution," in Proc. European Signal Processing Conference (EUSIPCO), Dublin, Ireland, Aug. 23-27, 2021. <https://doi.org/10.23919/EUSIPCO54536.2021.9616162>
See Also
fit_Tyler
, fit_Cauchy
, fit_mvst
,
nu_OPP_estimator
, and nu_POP_estimator
Examples
library(mvtnorm) # to generate heavy-tailed data
library(fitHeavyTail)
X <- rmvt(n = 1000, df = 6) # generate Student's t data
fit_mvt(X)
# setting lower limit for nu
options(nu_min = 4.01)
fit_mvt(X, nu = "iterative")