dat <- lmi_simul_dat(n=1000,p=20,q=5,
block_idx=c(1,1,2,2,3,1,1,1,1,1,2,2,2,2,3,3,3,3,3,3),
within_rho=0.6,btw_rho=0.1,R2=0.2,
effect_size=1,effect_size_i=1,
cancel_effect = FALSE)
#Example 1: The users would like to perform variable selections
#on main effects of exposures and covariates, and outcome, exposures and
#covariates are entered. For any individual interactions that the users would
#like to include in the models, they can add those into the covariate z.
res_ex1 <- Comp.Mix(y.type="continuous",y=dat$y, x=dat$x, z=dat$z, test.pct=0.5,
var.select = TRUE, interaction = FALSE, interaction.exp.cov = FALSE,
covariates.forcein = FALSE,
bkmr.pip=0.5, seed=2023)
Run the code above in your browser using DataLab