rmst2adapt.sample.data: Generate a sample data from the pbc data

View source: R/rmst2adapt.sample.data.R

rmst2adapt.sample.dataR Documentation

Generate a sample data from the pbc data

Description

This is a function to retrieve 312 randomized patients from the pbc data in survival package.

Usage

rmst2adapt.sample.data(t.unit="year")

Arguments

t.unit

Specify the time unit. It supports "year" (default), "month", and "day".

Details

The function creates a sample dataset to illustrate the usage of the function rmst2adapt() in this package. The original pbc data in survival package consists of 418 patients data. This function loads the pbc data, select the 312 patients who were randomized. The status variable is edited, so that 1 indicates death and 0 indicates alive.

Value

returns a data frame

See Also

pbc in survival package

Examples

D=rmst2adapt.sample.data()
head(D)

survRM2adapt documentation built on March 31, 2023, 7:15 p.m.