# Simple examples with random data here
# Real data examples in the Vignette
# Random data: covariates A,B,C are correlated with Y
set.seed(1)
Y <- rnorm(20)
X <- matrix(rnorm(200), 20, 10)
X[,1:3] <- X[,1:3] + Y
colnames(X) <- LETTERS[1:10]
# Some subsets of interest
my.sets <- list(c("A", "B"), c("C","D"), c("D", "E"))
# Comparative proportions
res <- gt(Y, X, subsets = my.sets)
comparative(res)
comparative(res, z.scores=FALSE)
Run the code above in your browser using DataLab