# NOT RUN {
A <- rbinom(n = 1000, size = 1, prob = 0.5)
X1 <- rbinom(n = 1000, size = 1, prob = 0.5)
X2 <- rnorm(n = 1000, mean = 0, sd = 1)
y <- sample(c(0,1,2), 1000, replace=TRUE, prob=c(0.8, 0.1, 0.1) )
weight <- rep(1, n = 1000)
df <- data.frame(y, A, X1, X2, weight)
max_lambda(stand_formula = y ~ A + X1 + X2,
exposure = "A",
df = df,
weight = weight)
# }
Run the code above in your browser using DataLab