2014-03-04から1日間の記事一覧

イベント集積に関するメモ

n <- 1000 # ランダムに脱落する prob <- c(0.5,0.5) censor <- sample(0:1,n,replace=TRUE,prob=prob) # 指数乱数で死亡時刻が決まる #times <- cumsum(rexp(n)) times <- sort(rexp(n)) x <- ((n-1):0)/(n:1) v <- rep(1,length(x)) v[which(censor == 1)] …

イベント集積