b4pst: Function to calculate survival time and censor variables...

View source: R/b4pst.R

b4pstR Documentation

Function to calculate survival time and censor variables before and post a time lag (delay treatment effect time)

Description

calculate survival time and censor variables before and post a time lag.

Usage

b4pst(os, osc, lag)

Arguments

os

a vector to denote the observed times

osc

a vector to denote censor variables

lag

a scalar to denote the time lag

Value

A list including the following variables:

  • b4os: overall survival time before the time lag

  • b4osc: censor variable before the time lag

  • pstos: overall survival time post the time lag

  • pstosc: censor variable post the time log lag

Examples

n <- 500
event <- runif(n,1, 5)
osc<-1*(event<=4)
os <- pmin(event,4)
b4pst(os,osc,3.5)


EventPredInCure documentation built on May 29, 2024, 11:04 a.m.