zCutoff {ebdbNet} | R Documentation |
Function to generate z-scores based on posterior means and variances of network parameters.
zCutoff(Post, varPost)
Post |
Posterior mean of interaction matrix |
varPost |
Posterior variance of interaction matrix |
Calculate the z-scores of a matrix based on a posterior mean and variance from ebdbn
. Note that
the posterior distributions from the linear feedback state space model are all Gaussian.
z |
Matrix of z-scores |
z95 |
Matrix indicating edges significant at a 95% level of significance |
z99 |
Matrix indicating edges significant at a 99% level of significance |
z99.9 |
Matrix indicating edges significant at a 99.9% level of significance |
Andrea Rau
library(ebdbNet) tmp <- runif(1) ## Initialize random number generator set.seed(125214) ## Save seed ## 10 observed variables P <- 10 ## Create artificial posterior mean and covariance matrix DPost <- matrix(rnorm(P*P), nrow = P, ncol = P) DvarPost <- vector("list", P) for(i in 1:P) { DvarPost[[i]] <- diag(0.5, P) } # Use zscore significance level of 95 z <- zCutoff(DPost, DvarPost)$z95 ## 17 edges with z-scores significant at 95