# Create an example data matrix with 50 observations that contains an ID variable,
# a dummy variable indicating gender, an age variable (between 18 and 55), a
# treatment variable and an outcome variable (between 15 and 20).
# id <- seq(1, 50, 1)
# gender <- sample(c(1, 2), 50, replace = TRUE)
# age <- sample(seq(18, 55, 1), 50, replace = TRUE)
# treat <- sample(c(1, 2), 50, replace = TRUE)
# out <- treat + sample(seq(15, 20, 1), 50, replace = TRUE)
# df <- cbind(id, gender, age, out, treat)
# Check summary statistics for the created data
# aggregate(out ~ treat, df, mean)
# Run invertRIconfInt()
# invertRIconfInt(data, outcome.var="out", tr.var="treat", tau.abs.min = -3,
# tau.abs.max = 3, id.vars = "id", id.vals = "id",
# exact.vars = c("gender", "age"), exact.vals = c("gender", "age"))
Run the code above in your browser using DataLab