jeudi 27 juin 2019

How to define 'marginal distribution' in GenOrd package?

I'm trying to generate ordinal correlated variables with GenOrd package. However, there are some problems.

I'm getting help on this page, which was written by Wesley

https://www.r-bloggers.com/simulating-random-multivariate-correlated-data-categorical-variables/

In this page, and most of other explanation about GenOrd package, the marginal distirbution must be set. In this page, the marginal distribution is

#The values are cumulative so for the first variable the first marginal will be .1, the second is .2, the third is .3, and the fourth is .4
marginal <- list(c(0.1,0.3,0.6),c(0.4,0.7,0.9))
> marginal
[[1]]
[1] 0.1 0.3 0.6

[[2]]
[1] 0.4 0.7 0.9

However, as far as I Know, the marginal distribution is as follows. (from English wikipedia)

enter image description here

So the sum of marginal probability is 1. However, in the second list in marginal object, the sum is 0.4+0.7+0.9=2

How can I interpret this object?




Aucun commentaire:

Enregistrer un commentaire