Function that generates simulated data with five covariates: three confounders,one instrumental variable and one predictor of the outcome (scenario from the paper of Wang)

sim_data(N, beta)

Arguments

N

sample size

beta

exposure marginal effect on outcome

Value

a list with outcome y,exposure x and covariates U