generate.ext {mccca}R Documentation

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)

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.

Value

An (NxH) external variable matrix.

See Also

generate.catecls

Examples

###data setting
N <- 30 ; extcate.vec=c(2,3)
ext.mat=generate.ext(N,extcate.vec=extcate.vec)

[Package mccca version 1.1.0.1 Index]