trimPool: Use a caliper to trim the comparison data to only...

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Use a caliper to trim the comparison data to only observations within threshold

Usage

1
trimPool(alpha, data_pool, lr_result, weighted_pooled_stdev = FALSE)

Arguments

alpha

The pre-specified distance within which to allow matching. The caliper width is calculated as the alpha multiplied by the pooled standard deviation of the propensity scores or the logit of the propensity scores - depending on the value of match_on.

lr_result

Dataframe of results from model in runModel.

weighted_pooled_stdev

Boolean. FALSE for average pooled standard deviation and TRUE for weighted pooled standard deviation.

dataPool

Dataframe of comparison data to be trimmed.

Value

Dataframe of the trimmed comparisons based on the alpha value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run:  
load(url(paste0("https://github.com/RTIInternational/rollmatch/raw/master/",
                 "tests/testthat/lr_result.rda")))
load(url(paste0("https://github.com/RTIInternational/rollmatch/raw/master/",
                "tests/testthat/comparison_pool.rda")))
trimmed_pool <- trimPool(alpha = .2, data_pool = comparison_pool,
                         lr_result = lr_result)
head(trimmed_poll)

## End(Not run)
                         

rollmatch documentation built on May 31, 2018, 1:04 a.m.