1
$\begingroup$

I am looking for an alternative to rmvbin because when I want to generate (two-dimensional binary) data I very often get the error "Error in commonprob2sigma(commonprob, simulvals) : Matrix commonprob not admissible." I am not an expert in that field but it seems to me that the data-generating-algorithm uses some really strict constraints on the marginal probabilities/correlation.

> margp
[1] 0.9935093 0.8768648
> cr
            [,1]        [,2]
[1,]  1.00000000 -0.07144714
[2,] -0.07144714  1.00000000
sim_data <- rmvbin(n=20,margprob=margp,bincorr=cr)

which produces the error I mentioned. So do you know any other packages for that? Thanks!!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.