matchit: Perform matchit algorithm in database.

Description Usage Arguments Details See Also

Description

The matchit function wraps all steps for a matchit analysis: 1) data prep, if a wide table is provided. 2) logistic regression 3) propensity score matching 4) matchit All steps are done in-database with DB Lytix.

Usage

1
2
matchit(formula, data, method = "nearest", distance = "logit",
  distance.options = list(), discard = "none", reestimate = FALSE, ...)

Arguments

formula

This argument takes the usual syntax of R formula, ‘treat ~ x1 + x2’, where ‘treat’ is a binary treatment indicator and ‘x1’ and ‘x2’ are the pre-treatment covariates. Both the treatment indicator and pre-treatment covariates must be contained in the same data frame, which is specified as ‘data’ (see below). No operators in formulas are currently supported in AdapteR.

data

This argument specifies the data frame containing the variables called in ‘formula’. Either a FLTable or prepared data in a deep table.

method

(for API compatibility with MatchIt, must be nearest)

distance

(for API compatibility with MatchIt, must be logit)

distance.options

(for API compatibility with MatchIt, ignored)

discard

(for API compatibility with MatchIt, must be none)

reestimate

(for API compatibility with MatchIt, not supported)

...

additional arguments. Can be the following:

  • catToDummy - Transform categorical variables to numerical values either using dummy variables or by using Empirical Logit. If the value is 1, transformation is done using dummy variables, else if the value is 0, transformation is done using Empirical Logit.

  • performNorm - 0/1 indicating whether to perform standardization of data.

  • performVarReduc - 0/1. If the value is 1, the stored procedure eliminates variables based on standard deviation and correlation.

  • makeDataSparse - If 0,Retains zeroes and NULL values from the input table. If 1, Removes zeroes and NULL. If 2,Removes zeroes but retains NULL values.

  • minStdDev - Minimum acceptable standard deviation for elimination of variables. Any variable that has a standard deviation below this threshold is eliminated. This parameter is only consequential if the parameter PerformVarReduc = 1. Must be >0.

  • maxCorrel - Maximum acceptable absolute correlation between a pair of columns for eliminating variables. If the absolute value of the correlation exceeds this threshold, one of the columns is not transformed. Again, this parameter is only consequential if the parameter PerformVarReduc = 1. Must be >0 and <=1.

  • classSpec - list describing the categorical dummy variables. Should include the reference value for each column in the list.

  • whereconditions - takes the where_clause as a string to subset rows.

  • excludeCols character vector specifying columns to be excluded from Analysis. Can also be deduced from the formula object.

Details

The function returns a list with the logistic regression model, a FLSimpleVector with the propensities FLSimpleVector with discarded obsids, and a closure function whereClause for restricting a FLTable or FLVector to the matched set for further statistical analyses.

See Also

matchit for R reference implementation.


Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.