AaJ.Lexis: The Aalen-Johansen estimator of state probabilities from a...

View source: R/AaJ.Lexis.R

AaJ.LexisR Documentation

The Aalen-Johansen estimator of state probabilities from a multistate Lexis object.

Description

The Aalen-Johansen estimator is computed on the basis of a Lexis multistate object along a given time scale. The function is merely a wrapper for the survfit.

Usage

## S3 method for class 'Lexis'
AaJ(Lx,
               formula = ~ 1,
             timeScale = 1, ...)

Arguments

Lx

A Lexis object. The starting state must be the first among levels(Lx).

formula

A one-sided formula passed on to survfit.

timeScale

Character or integer, selecting one of the timescales of the Lexis object.

...

Arguments passed on. Ignored

Value

An object of class survfitms — see survfit.

Author(s)

Bendix Carstensen, http://bendixcarstensen.com

See Also

survfit ci.Crisk

Examples

data(DMlate)
str(DMlate)
dml <- Lexis(entry = list(Per = dodm,
                          Age = dodm-dobth,
                        DMdur = 0 ),
              exit = list(Per = dox),
       exit.status = factor(!is.na(dodth),
                            labels = c("DM","Dead")),
              data = DMlate )

# Cut the follow-up at insulin start
dmi <- cutLexis(dml,
                cut = dml$doins,
          new.state = "Ins",
        split.state = TRUE)
summary( dmi )
ms <- AaJ.Lexis(dmi, timeScale = "DMdur")
class(ms)
ms$states
head(ms$pstate)

Epi documentation built on March 19, 2024, 3:07 a.m.

Related to AaJ.Lexis in Epi...