Tuesday, October 1, 2013

R ~ p, network aging






#2013 Oct 1
setwd("~/projects/jtb13")
rm( list = ls() );
set.seed(2013)

lambda = 1 / 25
m = 10 ; #1000 essential genes
n = 2

p_v = seq(-10,10,by=0.01)

# R = cmnp lambda (1-p)^(n-1)
Rfun = function(m, n, p, lambda ) {
  c = 1 / (1 - (1-p)^n ) #for un-normalized simulation, !!!! major bug fix 20131001
  R = c*m*n*(p*lambda)*(1-p)^(n-1) }

R_v = Rfun(m, n, p_v, lambda )
plot( R_v ~ p_v )





No comments:

Post a Comment