Simulate from the logarithmic transform of a Gaussian copula model with compound symmetry correlation structure and with Gamma distributed marginals with mean one.
covar_loggamma(
n,
normal.cor = NULL,
gamma.var = 1,
names = c("z"),
type = "cs",
...
)list of data.tables
Number of samples
Correlation parameter (n x r) or (1 x r) matrix
Variance of gamma distribution (n x p or 1 x p matrix)
Column name of the column vector (default "z")
of correlation matrix structure (cs: compound-symmetry /
exchangable, ar: autoregressive, un: unstructured, to: toeplitz). The
dimension of normal.cor must match, i.e., for a Toeplitz correlation
matrix r = p-1, and for a cs and ar r=1.
Additional arguments passed to lower level functions
We simulate from the Gaussian copula by first drawing \(X\sim N(0,R)\) and transform the margins with \(x\mapsto \log(F_\nu^{-1}\{\Phi(x)\})\) where \(\Phi\) is the standard normal CDF and \(F_\nu^{-1}\) is the quantile function of the Gamma distribution with scale and rate parameter equal to \(\nu\).
outcome_count Trial covar_normal