

   CCaallccuullaattee aa CCoovvaarriiaannccee MMaattrriixx ffoorr tthhee NNoorrmmaall DDiissttrriibbuuttiioonn
   oouutt ooff aa MMaattrriixx ooff JJooiinntt PPrroobbaabbiilliitteess..

        commonprob2sigma(commonprob, simulvals)

   AArrgguummeennttss::

   commonprob: Matrix of Pairwise Probabilities.

   simulvals: Array received by `simul.commonprob'.

   DDeessccrriippttiioonn::

        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.

   VVaalluuee::

        A covariance matrix is returned with the same dimen-
        sions as `commonprob'.

   AAuutthhoorr((ss))::

        Friedrich Leisch

   RReeffeerreenncceess::

        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 Man-
        agement Science'', Vienna University of Economics,
        <URL: http://www.wu-wien.ac.at/am>

   SSeeee AAllssoo::

        `simul.commonprob'

   EExxaammpplleess::

        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)

