View source: R/create_list_from_scratch_overall.R
create_list_from_scratch_overall | R Documentation |
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.
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
)
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 |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.