max_count_support {SimMultiCorrData} | R Documentation |
Calculate Maximum Support Value for Count Variables: Correlation Method 2
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
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 |
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 |
prob |
a vector of success probability parameters |
mu |
a vector of mean parameters (*Note: either |
nb_eps |
a vector of length |
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.