# NOT RUN {
library(hierSDR)
set.seed(123)
dat <- simulate_data(nobs = 100, nvars = 6,
x.type = "some_categorical",
sd.y = 1, model = 2)
x <- dat$x ## covariates
z <- dat$z ## factor indicators
y <- dat$y ## response
dat$beta ## true coefficients that generate the subspaces
dat$snr ## signal-to-noise ratio
str(x)
str(z)
dat$z.combinations ## what combinations of z represent different subpops
## correct structural dimensions:
dat$d.correct
# }
Run the code above in your browser using DataLab