Skip to content

create_policy_A() provide wrong answer when treatment happens after grace period #14

Description

@youngroklee-ml

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

  • debug and fix create_policy_A() function to correctly address type of patient records that treatment is received after grace period
  • add test to confirm correct results based on Figure 2 in Maringe et al. (2020)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions