GenOrd (version 1.3.0)

GenOrd-package: Simulation of Ordinal and Discrete Variables with Given Correlation Matrix and Marginal Distributions

Description

The package implements a procedure for generating samples from ordinal/discrete random variables with pre-specified correlation matrix and marginal distributions. The marginal distribution are linked together through a gaussian copula. The procedure is developed in two steps: the first step (function ordcont) sets up the gaussian copula in order to achieve the desired correlation matrix on the target ordinal/discrete variables; the second step (ordsample) generates samples from the target variables. The procedure can handle both Pearson's and Spearman's correlations, and any finite support for the discrete variables. The intermediate function contord computes the correlations of discrete/ordinal variables derived from correlated normal variables through discretization. Function corrcheck returns the lower and upper bounds of the correlation coefficient of each pair of ordinal/discrete variables given their marginal distributions, i.e., returns the range of feasible bivariate correlations. This version has fixed some drawbacks of ordcont, which now stops and returns an error if the resulting correlation matrix of the gaussian copula is not a valid correlation matrix. Validity checks on the marginal distributions and correlation matrix provided by the user in the four functions have been added.

Arguments

Details

ll{ Package: GenOrd Type: Package Version: 1.2.0 Date: 2015-03-31 License: GPL LazyLoad: yes }

References

P.A. Ferrari, A. Barbiero (2012) Simulating ordinal data, Multivariate Behavioral Research, 47(4), 566-589

See Also

contord, ordcont, corrcheck, ordsample