R: Computes an intermediate normal correlation matrix for...
intermediate.corr.PP
R Documentation
Computes an intermediate normal correlation matrix for Poisson variables given the specified correlation matrix
Description
This function computes the intermediate normal correlation matrix for Poisson-Poisson combinations before inverse cdf matching
as formulated in Amatya and Demirtas (2015).
Vector of elements below the diagonal of correlation matrix ordered column-wise.
corr.mat
Specified correlation matrix.
Value
A correlation matrix of size n.P*n.P.
References
Amatya, A. and Demirtas, H. (2015). Simultaneous generation of multivariate mixed data with Poisson and normal
marginals. Journal of Statistical Computation and Simulation, (85)15, 3129-3139.
See Also
intermediate.corr.PB, intermediate.corr.PC
Examples
n.P<-3
lambda.vec<-c(1,2,3)
corr.mat<-matrix(c(1,0.352,0.265,0.352,1,0.121,0.265,0.121,1),n.P,n.P)
intmatPP=intermediate.corr.PP(n.P,n.B=0,n.C=0,lambda.vec,corr.vec=NULL,corr.mat)
intmatPP
## Not run:
#See also cmat.star in R package PoisNor
#cmat.star(no.pois=3,no.norm=0,corMat=corr.mat,lamvec=lambda.vec)
## End(Not run)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PoisBinNonNor)
Loading required package: BB
Loading required package: corpcor
Loading required package: Matrix
Loading required package: mvtnorm
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PoisBinNonNor/intermediate.corr.PP.Rd_%03d_medium.png", width=480, height=480)
> ### Name: intermediate.corr.PP
> ### Title: Computes an intermediate normal correlation matrix for Poisson
> ### variables given the specified correlation matrix
> ### Aliases: intermediate.corr.PP
>
> ### ** Examples
>
> n.P<-3
> lambda.vec<-c(1,2,3)
> corr.mat<-matrix(c(1,0.352,0.265,0.352,1,0.121,0.265,0.121,1),n.P,n.P)
> intmatPP=intermediate.corr.PP(n.P,n.B=0,n.C=0,lambda.vec,corr.vec=NULL,corr.mat)
> intmatPP
[,1] [,2] [,3]
[1,] 1.0000000 0.3926818 0.2942221
[2,] 0.3926818 1.0000000 0.1290156
[3,] 0.2942221 0.1290156 1.0000000
>
> ## Not run:
> ##D #See also cmat.star in R package PoisNor
> ##D #cmat.star(no.pois=3,no.norm=0,corMat=corr.mat,lamvec=lambda.vec)
> ## End(Not run)
>
>
>
>
>
> dev.off()
null device
1
>