FHUBdiscrete {gcKrig} | R Documentation |
Compute the Frechet Hoeffding Upper Bound for Given Discrete Marginal Distributions
Description
This function implemented the method of computing the Frechet Hoeffding upper bound for discrete marginals described in Nelsen (1987), which can only be applied to discrete marginals. Four commonly used marginal distributions were implemented. The distribution "nb" (negative binomial) and "zip" (zero-inflated Poisson) are parameterized in terms of the mean and overdispersion, see Han and De Oliveira (2016).
Usage
FHUBdiscrete(marg1, marg2, mu1, mu2, od1 = 0, od2 = 0, binomial.size1 = 1,
binomial.size2 = 1)
Arguments
marg1 |
name of the first discrete marginal distribution. Should be one of the "poisson", "zip", "nb" or "binomial". |
marg2 |
name of the second discrete marginal distribution. Should be one of the "poisson", "zip", "nb" or "binomial". |
mu1 |
mean of the first marginal distribution. If binomial then it is |
mu2 |
mean of the second marginal distribution. If binomial then it is |
od1 |
the overdispersion parameter of the first marginal. Only used when marginal distribution is either "zip" or "nb". |
od2 |
the overdispersion parameter of the second marginal. Only used when marginal distribution is either "zip" or "nb". |
binomial.size1 |
the size parameter (number of trials) when |
binomial.size2 |
the size parameter (number of trials) when |
Value
A scalar denoting the Frechet Hoeffding upper bound of the two specified marginal.
Author(s)
Zifei Han hanzifei1@gmail.com
References
Nelsen, R. (1987) Discrete bivariate distributions with given marginals and correlation. Communications in Statistics Simulation and Computation, 16:199-208.
Han, Z. and De Oliveira, V. (2016) On the correlation structure of Gaussian copula models for geostatistical count data. Australian and New Zealand Journal of Statistics, 58:47-69.
Han, Z. and De Oliveira, V. (2018) gcKrig: An R Package for the Analysis of Geostatistical Count Data Using Gaussian Copulas. Journal of Statistical Software, 87(13), 1–32. doi: 10.18637/jss.v087.i13.
Examples
## Not run:
FHUBdiscrete(marg1 = 'nb', marg2 = 'zip',mu1 = 10, mu2 = 2, od1 = 2, od2 = 0.2)
FHUBdiscrete(marg1 = 'binomial', marg2 = 'zip', mu1 = 10, mu2 = 4, binomial.size1 = 25, od2 = 2)
FHUBdiscrete(marg1 = 'binomial', marg2 = 'poisson', mu1 = 0.3, mu2 = 20, binomial.size1 = 1)
NBmu = seq(0.01, 30, by = 0.02)
fhub <- c()
for(i in 1:length(NBmu)){
fhub[i] = FHUBdiscrete(marg1 = 'nb', marg2 = 'nb',mu1 = 10, mu2 = NBmu[i], od1 = 0.2, od2 = 0.2)
}
plot(NBmu, fhub, type='l')
## End(Not run)