lrp: Longitudinal Recursive Partitioning

Description Usage Arguments Examples

Description

Longitudinal Recursive Partitioning

Usage

1
2
3
lrp(method, nlme.model = NULL, randomFormula, fixedFormula = NULL, data,
  start, group, rPartFormula, weight = NULL, R = NULL, min.dev = NULL,
  control = rpart.control())

Arguments

method

Whether to use lme() or nlme(). Use either method="lme" or method="nlme". This changes what additional arguments need to be passed.

nlme.model

Necessary to specify if method="nlme"

randomFormula

Random effects to include for nlme() or lme()

fixedFormula

Fixed effects to include for nlme() or lme()

data

Dataset

start

Starting values for nlme()

group

Grouping for nlme()

rPartFormula

Not sure yet

weight

Sample weights to be passed to rpart

R

Correlation matrix to use for nlme. this is correlation=

min.dev

The minimum decrease in deviance to choose a split. Note that this overrides the default cp criterion in rpart.control()

control

Control function to be passed to rpart()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(longRPart2)


data(ex.data.3)
model.0 = nlme(y~b0i+b1i*time,
               data=ex.data.3,
               fixed=b0i+b1i~1,
               random=b0i+b1i~1,
               group=~id,
               start=c(10,5))


lcart.mod1 <- lrp(method="nlme",
                 nlme.model=y~b0i+b1i*time,
                 fixedFormula=b0i+b1i~1,
                 rPartFormula = ~ z,
                 group= ~ id,
                 randomFormula=b0i+b1i~1,
                 data=ex.data.3,
                 start=c(10,5))

data(lcart.mod1)
summary(lcart.mod1)
plot(lcart.mod1)
#lrp2Plot(lcart.mod1)

longRPart2 documentation built on May 2, 2019, 8:30 a.m.

Related to lrp in longRPart2...