Description Usage Arguments Details Value See Also Examples
The Gaussian Copula distribution.
1 2 3 |
X |
|
gCop |
An object of class |
log |
Logical; whether or not to evaluate the density on the log scale. |
decomp |
Logical; if |
n |
Number of random samples to draw. |
The density of Gaussian Copula distribution is
g(x) = ψ(z | R) ∏_{i=1}^d f_i(x_i)/φ(z_i),
z_i = Φ^(-1)(F_i(x_i)),
where ψ(z | R) is the PDF of a multivariate normal with mean 0 and variance R, f_i(x_i) and F_i(x_i) are the marginal PDF and CDF of variable i, and φ(z) and Φ(z) are the PDF and CDF of a standard normal.
dgcop
provides the density of gCop
, rgcop
generates random values from gCop
.
gcopFit
for constructing gaussCop
objects and fitting the Gaussian Copula model to observed data.
1 2 3 4 5 6 7 8 9 10 | # simulate data and plot it
n = 5e4
dat = cbind(rnorm(n, mean = 1, sd = 3),
rnorm(n, mean=4, sd = 0.5))
plot(dat, cex=0.5)
# fit Gaussian Copula
temp.cop = gcopFit(X = dat, fitXD = "kernel")
# simulate data from Copula model and add it to plot, should blend in
new.data = rgcop(100, temp.cop)
points(new.data, cex = 0.5, col="red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.