sample.jointdata: Sample from a 'jointdata' x

Description Usage Arguments Value Author(s) See Also Examples

Description

Generic function used to sampling a subset of data from an x of class jointdata, with a specific size of number of subjects.

Usage

1

Arguments

x

an object of class jointdata.

size

number of subjects to include in the sampled subset.

replace

should sampling be with replacement? Default is replace = TRUE.

Value

An object of class jointdata, with data only on the subjects sampled.

Author(s)

Ines Sousa ([email protected])

See Also

sample, jointdata, UniqueVariables.

Examples

1
2
3
4
5
6
7
8
data(heart.valve)
heart.surv <- UniqueVariables(heart.valve, 
                              var.col = c("fuyrs", "status"), 
                              id.col = "num")
heart.valve.jd <- jointdata(survival = heart.surv, 
                            id.col = "num", 
                            time.col = "time")
sample.jointdata(heart.valve.jd, size = 10)

graemeleehickey/joineR documentation built on May 17, 2019, 8:02 a.m.