Learn R Programming

L1pack (version 0.52)

LaplaceFit: Estimation of location and scatter using the multivariate Laplace distribution

Description

Estimates the location vector and scatter matrix assuming the data came from a multivariate Laplace distribution.

Usage

LaplaceFit(x, data, subset, na.action, tol = 1e-6, maxiter = 200)

Value

A list with class 'LaplaceFit' containing the following components:

call

a list containing an image of the LaplaceFit call that produced the object.

center

final estimate of the location vector.

Scatter

final estimate of the scale matrix.

logLik

the log-likelihood at convergence.

numIter

the number of iterations used in the iterative algorithm.

weights

estimated weights corresponding to the Laplace distribution.

distances

estimated squared Mahalanobis distances.

Generic function print show the results of the fit.

Arguments

x

a formula or a numeric matrix or an object that can be coerced to a numeric matrix.

data

an optional data frame (or similar: see model.frame), used only if x is a formula. By default the variables are taken from environment(formula).

subset

an optional expression indicating the subset of the rows of data that should be used in the fitting process.

na.action

a function that indicates what should happen when the data contain NAs.

tol

the relative tolerance in the iterative algorithm.

maxiter

maximum number of iterations. The default is 200.

References

Yavuz, F.G., Arslan, O. (2018). Linear mixed model with Laplace distribution (LLMM). Statistical Papers 59, 271-289.

See Also

Examples

Run this code
fit <- LaplaceFit(stack.x)
fit

# covariance matrix
p <- fit$dims[2]
Sigma <- (4 * (p + 1)) * fit$Scatter
Sigma

Run the code above in your browser using DataLab