Learn R Programming

mccca (version 1.1.0.1)

generate.ext: generates an artificial (NxH) external variable matrix.

Description

Generates an artificial (NxH) external variable matrix.

Usage

generate.ext(N,extcate.vec=extcate.vec,unbala.cate=FALSE)

Value

An (NxH) external variable matrix.

Arguments

N

The number of observation.

extcate.vec

A vector of length H, each element indicates the number of category for each H external variables.

unbala.cate

logical value. If TRUE, the proportion of categories in the external variable is unbalanced. The default is FALSE.

See Also

generate.catecls

Examples

Run this code
###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