Fit a Gaussian Copula model.
gcopFit(X, Rho, fitXD = c("kernel", "gc4"), ...)
X | Either an |
---|---|
Rho |
|
fitXD | String specifying method to fit marginals (see |
... | Additional arguments to pass to the methods of |
An object of class gaussCop
, i.e., a list with elements:
XDens
A list of xDensity
objects specifying each marginal distribution (see xDensity
).
Rho
The correlation matrix between the normalized quantiles.
# 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 using Kernel method 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")