REEMtree {REEMtree}R Documentation

Create a RE-EM tree

Description

Fit a RE-EM tree to data. This estimates a regression tree combined with a linear random effects model.

Usage

REEMtree(formula, data, random, groups, subset = NULL, 
        initialRandomEffects = rep(0, TotalObs), ErrorTolerance = 0.001, 
        MaxIterations = 1000, Verbose = FALSE, 
        tree.control = rpart.control(), lme.control = lmeControl(returnObject = TRUE), 
        method = "REML", correlation = NULL)

Arguments

formula a formula, as in the lm or rpart function
data a data frame in which to interpret the variables named in the formula (unlike in lm or rpart, this is not optional)
random a description of the random effects, as in lme
groups the name of the variable describing the groups for the random effects (identical to the variable in the grouping structure of random)
subset an optional logical vector indicating the subset of the rows of data that should be used in the fit. All observations are included by default.
initialRandomEffects an optional vector giving initial values for the random effects to use in estimation
ErrorTolerance when the difference in the likelihoods of the linear models of two consecutive iterations is less than this value, the RE-EM tree has converged
MaxIterations maximum number of iterations allowed in estimation
Verbose if TRUE, the current estimate of the RE-EM tree will be printed after each iteration
tree.control a list of control values for the estimation algorithm to replace the default values used to control the rpart algorithm. Defaults to an empty list.
lme.control a list of control values for the estimation algorithm to replace the default values returned by the function lmeControl. Defaults to an empty list.
method whether the linear model should be estimated with ML or REML
correlation an optional CorStruct object describing the within-group correlation structure

Value

an object of class REEMtree

Author(s)

Rebecca Sela rsela@stern.nyu.edu

References

Sela, Rebecca J., and Simonoff, Jeffrey S., “RE-EM Trees: A New Data Mining Approach for Longitudinal Data”.

See Also

rpart, nlme, REEMtree.object

Examples

data(simpleREEMdata)
simpleEMresult<-REEMtree(Y~D+t+X, data=simpleREEMdata, random=~1|ID, simpleREEMdata$ID, Verbose=TRUE)

[Package REEMtree version 1.0 Index]