cut_dfSim: Cuts the Data.Frame at a specific timepoint, changing status...

Description Usage Arguments Details Value Examples

View source: R/cut_dfSim.R

Description

Cuts the Data.Frame at a specific timepoint, changing status accordingly.

Usage

1
cut_dfSim(df.sim, t)

Arguments

df.sim

a data.frame containing the variables:

  • status: (0,1) := (no event,event)

  • time: time to status

  • tn: recruitment timepoint

t

a number defining the timepoint at which the dataframe is cut.

Details

the status of events occuring at a later timepoint time > t are set to zero. Patients with a recruitment timepoint > t are removed.

Value

a data.frame with the same structure of the handed data.

Examples

1
2
3
N <- matrix(rep(50,10),ncol=2)
df.sim <- simSurvData(N=N, lambda=exp(.7)/12, theta=.7, gamma=exp(.3)/12, distS="exponential",distC="exponential", L=10)
df.sim_cut3 <- cut.dfSim(df.sim,3)

Knusprikus/BSSRed documentation built on July 6, 2020, 11:02 p.m.