Define cohort exit strategy

exit(endStrategy, censor = NULL)

Arguments

endStrategy

An end strategy object: observationExit, fixedExit, or drugExit.

censor

Optional censoringEvents object of queries that end the cohort early if they occur after the index date.

Value

A CohortExit object.

Examples

exit(endStrategy = observationExit())
#> An object of class "CohortExit"
#> Slot "endStrategy":
#> An object of class "ObservationExit"
#> Slot "exit":
#> [1] "End of Continuous Observation"
#> 
#> 
#> Slot "censoringCriteria":
#> An object of class "CensoringCriteria"
#> Slot "criteria":
#> list()
#> 
#> 
exit(endStrategy = fixedExit(offsetDays = 30L))
#> An object of class "CohortExit"
#> Slot "endStrategy":
#> An object of class "FixedDurationExit"
#> Slot "index":
#> [1] "startDate"
#> 
#> Slot "offsetDays":
#> [1] 30
#> 
#> 
#> Slot "censoringCriteria":
#> An object of class "CensoringCriteria"
#> Slot "criteria":
#> list()
#> 
#>