Open andland opened 9 years ago
rows = 100 cols = 10 set.seed(1) mat_np = outer(rnorm(rows), rnorm(cols)) mat = matrix(rpois(rows * cols, c(exp(mat_np))), rows, cols) missing_mat = matrix(runif(rows * cols) <= 0.2, rows, cols) count_mat_m = mat is.na(count_mat_m[missing_mat]) <- TRUE pca = generalizedPCA(count_mat_m, k = 1, M = 4, family = "gaussian") plot(pca)
It seems to be okay with k >= 2
k >= 2
Also seems okay with main_effects = FALSE and k = 1. I'm pretty sure the main effects are the problem.
main_effects = FALSE
k = 1