# number of accountable entities
n.entity = 100
# average number of patients or cases per accountable entity
n.obs = 50
# marginal probability of the outcome
mu = 0.1
# approximate reliability for entity with a median number of patients
r = 0.6
# parameter for risk-adjustment model (i.e., coefficient for x1)
beta1 = log(1.5)
df <- simulateData(n.entity = n.entity, n.obs = n.obs, mu = mu, r = r, beta1 = beta1)
head(df)
Run the code above in your browser using DataLab