Last chance! 50% off unlimited learning
Sale ends in
The function simulates multivariate data with Poisson and normal components with a pre-specified correlation matrix and marginal distributions.
genPoisNor(n, no.norm, no.pois, cmat.star, lamvec, sd.vec, mean.vec)
Number of rows
Number of Poisson variables.
Number of normal variables.
The intermediate correlation matrix obtained from cmat.star
function.
A vector of marginal rates for Poisson variables.
A vector of means for the normal variables.
A vector of standard deviations for the normal variables.
A matrix of size no.pois
are Poisson variables.
# NOT RUN {
lamvec= c(0.05,0.07,0.09)
M=c(0.352, 0.265, 0.342, 0.09, 0.141, 0.121, 0.297,
-0.022, 0.177, 0.294, -0.044, 0.129, 0.1, 0.354, 0.386)
N=diag(6)
N[lower.tri(N)]=M
TV=N+t(N)
diag(TV)<-1
cstar = cmat.star(no.pois=3, no.norm=3, TV, lamvec)
mydata=genPoisNor(n=200, no.norm=3, no.pois=3, cmat.star=cstar,
lamvec, sd.vec=c(1,1,1), mean.vec=c(0,0,0))
# }
Run the code above in your browser using DataLab