my.knn.binary: K-nearest neighbors matching - binary treatment

Description Usage Arguments Examples

View source: R/my.knn.binary.R

Description

For multiple metrics - Euclidean and Mahalanobis Written for data.table arguments.

Usage

1
2
3
4
5
6
7
8
9
my.knn.binary(
  Yvar,
  Xvars,
  read_data,
  metric = "mahalanobis",
  binary_treat_var,
  tolerance = 1e-16,
  K = 1L
)

Arguments

Yvar

Dependent variable

Xvars

Character vector of control variables

read_data

Of type data.table - source of data

metric

Metric for comparison

binary_treat_var

Binary treatment indicator

tolerance

Tolerance level for matrix inversion

K

number of neighbors

predict_data

Of type data.table - points for prediction

Examples

1

joshuadhigbee/myAppliedMetrics documentation built on March 19, 2021, 3:45 p.m.