cov.trob.Rd
Estimates a covariance or correlation matrix assuming the data came from a multivariate t distribution: this provides some degree of robustness to outlier without giving a high breakdown point.
cov.trob(x, wt = rep(1, n), cor = FALSE, center = TRUE, nu = 5,
maxit = 25, tol = 0.01)
data matrix. Missing values (NAs) are not allowed.
A vector of weights for each case: these are treated as if the case i
actually occurred wt[i]
times.
Flag to choose between returning the correlation (cor = TRUE
) or
covariance (cor = FALSE
) matrix.
a logical value or a numeric vector providing the location about which
the covariance is to be taken. If center = FALSE
, no centering
is done; if center = TRUE
the MLE of the location vector is used.
‘degrees of freedom’ for the multivariate t distribution. Must exceed 2 (so that the covariance matrix is finite).
Maximum number of iterations in fitting.
Convergence tolerance for fitting.
A list with the following components
the fitted covariance matrix.
the estimated or specified location vector.
the specified weights: only returned if the wt
argument was given.
the number of cases used in the fitting.
the fitted correlation matrix: only returned if cor = TRUE
.
The matched call.
The number of iterations used.
J. T. Kent, D. E. Tyler and Y. Vardi (1994) A curious likelihood identity for the multivariate t-distribution. Communications in Statistics—Simulation and Computation 23, 441–453.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S-PLUS. Fourth Edition. Springer.
cov.trob(stackloss)
#> $cov
#> Air.Flow Water.Temp Acid.Conc. stack.loss
#> Air.Flow 60.47035 17.027203 18.554452 62.28032
#> Water.Temp 17.02720 8.085857 5.604132 20.50469
#> Acid.Conc. 18.55445 5.604132 24.404633 16.91085
#> stack.loss 62.28032 20.504687 16.910855 72.80743
#>
#> $center
#> Air.Flow Water.Temp Acid.Conc. stack.loss
#> 58.96905 20.79263 86.05588 16.09028
#>
#> $n.obs
#> [1] 21
#>
#> $call
#> cov.trob(x = stackloss)
#>
#> $iter
#> [1] 5
#>