R: Generates correlated data with multiple count, binary,...
genPBONdata
R Documentation
Generates correlated data with multiple count, binary, ordinal and normal variables
Description
This function simulates a multivariate data set that is composed of count, binary, ordinal and normal variables
with specified marginals and a correlation matrix.
The intermediate correlation matrix obtained from function intermat
lamvec
A vector of marginal rates for the count variables
prop_vec_bin
A vector of probabilities for the binary variables
prop_vec_ord
A vector of probabilities for the ordinal variables. For each of the variable, the i-th element of the pvec is the
cumulative probability defining the marginal distribution of the ordinal variable. If the variable has k categories,
the i-th element of p will contain k-1 probabilities. The k-th element is implicitly 1.
nor.mean
A vector of means for the normal variables
nor.var
A vector of variances for the normal variables
Value
data
A simulated data matrix of size nx(no_pois + no_bin + no_ord + no_norm), of which the first no_pois are count variables,
followed by no_bin binary variables, no_ord ordinal variables, and lastly no_norm normal variables.
n.rows
Number of rows in the simulated data
prob.bin
A vector of probabilities for the binary variables
prob.ord
A vector of probabilities for the ordinal variables
nor.mean
A vector of means for the normal variables
nor.var
A vector of variances for the normal variables
lamvec
A vector of rate parameters for the count variables
n.pois
Number of count variables
n.bin
Number of binary variables
n.ord
Number of ordinal variables
n.norm
Number of normal variables
final.corr
The final correlation matrix for the simulated data