True and false interindividual differences in the physiological response to an intervention
# https://physoc.onlinelibrary.wiley.com/doi/full/10.1113/EP085070 # https://github.com/eamonn2014/True-and-false-interindividual-differences-in-the-physiological-response-to-an-intervention # Simulate a RCT library(nlme) n <- 5000 noise <- 100 # add noise (within person var & meas. error) to the baseline & foll. up beta.treatment <- -250 # all trt'd subjects exp same trt effect, so no resp - non responders!! # beta.treatment <- runif(n,-20,-5) # subjects vary in response to treatment clin.rel.diff <- 200 pop_mu <- 0 # population mean pop_sd <- 200 # between person SD ur.eligible <- -1000 # eligibility criteria for tria...