copre {copre} | R Documentation |
Copula Resampling
Description
A function that samples predictive distributions for univariate continuous data using the bivariate Gaussian copula.
Usage
copre(
data,
N,
k,
rho = 0.91,
grd_res = 1000,
nthreads = parallel::detectCores(),
gpu = FALSE,
gpu_path = NULL,
gpu_odir = NULL,
gpu_seed = 1234
)
Arguments
data |
The data from which to sample predictive distributions. |
N |
The number of unobserved data points to resample for each chain. |
k |
The number of predictive distributions to sample. |
rho |
A scalar concentration parameter. |
grd_res |
The number of points on which to evaluate the predictive distribution. |
nthreads |
The number of threads to call for parallel execution. |
gpu |
A logical value indicating whether or not to use the CUDA implementation of the algorithm. |
gpu_path |
The path to the CUDA implementation source code. |
gpu_odir |
A directory to output the compiled CUDA code. |
gpu_seed |
A seed for the CUDA random variates. |
Value
A copre_result
object, whose underlying structure is a list which
contains the following components:
References
Fong, E., Holmes, C., Walker, S. G. (2021). Martingale Posterior Distributions. arXiv. DOI: doi:10.48550/arxiv.2103.15671
Examples
res_cop <- copre(rnorm(50), 10, 10, nthreads = 1)