Description Usage Arguments Value References See Also

View source: R/intercorr_cat_nb.R

This function calculates the `k_cat x k_nb`

intermediate matrix of correlations for the `k_cat`

ordinal (*r >=
2* categories) and `k_nb`

Negative Binomial variables required to produce the target correlations in `rho_cat_nb`

. It extends the method of Amatya & Demirtas (2015, doi: 10.1080/00949655.2014.953534)
to ordinal - Negative Binomial pairs and allows for regular or zero-inflated NB variables. 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 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,
doi: 10.1198/tast.2011.10090). The function is used in `intercorr`

and `corrvar`

.
This function would not ordinarily be called by the user.

1 2 | ```
intercorr_cat_nb(rho_cat_nb = NULL, marginal = list(), size = NULL,
mu = NULL, p_zinb = 0, nrand = 100000, seed = 1234)
``` |

`rho_cat_nb` |
a |

`marginal` |
a list of length equal to |

`size` |
a vector of size parameters for the Negative Binomial variables (see |

`mu` |
a vector of mean parameters for the NB variables (*Note: either |

`p_zinb` |
a vector of probabilities of structural zeros (not including zeros from the NB distribution) for the zero-inflated NB variables
(see |

`nrand` |
the number of random numbers to generate in calculating the bound (default = 10000) |

`seed` |
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 `intercorr_cat_pois`

.

SimCorrMix documentation built on May 2, 2019, 1:24 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.