rPrior  R Documentation 
Sampling from a prior distribution.
rPrior(n, copula, qmargins = qnorm, method = c("pseudo", "sobol"), ...)
n 
sample size, a positive 
copula 
object of 
qmargins 
marginal quantile 
method 

... 
additional arguments passed to 
(n, dim(copula))
matrix
of samples.
Marius Hofert
library(gnn) # for being standalone
n < 5
d < 3
library(copula)
cop < claytonCopula(2, dim = d)
X1 < rPrior(n, copula = cop) # Clayton copula and N(0,1) margins
X2 < rPrior(n, copula = cop, qmargins = qexp) # Exp(1) margins
X3 < rPrior(n, copula = cop, qmargins = qexp, method = "sobol", seed = 271)
stopifnot(dim(X1) == c(n, d), dim(X2) == c(n, d), dim(X3) == c(n, d))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.