corrTG | R Documentation |
This function implements two general methods for computing the correlation function in a transformed Gaussian random field.
corrTG(marg1, marg2, corrGauss = 0.5, method = "integral", nrep = 1000, kmax = 10, earlystop = FALSE, epscut = 1e-3)
marg1 |
an object of class |
marg2 |
an object of class |
corrGauss |
the correlation in the Gaussian random field. Should be a scalar between 0 and 1. |
method |
the computation method of calculating correlation in the transformed Gaussian random field. Can be either "integral" or "mc". If use "integral" then a series expansion based on the Hermite Polynomials will be used to approximate the correlation, see De Oliveira (2013) or Han and De Oliveira (2016). If use "mc" then the Monte Carlo method will be used. |
nrep |
the Monte Carlo size in computing the correlation. Only need to be specified if |
kmax |
the maximum number of terms used in the series summation (with Hermite polynomial expansion).
Only need to be specified if |
earlystop |
whether or not to allow the series summation to stop early.
If |
epscut |
a small positive value used to truncate the series. |
If method = "mc"
the output is a scalar between 0 and 1, denoting the correlation of the transformed Gaussian random field. If method = "integral"
the output is a scalar of the correlation in the transformed Gaussian random field, and a list of the values in the series expansion based on the integral with Hermite polynomials.
Zifei Han hanzifei1@gmail.com
De Oliveira, V. (2013) Hierarchical Poisson models for spatial count data. Journal of Multivariate Analysis,122:393-408.
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.
## Not run: corrTG(marg1 = poisson.gc(lambda = 10), marg2 = binomial.gc(size = 1, prob = 0.1), corrGauss = 0.5, method = "integral", kmax = 10, earlystop = TRUE, epscut = 1e-5) set.seed(12345) corrTG(marg1 = poisson.gc(lambda = 10), marg2 = binomial.gc(size = 1, prob = 0.1), corrGauss = 0.5, nrep = 100000, method = "mc") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.