The following code does not return expected results for Surgery arm, specifically for patients F, G, and H, who received surgery after grace period. They return missing values.
data(patients13)
clones <- clone_arms(patients13, c("Control", "Surgery"))
policy <- create_policy_A(
arms = c("Control", "Surgery"),
treatment = "surgery",
time_to_treatment = "time_to_surgery",
grace_period = 182,
outcome = "death",
followup = "followup",
clone_outcome = "analysis_outcome",
clone_followup = "analysis_followup"
)
apply_logics(clones, policy)
Below are tasks to fix the issue
The following code does not return expected results for
Surgeryarm, specifically for patientsF,G, andH, who received surgery after grace period. They return missing values.Below are tasks to fix the issue
create_policy_A()function to correctly address type of patient records that treatment is received after grace period