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"))
22 name <- paste0("res_", n, "_", d, "_", link, "_6,3,1.RData")
23 params <- prms(name, method)
24 toprint <- c(toprint, c(
25 sum(abs(params[[1]] - params[[4]]$p)),
26 colSums(abs(params[[2]] - params[[4]]$beta)),
27 sum(abs(params[[3]] - params[[4]]$b))
30 print(toprint, digits=2)