1 prms <- function(name, idx)
4 d <- nrow(mr[[1]][[1]])-2
5 p <- colMeans(do.call(rbind, lapply(mr[[idx]], function(m) m[1,])))
6 b <- colMeans(do.call(rbind, lapply(mr[[idx]], function(m) m[2+d,])))
8 beta <- (1/L) * Reduce("+", lapply(mr[[idx]], function(m) m[2:(d+1),]))
9 list(p, beta, b, mr_params)
12 pprms <- function(link)
14 for (n in c("5000", "10000", "100000", "500000", "1000000"))
21 name <- paste0("res_", n, "_", d, "_", link, ".RData")
22 params <- prms(name, method)
23 toprint <- c(toprint, c(
24 sum(abs(params[[1]] - params[[4]]$p)),
25 colSums(abs(params[[2]] - params[[4]]$beta)),
26 sum(abs(params[[3]] - params[[4]]$b))
29 print(toprint, digits=2)