diff --git a/R/sysdata.rda b/R/sysdata.rda index 2064e02..f58c2da 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/inst/examples/ess.R b/inst/examples/ess.R index 264acba..dfe433e 100644 --- a/inst/examples/ess.R +++ b/inst/examples/ess.R @@ -24,15 +24,14 @@ round(sum(ab_matched)) ess(bmix, method="morita") # Predictive consistency of elir -if(interactive()) { - # takes a moment to run - n_forward <- 1E2 - bmixPred <- preddist(bmix, n=n_forward) - pred_samp <- rmix(bmixPred, 1E3) - pred_ess <- sapply(pred_samp, function(r) ess(postmix(bmix, r=r, n=n_forward), "elir") ) - ess(bmix, "elir") - mean(pred_ess) - n_forward -} +n_forward <- 1E1 +bmixPred <- preddist(bmix, n=n_forward) +pred_samp <- rmix(bmixPred, 1E2) +# use more samples here for greater accuracy +# pred_samp <- rmix(bmixPred, 1E3) +pred_ess <- sapply(pred_samp, function(r) ess(postmix(bmix, r=r, n=n_forward), "elir") ) +ess(bmix, "elir") +mean(pred_ess) - n_forward # Normal mixture example nmix <- mixnorm(rob=c(0.5, 0, 2), inf=c(0.5, 3, 4), sigma=10) diff --git a/man/ess.Rd b/man/ess.Rd index 717c6ee..464388a 100644 --- a/man/ess.Rd +++ b/man/ess.Rd @@ -120,9 +120,11 @@ round(sum(ab_matched)) ess(bmix, method="morita") # Predictive consistency of elir -n_forward <- 1E2 +n_forward <- 1E1 bmixPred <- preddist(bmix, n=n_forward) -pred_samp <- rmix(bmixPred, 1E3) +pred_samp <- rmix(bmixPred, 1E2) +# use more samples here for greater accuracy +# pred_samp <- rmix(bmixPred, 1E3) pred_ess <- sapply(pred_samp, function(r) ess(postmix(bmix, r=r, n=n_forward), "elir") ) ess(bmix, "elir") mean(pred_ess) - n_forward diff --git a/tools/make-ds.R b/tools/make-ds.R index 0013846..14cd272 100644 --- a/tools/make-ds.R +++ b/tools/make-ds.R @@ -43,7 +43,7 @@ make_internal_ds <- function() { calibration_meta["MD5"] <- vals["MD5"] pkg_create_date <- Sys.time() - pkg_sha <- "3377b7c" + pkg_sha <- "91e8f18" if (gsub("\\$", "", pkg_sha) == "Format:%h") { pkg_sha <- system("git rev-parse --short HEAD", intern=TRUE)