heavy (version 0.38.196)

heavyLm.fit: Fitter functions for linear models under heavy-tailed distributions

Description

These are basic computing functions called by heavyLm used to fit linear models considering heavy-tailed errors. These should usually not be used directly unless by experienced users.

Usage

heavyLm.fit(x, y, family = Student(df = 4), control = heavy.control())

heavyMLm.fit(x, y, family = Student(df = 4), control = heavy.control())

Arguments

x

design matrix of dimension n-by-p.

y

vector of observations of length n, or a matrix with n rows.

family

a description of the error distribution to be used in the model. By default the Student-t distribution with 4 degrees of freedom is considered.

control

a list of control values for the estimation algorithm to replace the default values returned by the function heavy.control.

Value

a list with components

family

the heavy.family object used, with the estimated shape parameters (if requested).

coefficients

p vector or a matrix with p rows.

sigma2

scale estimate of the random error (only available for univariate regression models).

Sigma

estimate of scatter matrix for each row of the response matrix (only available for objects of class "heavyMLm").

residuals

n vector or matrix

fitted.values

n vector or matrix

weights

estimated weights corresponding to the assumed heavy-tailed distribution.

distances

squared of scaled residuals or Mahalanobis distances.

acov

asymptotic covariance matrix of the coefficients estimates.

logLik

the log-likelihood at convergence.

See Also

heavyLm which you should use for multivariate or univariate linear regression under heavy-tailed distributions unless you know better.

Examples

Run this code
# NOT RUN {
# univariate linear regression
data(ereturns)
x <- cbind(1, ereturns$CRSP)
colnames(x) <- c("Intercept", "CRSP")
y <- ereturns$m.marietta
z <- heavyLm.fit(x = x, y = y)

# multivariate linear regression
data(dialyzer)
y <- as.matrix(dialyzer[,1:4])
n <- nrow(y)
x <- matrix(1, nrow = n, ncol = 1) # a vector of ones
z <- heavyMLm.fit(x = x, y = y)
# }

Run the code above in your browser using DataCamp Workspace