scdeco.sim.cop {scDECO} | R Documentation |
Simulating from copula model
Description
Simulating from copula model
Usage
scdeco.sim.cop(
marginals,
x,
eta1.true,
eta2.true,
beta1.true,
beta2.true,
alpha1.true,
alpha2.true,
tau.true,
w = NULL
)
Arguments
marginals |
provide vector of length 2 of which marginals to use |
x |
covariate matrix |
eta1.true |
zero-inflation parameters for marginal 1 |
eta2.true |
zero-inflation parameters for marginal 2 |
beta1.true |
mean coefficients for marginal 1 |
beta2.true |
mean coefficients for marginal 2 |
alpha1.true |
second parameter coefficients for marginal 1 |
alpha2.true |
second parameter coefficients for marginal 2 |
tau.true |
coefficients for correlation |
w |
(optional) covariate matrix for zero-inflation portion |
Value
matrix with values simulated from copula model
Examples
n <- 2500
x.use = rnorm(n)
w.use = runif(n,-1,1)
eta1.use = c(-2.2, 0.7)
eta2.use = c(-2, 0.8)
beta1.use = c(1,0.5)
beta2.use = c(1,1)
alpha1.use = 7
alpha2.use = 3
tau.use = c(-0.2, .3)
marginals.use <- c("ZINB", "ZIGA")
y.use <- scdeco.sim.cop(marginals=marginals.use, x=x.use,
eta1.true=eta1.use, eta2.true=eta2.use,
beta1.true=beta1.use, beta2.true=beta2.use,
alpha1.true=alpha1.use, alpha2.true=alpha2.use,
tau.true=tau.use, w=w.use)
y.use[1:10,]
[Package scDECO version 0.1.0 Index]