max_count_support: Calculate Maximum Support Value for Count Variables:...

Description Usage Arguments Value References See Also

View source: R/max_count_support.R

Description

This function calculates the maximum support value for count variables by extending the method of Barbiero & Ferrari (2015, doi: 10.1002/asmb.2072) to include Negative Binomial variables. In order for count variables to be treated as ordinal in the calculation of the intermediate MVN correlation matrix, their infinite support must be truncated (made finite). This is done by setting the total cumulative probability equal to 1 - a small user-specified value (pois_eps or nb_eps. The maximum support value equals the inverse cdf applied to this result. The values pois_eps and nb_eps may differ for each variable. The function is used in findintercorr2 and rcorrvar2. This function would not ordinarily be called by the user.

Usage

1
2
max_count_support(k_pois, k_nb, lam, pois_eps = NULL, size, prob, mu = NULL,
  nb_eps = NULL)

Arguments

k_pois

the number of Poisson variables

k_nb

the number of Negative Binomial variables

lam

a vector of lambda (> 0) constants for the Poisson variables (see Poisson)

pois_eps

a vector of length k_pois containing the truncation values (i.e. = rep(0.0001, k_pois); default = NULL)

size

a vector of size parameters for the Negative Binomial variables (see NegBinomial)

prob

a vector of success probability parameters

mu

a vector of mean parameters (*Note: either prob or mu should be supplied for all Negative Binomial variables, not a mixture; default = NULL)

nb_eps

a vector of length k_nb containing the truncation values (i.e. = rep(0.0001, k_nb); default = NULL)

Value

a data.frame with k_pois + k_nb rows; the column names are:

Distribution Poisson or Negative Binomial

Number the variable index

Max the maximum support value

References

Barbiero A & Ferrari PA (2015). Simulation of correlated Poisson variables. Applied Stochastic Models in Business and Industry, 31: 669-80. doi: 10.1002/asmb.2072.

Ferrari PA, Barbiero A (2012). Simulating ordinal data, Multivariate Behavioral Research, 47(4): 566-589. doi: 10.1080/00273171.2012.692630.

See Also

findintercorr2, rcorrvar2


SimMultiCorrData documentation built on May 2, 2019, 9:50 a.m.