Closed andland closed 9 years ago
n = 100 d = 10 x = matrix(sample(c(0, 1), d * n, TRUE), nrow = n) log_like_Bernoulli(x = x, theta = outer(rep(1,n), gtools::logit(colMeans(x, na.rm = TRUE))))
which_missing = matrix(runif(n * d) < 0.25, nrow = d) is.na(x[which_missing]) <- TRUE log_like_Bernoulli(x = x, theta = outer(rep(1,n), gtools::logit(colMeans(x, na.rm = TRUE))))
loglike goes up with less data?
n = 100 d = 10 x = matrix(sample(c(0, 1), d * n, TRUE), nrow = n) log_like_Bernoulli(x = x, theta = outer(rep(1,n), gtools::logit(colMeans(x, na.rm = TRUE))))
which_missing = matrix(runif(n * d) < 0.25, nrow = d) is.na(x[which_missing]) <- TRUE log_like_Bernoulli(x = x, theta = outer(rep(1,n), gtools::logit(colMeans(x, na.rm = TRUE))))
loglike goes up with less data?