Description Usage Arguments Value References Examples
This function fits a linear mixed-effects model under heavy-tailed errors using the formulation described in Pinheiro et al. (2001).
1 2 |
fixed |
a two-sided linear formula object describing the fixed-effects part of the model, with the response on the left of a ~ operator and the terms, separated by + operators. |
random |
a one-sided formula of the form ~x1+...+xn specifying the model for the random effects. |
groups |
a one-sided formula for specifying the grouping variable. |
data |
an optional data frame containing the variables named in |
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. |
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. |
control |
a list of control values for the estimation algorithm to replace the default
values returned by the function |
An object of class heavyLme
representing the linear mixed-effects model fit. Generic function print
and summary
, show the results of the fit.
The following components must be included in a legitimate heavyLme
object.
lmeData |
an object representing a list of mixed-effects model components. |
call |
a list containing an image of the |
family |
the |
coefficients |
final estimate of the fixed effects. |
theta |
final estimate of the scale parameters associated to the random effects. |
scale |
final scale estimate of the random error. |
logLik |
the log-likelihood at convergence. |
numIter |
the number of iterations used in the iterative algorithm. |
ranef |
a matrix with the estimated random effects. |
weights |
estimated weights corresponding to the assumed heavy-tailed distribution. |
distances |
estimated squared Mahalanobis distances. |
Fitted |
a data frame with the |
Resid |
a data frame with the |
Pinheiro, J.C., Liu, C., and Wu, Y.N. (2001). Efficient algorithms for robust estimation in linear mixed-effects models using the multivariate t distribution. Journal of Computational and Graphical Statistics 10, 249–276.
1 2 3 4 5 6 7 8 9 | data(dental)
fm0 <- heavyLme(distance ~ age * Sex, random = ~ age, groups = ~ Subject,
data = dental, family = Student(df = 4))
summary(fm0)
# fitting model with fixed degrees of freedom
fm1 <- heavyLme(distance ~ age * Sex, random = ~ age, groups = ~ Subject,
data = dental, family = Student(df = 4), control = heavy.control(fix.shape = TRUE))
summary(fm1) # fixed at df = 4
|
Linear mixed-effects model under heavy-tailed distributions
Data: dental; Family: Student(df = 5.57571)
Log-likelihood: -213.6174
Random effects:
Formula: ~age; Groups: ~Subject
Scale matrix estimate:
(Intercept) age
(Intercept) 3.99479782
age -0.23905366 0.04887959
Within-Group scale parameter: 0.8829409
Fixed: distance ~ age * Sex
Estimate Std.Error Z-value p-value
(Intercept) 16.9819 1.6995 9.9922 0.0000
age 0.7170 0.1677 4.2765 0.0000
SexFemale 0.6798 2.6626 0.2553 0.7985
age:SexFemale -0.0678 0.2627 -0.2579 0.7965
Number of Observations: 108
Number of Groups: 27
Linear mixed-effects model under heavy-tailed distributions
Data: dental; Family: Student(df = 4)
Log-likelihood: -213.8493
Random effects:
Formula: ~age; Groups: ~Subject
Scale matrix estimate:
(Intercept) age
(Intercept) 3.78322192
age -0.22618058 0.04693866
Within-Group scale parameter: 0.8276335
Fixed: distance ~ age * Sex
Estimate Std.Error Z-value p-value
(Intercept) 17.0353 1.6768 10.1594 0.0000
age 0.7108 0.1661 4.2788 0.0000
SexFemale 0.6622 2.6270 0.2521 0.8010
age:SexFemale -0.0657 0.2603 -0.2524 0.8008
Number of Observations: 108
Number of Groups: 27
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.