LaplaceFit | R Documentation |
Estimates the location vector and scatter matrix assuming the data came from a multivariate Laplace distribution.
LaplaceFit(x, data, subset, na.action, tol = 1e-6, maxiter = 200)
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 |
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. |
A list with class 'LaplaceFit'
containing the following components:
call |
a list containing an image of the |
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.
Yavuz, F.G., Arslan, O. (2018). Linear mixed model with Laplace distribution (LLMM). Statistical Papers 59, 271-289.
cov
fit <- LaplaceFit(stack.x)
fit
# covariance matrix
p <- fit$dims[2]
Sigma <- (4 * (p + 1)) * fit$Scatter
Sigma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.