# tree: Extract the regression tree associated with a RE-EM tree In REEMtree: Regression Trees with Random Effects for Longitudinal (Panel) Data

## Description

Returns the fitted `rpart` object associated with a `REEMtree` object.

## Usage

 `1` ```tree(object,...) ```

## Arguments

 `object` an object of class `REEMtree` `...` further arguments passed to or from other methods

## Value

the fitted regression tree associated with the `REEMtree` object

## Author(s)

Rebecca Sela [email protected]

## References

Sela, Rebecca J., and Simonoff, Jeffrey S., “RE-EM Trees: A Data Mining Approach for Longitudinal and Clustered Data”, Machine Learning (2011).

## See Also

`rpart.object`, `REEMtree.object`

## Examples

 ```1 2 3 4``` ```data(simpleREEMdata) REEMresult<-REEMtree(Y~D+t+X, data=simpleREEMdata, random=~1|ID) tree.REEMtree(REEMresult) tree(REEMresult) ```

### Example output

```Loading required package: nlme
Loading required package: rpart
n= 600

node), split, n, deviance, yval
* denotes terminal node

1) root 600 1092.91700  1.3639420
2) D< 0.5 300  339.28840  0.5006719
4) X>=0.2503819 89   62.24319 -0.3697058 *
5) X< 0.2503819 211  181.18360  0.8677981 *
3) D>=0.5 300  306.48750  2.2272130
6) t< 5.5 125  111.18930  1.6862250 *
7) t>=5.5 175  132.58370  2.6136330 *
n= 600

node), split, n, deviance, yval
* denotes terminal node

1) root 600 1092.91700  1.3639420
2) D< 0.5 300  339.28840  0.5006719
4) X>=0.2503819 89   62.24319 -0.3697058 *
5) X< 0.2503819 211  181.18360  0.8677981 *
3) D>=0.5 300  306.48750  2.2272130
6) t< 5.5 125  111.18930  1.6862250 *
7) t>=5.5 175  132.58370  2.6136330 *
```

REEMtree documentation built on May 30, 2017, 12:24 a.m.