This function calculates a k_cat x k_nb
intermediate matrix of correlations for the k_cat ordinal (r >=
2 categories) and k_nb Negative Binomial variables. It extends the method of Amatya & Demirtas (2015, 10.1080/00949655.2014.953534)
to ordinal - Negative Binomial pairs. Here, the intermediate correlation between Z1 and Z2 (where Z1 is the standard normal variable
discretized to produce an ordinal variable Y1, and Z2 is the standard normal variable used to generate a Negative Binomial
variable via the inverse cdf method) is calculated by dividing the target correlation by a correction factor. The
correction factor is the product of the upper Frechet-Hoeffding bound on the correlation between a Negative Binomial variable
and the normal variable used to generate it (see chat_nb
) and a simulated GSC upper bound on
the correlation between an ordinal variable and the normal variable used to generate it (see Demirtas & Hedeker, 2011,
10.1198/tast.2011.10090).
The function is used in findintercorr
and rcorrvar
.
This function would not ordinarily be called by the user.
findintercorr_cat_nb(rho_cat_nb, marginal, size, prob, mu = NULL,
nrand = 100000, seed = 1234)
a k_cat x k_nb
matrix of target correlations among ordinal and Negative Binomial variables
a list of length equal to k_cat
; the i-th element is a vector of the cumulative
probabilities defining the marginal distribution of the i-th variable;
if the variable can take r values, the vector will contain r - 1 probabilities (the r-th is assumed to be 1)
a vector of size parameters for the Negative Binomial variables (see NegBinomial
)
a vector of success probability parameters
a vector of mean parameters (*Note: either prob
or mu
should be supplied for all Negative Binomial variables,
not a mixture; default = NULL)
the number of random numbers to generate in calculating the bound (default = 10000)
the seed used in random number generation (default = 1234)
a k_cat x k_nb
matrix whose rows represent the k_cat
ordinal variables and columns represent the
k_nb
Negative Binomial variables
Please see references for findintercorr_cat_pois