createWeights: Create control weights for matches dataset, and final data...

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Create control weights for matches dataset, and final data output As it's an internal helper function to aid in testing, it is not exported for use outside of the package.

Usage

1
createWeights(matches, data, id)

Arguments

matches

Dataframe containing the matches from comparison_pool

data

The original data provided for the function.

id

The individual id variable.

Value

A list containing two Dataframes. Matches - an updated dataset with control weights added, and data_full an updated version of the original data with weights added.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run:  
id <- "indiv_id"
data(package="rollmatch", "rem_synthdata")
load(url(paste0("https://github.com/RTIInternational/rollmatch/raw/master/",
                "tests/testthat/matches.rda")))
data <- rem_synthdata
matches <- addMatchesColumns(matches)
out_list <- createWeights(matches, data, id)
head(a)

## End(Not run)

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