Description Usage Arguments Value Examples
View source: R/Weight_balance_functions.R
Calculates the balance of covariates as a function of weight when fitting DAPS for multiple values of w.
1 2 3 4 5 |
dataset |
Data frame including treatment, outcome, coordinates, propensity score estimates (named prop.scores) and observed confounders. |
weights |
The weights on which we want to fit DAPS. Vector. |
cov.cols |
The indices of the columns we want to balance. |
trt.col |
The index of the binary treatment column. If treatment is named 'X' this can be NULL. |
out.col |
Can be NULL if the outcome column is named 'Y'. Otherwise, it should the index of the outcome column. |
coords.columns |
If the columns of coordinates are not named 'Longitude' and 'Latitude', coords.columns are the column indices corresponding to longitude and latitude accordingly. |
caliper |
The value of the caliper that will be used. |
caliper_type |
Whether we want the caliper to be on DAPS or on the PS. caliper_type must be either 'DAPS', or 'PS'. |
coord_dist |
Set to true when we want to use a distance function that calculates the spherical distance of points instead of Euclidean. Defaults to FALSE. |
distance |
Function that takes in the distance matrix and returns the standardized distance matrix. Defaults to the funcion that subtracks the minimum and divides by the range. |
remove.unmatchables |
Logical. Argument of the optmatch function. Defaults to FALSE. If set to FALSE, the matching fails unless all treated units are matched. If set to TRUE, matching might return matches only for some of the treated units. |
A list including: a 3-dimensional array. Dimensions correspond to weights, before/after matching and covariates. Balance can be plotted using PlotWeightBalance function. A list of the pairs for the different weights.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.