powered by
Generates an artificial (NxH) external variable matrix.
generate.ext(N,extcate.vec=extcate.vec,unbala.cate=FALSE)
An (NxH) external variable matrix.
The number of observation.
A vector of length H, each element indicates the number of category for each H external variables.
logical value. If TRUE, the proportion of categories in the external variable is unbalanced. The default is FALSE.
generate.catecls
###data setting N <- 30 ; extcate.vec=c(2,3) ext.mat=generate.ext(N,extcate.vec=extcate.vec)
Run the code above in your browser using DataLab