simulate_dataset <- function(
  mean_response_drug,
  sample_size
) {
  patient_id <- paste0(
    "patient_",
    sample.int(n = 1e9, size = sample_size, replace = FALSE)
  )
  study_arm <- rep(
    x = c("drug", "placebo"),
    each = sample_size / 2
  )
  response_drug <- rnorm(
    n = sample_size / 2,
    mean = mean_response_drug,
    sd = 4.25
  )
  response_placebo <- rnorm(
    n = sample_size / 2,
    mean = 1,
    sd = 4.25
  )
  tibble(
    patient_id = patient_id,
    study_arm = study_arm,
    response = c(response_drug, response_placebo)
  )
} 
  
 
 
 
 
 
 



 


 
 
 
 
 
 
 
 
 
 








 
 
 
 
 
