matching_l1: Match observations

Description Usage Arguments Value

View source: R/matching_l1.R

Description

Matching function using L1 distance on single exposure level w

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
matching_l1(
  w,
  dataset,
  e_gps_pred,
  e_gps_std_pred,
  w_resid,
  gps_mx,
  w_mx,
  gps_model = "parametric",
  delta_n = 1,
  scale = 0.5,
  nthread = 1,
  optimized_compile
)

Arguments

w

the targeted single exposure levels.

dataset

a completed observational data frame or matrix containing (Y, w, gps, counter, row_index, c).

e_gps_pred

a vector of predicted gps values obtained by Machine learning methods.

e_gps_std_pred

a vector of predicted std of gps obtained by Machine learning methods.

w_resid

the standardized residuals for w.

gps_mx

a vector with length 2, includes min(gps), max(gps)

w_mx

a vector with length 2, includes min(w), max(w).

gps_model

Model type which is used for estimating GPS value, including parametric (default) and non-parametric.

delta_n

a specified caliper parameter on the exposure (Default is 1).

scale

a specified scale parameter to control the relative weight that is attributed to the distance measures of the exposure versus the GPS estimates (Default is 0.5).

nthread

Number of available cores.

optimized_compile

An option to activate optimized compilation.

Value

dp: The function returns a data.table saved the matched points on by single exposure level w by the proposed GPS matching approaches.


CausalGPS documentation built on Feb. 7, 2022, 5:12 p.m.