R version 4.4.0 RC (2024-04-16 r86468 ucrt) -- "Puppy Cup" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(Amelia) Loading required package: Rcpp ## ## Amelia II: Multiple Imputation ## (Version 1.8.2, built: 2024-04-10) ## Copyright (C) 2005-2024 James Honaker, Gary King and Matthew Blackwell ## Refer to http://gking.harvard.edu/amelia/ for more information ## > > data(freetrade) > > bds <- matrix(c(3, 30, 32), nrow = 1, ncol = 3) > > set.seed(12345) > a.out.bds <- amelia(freetrade, ts = "year", cs = "country", bounds = bds, + max.resample = 10, p2s = 0) > > out <- range(a.out.bds$imputations$imp1[is.na(freetrade[,3]),3]) > > > > if (out[1] < 30) { + stop("lower bounds not working") + } > > if (out[2] > 32) { + stop("upper bounds not working") + } > > proc.time() user system elapsed 0.26 0.09 0.31