Calculate a Covariance Matrix for the Normal Distribution out of a Matrix of Joint Probabilites.

Usage

commonprob2sigma(commonprob, simulvals)

Arguments

commonprob Matrix of Pairwise Probabilities.
simulvals Array received by simul.commonprob.

Description

Computes a covariance matrix for a normal distribution which corresponds to a binary distribution with marginal probabilites given by diag(commonprob) and pairwise probabilities given by commonprob.

For the simulations the values of simulvals are used.

If a non-valid covariance matrix is the result, the program stops with an error in the case of NA arguments and yields are warning message if the matrix is not positive definite.

Value

A covariance matrix is returned with the same dimensions as commonprob.

Author(s)

Friedrich Leisch

References

Friedrich Leisch, Andreas Weingessel and Kurt Hornik (1998). On the generation of correlated artificial binary data. Working Paper Series, SFB ``Adaptive Information Systems and Modelling in Economics and Management Science'', Vienna University of Economics, http://www.wu-wien.ac.at/am

See Also

simul.commonprob

Examples

m <- cbind(c(1/2,1/5,1/6),c(1/5,1/2,1/6),c(1/6,1/6,1/2))
sigma <- commonprob2sigma(m)


[Package Contents]