SurvResponseVar: Extract the time and event variable from a Cox model

Description Usage Arguments Author(s) Examples

View source: R/getCoxInfo.R

Description

Extract the time and event variable from a Cox model

Usage

1

Arguments

formula

a formula

Author(s)

Brice Ozenne broz@sund.ku.dk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
SurvResponseVar(Surv(time,event)~X1+X2)
SurvResponseVar(Hist(time,event==0)~X1+X2)
SurvResponseVar(Surv(start,time, status,type="counting") ~ X3+X5)
SurvResponseVar(Surv(start,event=status, time2=time,type="counting") ~ X3+X5)

SurvResponseVar(survival::Surv(start,event=status, time2=time,type="counting") ~ X3+X5)
SurvResponseVar(status ~ X3+X5)
SurvResponseVar(I(status == 1) ~ X3+X5)
SurvResponseVar(list(Hist(time, event) ~ X1+X6,Hist(time, event) ~ X6))

## End(Not run)

riskRegression documentation built on Jan. 13, 2021, 11:12 a.m.