1 #' Generate a sample of (X,Y) of size n with default values
2 #' @param n sample size
3 #' @param p number of covariates
4 #' @param m size of the response
5 #' @param k number of clusters
6 #' @return list with X and Y
8 #-----------------------------------------------------------------------
9 generateIOdefault = function(n, p, m, k)
12 covY = array(0, dim=c(m,m,k))
20 beta = array(0, dim=c(p,m,k))
23 nonZeroCount = ceiling(m * runif(1))
24 beta[j,1:nonZeroCount,] = matrix(runif(nonZeroCount*k), ncol=k)
27 sample_IO = generateIO(covX, covY, pi, beta, n)
28 return (list(X=sample_IO$X,Y=sample_IO$Y))