#generate a simple design with only cluster random effects and 6 clusters in 3 time periods
# with 10 individuals in each cluster-period
des <- parallel_crt(J=6,M=10,t=3,icc=0.05)
# same design but with a cohort of individuals
des <- parallel_crt(J=6,M=10,t=3,icc=0.05, iac = 0.1)
# same design, but with two clusters per sequence and specifying the initial parameters
des <- parallel_crt(J=6,M=10,t=3,beta = c(rnorm(3,0,0.1),-0.1),icc=0.05, iac = 0.1)
# specifying multiple values of the variance parameters will return a design space
# with all designs with all the combinations of the variance parameter
des <- parallel_crt(J=6,M=10,t=3,icc=c(0.01,0.05), cac = c(0.5,0.7,0.9), iac = 0.1)
Run the code above in your browser using DataLab