Package: GreedyExperimentalDesign 1.5.6.1

Adam Kapelner

GreedyExperimentalDesign: Greedy Experimental Design Construction

Computes experimental designs for a two-arm experiment with covariates via a number of methods: (0) complete randomization and randomization with forced-balance, (1) Greedily optimizing a balance objective function via pairwise switching. This optimization provides lower variance for the treatment effect estimator (and higher power) while preserving a design that is close to complete randomization. We return all iterations of the designs for use in a permutation test, (2) The second is via numerical optimization (via 'gurobi' which must be installed, see <https://www.gurobi.com/documentation/9.1/quickstart_windows/r_ins_the_r_package.html>) a la Bertsimas and Kallus, (3) rerandomization, (4) Karp's method for one covariate, (5) exhaustive enumeration to find the optimal solution (only for small sample sizes), (6) Binary pair matching using the 'nbpMatching' library, (7) Binary pair matching plus design number (1) to further optimize balance, (8) Binary pair matching plus design number (3) to further optimize balance, (9) Hadamard designs, (10) Simultaneous Multiple Kernels. In (1-9) we allow for three objective functions: Mahalanobis distance, Sum of absolute differences standardized and Kernel distances via the 'kernlab' library. This package is the result of a stream of research that can be found in Krieger, A, Azriel, D and Kapelner, A "Nearly Random Designs with Greatly Improved Balance" (2016) <arxiv:1612.02315>, Krieger, A, Azriel, D and Kapelner, A "Better Experimental Design by Hybridizing Binary Matching with Imbalance Optimization" (2021) <arxiv:2012.03330>.

Authors:Adam Kapelner [aut, cre], David Azriel [aut], Abba Krieger [aut]

GreedyExperimentalDesign_1.5.6.1.tar.gz
GreedyExperimentalDesign_1.5.6.1.zip(r-4.5)GreedyExperimentalDesign_1.5.6.1.zip(r-4.4)GreedyExperimentalDesign_1.5.6.1.zip(r-4.3)
GreedyExperimentalDesign_1.5.6.1.tgz(r-4.4-x86_64)GreedyExperimentalDesign_1.5.6.1.tgz(r-4.4-arm64)GreedyExperimentalDesign_1.5.6.1.tgz(r-4.3-x86_64)GreedyExperimentalDesign_1.5.6.1.tgz(r-4.3-arm64)
GreedyExperimentalDesign_1.5.6.1.tar.gz(r-4.5-noble)GreedyExperimentalDesign_1.5.6.1.tar.gz(r-4.4-noble)
GreedyExperimentalDesign_1.5.6.1.tgz(r-4.4-emscripten)GreedyExperimentalDesign_1.5.6.1.tgz(r-4.3-emscripten)
GreedyExperimentalDesign.pdf |GreedyExperimentalDesign.html
GreedyExperimentalDesign/json (API)

# Install 'GreedyExperimentalDesign' in R:
install.packages('GreedyExperimentalDesign', repos = c('https://kapelner.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kapelner/greedyexperimentaldesign/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openjdk– OpenJDK Java runtime, using Hotspot JIT

On CRAN:

35 exports 1.19 score 78 dependencies 1 dependents 16 scripts 369 downloads

Last updated 1 years agofrom:565db6345e. Checks:OK: 1 WARNING: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 25 2024
R-4.5-win-x86_64WARNINGAug 25 2024
R-4.5-linux-x86_64WARNINGAug 25 2024
R-4.4-win-x86_64WARNINGAug 25 2024
R-4.4-mac-x86_64WARNINGAug 25 2024
R-4.4-mac-aarch64WARNINGAug 25 2024
R-4.3-win-x86_64WARNINGAug 25 2024
R-4.3-mac-x86_64WARNINGAug 25 2024
R-4.3-mac-aarch64WARNINGAug 25 2024

Exports:complete_randomizationcomplete_randomization_with_forced_balancedcompute_gram_matrixcompute_objective_valcompute_randomization_metricscomputeBinaryMatchStructuregenerate_stdzied_design_matrixgreedy_orthogonalization_curationgreedy_orthogonalization_curation2hadamardExperimentalDesignimbalanced_block_designsimbalanced_complete_randomizationinitBinaryMatchExperimentalDesignSearchinitBinaryMatchFollowedByGreedyExperimentalDesignSearchinitBinaryMatchFollowedByRerandomizationDesignSearchinitGreedyExperimentalDesignObjectinitGreedyMultipleKernelExperimentalDesignObjectinitKarpExperimentalDesignObjectinitOptimalExperimentalDesignObjectinitRerandomizationExperimentalDesignObjectoptimize_asymmetric_treatment_assignmentplot_obj_val_by_iterplot_obj_val_order_statisticresultsBinaryMatchSearchresultsBinaryMatchThenGreedySearchresultsBinaryMatchThenRerandomizationSearchresultsGreedySearchresultsKarpSearchresultsMultipleKernelGreedySearchresultsOptimalSearchresultsRerandomizationSearchsearchTimeElapsedstandardize_data_matrixstartSearchstopSearch

Dependencies:backportsbase64encbslibcachemcheckmatecliclustercolorspacedata.tableDBIdigestevaluatefansifarverfastmapfontawesomeforeignFormulafsggplot2gluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsisobandjquerylibjsonlitekernlabknitrlabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmimeminqamitoolsmunsellnbpMatchingnlmennetnumDerivpillarpkgconfigR6rappdirsRColorBrewerRcppRcppArmadillorJavarlangrlistrmarkdownrpartrstudioapisassscalesstringistringrsurveysurvivaltibbletinytexutf8vctrsviridisviridisLitewithrxfunXMLyaml

Readme and manuals

Help Manual

Help pageTopics
Data concerning automobile prices.automobile
Implements complete randomization (without forced balance)complete_randomization
Implements forced balanced randomizationcomplete_randomization_with_forced_balanced
Gram Matrix Computationcompute_gram_matrix
Computes Objective Value From Allocation Vectorcompute_objective_val
Computes Randomization Metrics (explained in paper) about a design algorithmcompute_randomization_metrics
Compute Binary Matching StrcuturecomputeBinaryMatchStructure
Generates a design matrix with standardized predictors.generate_stdzied_design_matrix
Curate More Orthogonal Vectors Greedilygreedy_orthogonalization_curation
Curate More Orthogonal Vectors Greedilygreedy_orthogonalization_curation2
Greedy Experimental Design SearchGreedyExperimentalDesign
Create a Hadamard DesignhadamardExperimentalDesign
Implements unequally allocated block designsimbalanced_block_designs
Implements unequally allocated complete randomizationimbalanced_complete_randomization
Begin a Binary Match SearchinitBinaryMatchExperimentalDesignSearch
Begin a Search for Binary Matching Followed by Greedy Switch DesignsinitBinaryMatchFollowedByGreedyExperimentalDesignSearch
Begin a Search for Binary Matching Followed by RerandomizationinitBinaryMatchFollowedByRerandomizationDesignSearch
Begin A Greedy Pair Switching SearchinitGreedyExperimentalDesignObject
Begin A Greedy Pair Multiple Kernel Switching SearchinitGreedyMultipleKernelExperimentalDesignObject
Begin Karp SearchinitKarpExperimentalDesignObject
Begin a Search for the Optimal SolutioninitOptimalExperimentalDesignObject
Begin a Rerandomization SearchinitRerandomizationExperimentalDesignObject
Compute Optimal Number of Treatments/Controlsoptimize_asymmetric_treatment_assignment
Plots the objective value by iterationplot_obj_val_by_iter
Plots an order statistic of the object value as a function of number of searchesplot_obj_val_order_statistic
Plots a summary of a greedy search object objectplot.greedy_experimental_design_search
Plots a summary of a 'greedy_multiple_kernel_experimental_design' objectplot.greedy_multiple_kernel_experimental_design
Prints a summary of a 'binary_match_structure' objectprint.binary_match_structure
Prints a summary of a 'binary_then_greedy_experimental_design' objectprint.binary_then_greedy_experimental_design
Prints a summary of a 'binary_then_rerandomization_experimental_design' objectprint.binary_then_rerandomization_experimental_design
Prints a summary of a 'greedy_experimental_design_search' objectprint.greedy_experimental_design_search
Prints a summary of a 'greedy_multiple_kernel_experimental_design' objectprint.greedy_multiple_kernel_experimental_design
Prints a summary of a 'karp_experimental_design_search' objectprint.karp_experimental_design_search
Prints a summary of a 'optimal_experimental_design_search' objectprint.optimal_experimental_design_search
Prints a summary of a 'pairwise_matching_experimental_design_search' objectprint.pairwise_matching_experimental_design_search
Prints a summary of a 'rerandomization_experimental_design_search' objectprint.rerandomization_experimental_design_search
Binary Pair Match SearchresultsBinaryMatchSearch
Returns unique allocation vectors that are binary matchedresultsBinaryMatchThenGreedySearch
Returns unique allocation vectors that are binary matchedresultsBinaryMatchThenRerandomizationSearch
Returns the results (thus far) of the greedy design searchresultsGreedySearch
Returns the results (thus far) of the karp design searchresultsKarpSearch
Returns the results (thus far) of the greedy design search for multiple kernelsresultsMultipleKernelGreedySearch
Returns the results (thus far) of the optimal design searchresultsOptimalSearch
Returns the results (thus far) of the rerandomization design searchresultsRerandomizationSearch
Returns the amount of time elapsedsearchTimeElapsed
Standardizes the columns of a data matrix.standardize_data_matrix
Starts the parallelized greedy design search.startSearch
Stops the parallelized greedy design search.stopSearch
Prints a summary of a 'binary_match_structure' objectsummary.binary_match_structure
Prints a summary of a 'binary_then_greedy_experimental_design' objectsummary.binary_then_greedy_experimental_design
Prints a summary of a 'binary_then_rerandomization_experimental_design' objectsummary.binary_then_rerandomization_experimental_design
Prints a summary of a 'greedy_experimental_design_search' objectsummary.greedy_experimental_design_search
Prints a summary of a 'greedy_multiple_kernel_experimental_design' objectsummary.greedy_multiple_kernel_experimental_design
Prints a summary of a 'karp_experimental_design_search' objectsummary.karp_experimental_design_search
Prints a summary of a 'optimal_experimental_design_search' objectsummary.optimal_experimental_design_search
Prints a summary of a 'pairwise_matching_experimental_design_search' objectsummary.pairwise_matching_experimental_design_search
Prints a summary of a 'rerandomization_experimental_design_search' objectsummary.rerandomization_experimental_design_search