one_factor_search: one_factor_search

Description Usage Arguments Details Author(s) Examples

Description

Takes test group and control group (each as 3 column data.frames) with each observation being defined by one categorical value and one value from a continuous variable. Performs 1-1 matching on both factor and continuous values. Begins with first test observation, choosing closest match, and removing it from consideration. Moves down the list, continuing the selection process. Then performs the process in reverse, starting at the last test observation and working up. The forward and backward selections are evaluated based upon which has the lower sum of absolute deviations.

Usage

1
one_factor_search(raw_tests, raw_controls)

Arguments

raw_tests

The data.frame containing all of the tests

raw_controls

The data.frame containing all of the controls

Details

The tests are first parameter, and the controls are second. Make sure that the order of each data.frame is FACTOR, OBSERVATION ID, and CONTINUOUS VALUE.

Author(s)

Nicholas Sun <nicholas.sun@rutgers.edu>

Examples

1
2
3
raw_tests <- read.csv("raw_tests.csv")
raw_controls <- read.csv("raw_controls.csv")
two_factor_search(raw_tests, raw_controls) 

njjms/matchr documentation built on May 7, 2019, 3:15 p.m.