R/simY_bin.R

Defines functions simY_bin

Documented in simY_bin

#' Simulate a network, i.e. a binary relational matrix
#' 
#' Simulates a network, i.e. a binary relational matrix
#' 
#' 
#' @usage simY_bin(EZ, rho)
#' @param EZ square matrix giving the expected value of the latent Z matrix
#' @param rho dyadic correlation
#' @return a square binary matrix
#' @author Peter Hoff
#' @export simY_bin
simY_bin <-
function(EZ,rho)
{
  ZS<-simZ(EZ,rho) 
  YS<-1*(ZS>0) ; diag(YS)<-NA
YS
}

Try the amen package in your browser

Any scripts or data that you put into this service are public.

amen documentation built on Jan. 13, 2021, 9:17 p.m.