optimal_rerandomization_exact {OptimalRerandExpDesigns}R Documentation

Find the Optimal Rerandomization Design Exactly

Description

Finds the optimal rerandomization threshold based on a user-defined quantile and a function that generates the non-linear component of the response

Usage

optimal_rerandomization_exact(
  W_base_object,
  estimator = "linear",
  q = 0.95,
  skip_search_length = 1,
  smoothing_degree = 1,
  smoothing_span = 0.1,
  z_sim_fun,
  N_z = 1000,
  dot_every_x_iters = 100
)

Arguments

W_base_object

An object that contains the assignments to begin with sorted by

estimator

"linear" for the covariate-adjusted linear regression estimator (default).

q

The tail criterion's quantile of MSE over z's. The default is 95%.

skip_search_length

In the exhaustive search, how many designs are skipped? Default is 1 for full exhaustive search through all assignments provided for in W_base_object.

smoothing_degree

The smoothing degree passed to loess.

smoothing_span

The smoothing span passed to loess.

z_sim_fun

This function returns vectors of numeric values of size n. No default is provided.

N_z

The number of times to simulate z's within each strategy.

dot_every_x_iters

Print out a dot every this many iterations. The default is 100. Set to NULL for no printout.

Value

A list containing the optimal design threshold, strategy, and other information.

Author(s)

Adam Kapelner

Examples

 
 n = 100
 p = 10
 X = matrix(rnorm(n * p), nrow = n, ncol = p)
 X = apply(X, 2, function(xj){(xj - mean(xj)) / sd(xj)})
 S = 25000
 
 W_base_obj = generate_W_base_and_sort(X, max_designs = S)
 design = optimal_rerandomization_exact(W_base_obj, 
				z_sim_fun = function(){rnorm(n)}, 
				skip_search_length = 10)
 design
	

[Package OptimalRerandExpDesigns version 1.1 Index]