Learn R Programming

ebdbNet (version 1.1)

zCutoff: Calculate Z-Scores Based on Posterior Means and Variances

Description

Function to generate z-scores based on posterior means and variances of network parameters.

Usage

zCutoff(Post, varPost)

Arguments

Post
Posterior mean of interaction matrix
varPost
Posterior variance of interaction matrix

Value

  • zMatrix of z-scores
  • z95Matrix indicating edges significant at a 95% level of significance
  • z99Matrix indicating edges significant at a 99% level of significance
  • z99.9Matrix indicating edges significant at a 99.9% level of significance

Details

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.

See Also

ebdbn

Examples

Run this code
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%

Run the code above in your browser using DataLab