PanelSurv: Create a PanelSurv Object

Description Usage Arguments Value See Also Examples

View source: R/PanelSurv.R

Description

Create a panel count survival object, usually used as a response variable in a model formula.

Usage

1
2
3
4
5
PanelSurv(ID, time, count)
## S3 method for class 'PanelSurv'
is(x)
## S3 method for class 'PanelSurv'
plot(x, ...)

Arguments

ID

Observation subject's ID.

time

Observation time.

count

Number of new events since last observation time.

x

An PanelSurv object.

...

Other graphical parameters such as line type, color, or axis labels.

Value

An object of S3 class "PanelSurv".

psDF

a data frame, part of original input data frame with variable "ID", "time" and "count".

timeGrid

ordered distinct observation times in the set of all observation times.

panelMatrix

a matrix representation of panel count data, one row per subject, one column per time point in "timeGrid".

In the case of is.PanelSurv, a logical value TRUE if x inherits from class "PanelSurv", otherwise an FALSE.

In the case of plot.PanelSurv, a tile plot of panelMatrix produced by package ggplot2 with color indicating number of counts since last observation time.

See Also

panelReg

Examples

1
2
3
4
5
data(blaTum)

response <- with(blaTum, PanelSurv(id, time, count))
is.PanelSurv(response)
plot(response)

jun-yan/spef documentation built on May 7, 2019, 11:14 a.m.