This function returns a ggplot derived from an rpsftm object showing status over time. It assumes that only a single switch in treatment occurs i.e. a patient who is randomized to control but has 25

ggatrisk(x, eval.times = NULL)

Arguments

x

rpsftm object (rpsftm)

eval.times

- vector of times to evaluate at risk status for. Default is all event and censoring times.

Examples

# use data included in rpsftm package
immdef <- rpsftm::immdef
immdef$rx <- with(immdef, 1 - xoyrs/progyrs)

# fit the model
imm.fit <- rpsftm::rpsftm(Surv(progyrs, prog) ~ rand(imm, rx),
                  data=immdef,
                  censor_time=censyrs)

ggatrisk(imm.fit)
#> Warning: `transmute_()` was deprecated in dplyr 0.7.0.
#> Please use `transmute()` instead.
#> See vignette('programming') for more help
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.