brier_bipartite_matches: brier_bipartite_matches

Description Usage Arguments Value

View source: R/brier_bipartite_matches.R

Description

Computes all matches, then gets the brier scores for each.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
brier_bipartite_matches(
  x_mat,
  cov_x,
  weight_list,
  treat_vec,
  match_method = c("with_replacement", "optimal", "greedy"),
  n_sinks = 0L,
  caliper_list = gen_caliper_list(),
  propensity_list = match_propensity_list(NULL),
  sqrt_mahal = TRUE,
  tol_val = NULL,
  design = "cross_all",
  num_folds = 5,
  match_predict_function = match_predict_xgb(),
  silent = !interactive()
)

Arguments

x_mat

Input/design matrix

cov_x

The covariance of x_mat. Can be rank_adjusted by using covariance_with_ranks.

weight_list

List of weight vectors. See 'generate_random_weights' to automatically generate a reasonable set of vectors.

treat_vec

Logical (or 1/0) vector, indicating treatment (or control).

match_method

"with_replacement", "optimal", or "greedy"

n_sinks

Number of potential matches that don't need to be matched.

caliper_list

Forces matches that are close on some metric.

propensity_list

Default NULL. List of propensity scores.

sqrt_mahal

Whether to use square root of Mahalanobis distances.

tol_val

For optimal matches, you can set a tolerance to be within optimality of, which can be zero for perfect optimality.

design

See predict_prepare

num_folds

Number of CV folds to use

match_predict_function

Function to predict treated units.

silent

Whether to suppress messages as it's running.

Value

List of matches within sink values, and brier scores for each.


rzgross/uRbanmatching documentation built on Dec. 22, 2021, 8:20 p.m.