create_list_from_scratch_overall: Create a sparse list representation of treated-to-control...

View source: R/create_list_from_scratch_overall.R

create_list_from_scratch_overallR Documentation

Create a sparse list representation of treated-to-control distance matrix with a fixed number caliper with L1-distance.

Description

This function takes in a n-by-p matrix of observed covariates, a length-n vector of treatment indicator, a caliper, and construct a possibly sparse list representation of the distance matrix with Mahalanobis distance. Note that this function is of limited interest to most users.

Usage

create_list_from_scratch_overall(
  Z,
  X,
  exact = NULL,
  soft_exact = FALSE,
  p = NULL,
  caliper_low = NULL,
  caliper_high = NULL,
  k = NULL,
  penalty = Inf,
  dist_func = NULL
)

Arguments

Z

A length-n vector of treatment indicator.

X

A n-by-p matrix of covariates.

exact

A vector of strings indicating which variables are to be exactly matched.

soft_exact

If set to TRUE, the exact constraint is enforced up to a large penalty.

p

A length-n vector on which a caliper applies, e.g. a vector of propensity score.

caliper_low

Size of caliper_inf.

caliper_high

Size of caliper_sup.

k

Connect each treated to the nearest k controls

penalty

Penalty for violating the caliper. Set to Inf by default.

dist_func

A function used to calculate distance

Value

This function returns a list of three objects: start_n, end_n, and d. See documentation of function “create_list_from_mat” for more details.


match2C documentation built on March 31, 2023, 6:39 p.m.