ps.trim: Trim Population

Description Usage Arguments Details Value Examples

View source: R/psTrim.R

Description

Trims the population based on the propensity scores

Usage

1
2
ps.trim(data, trim.method = "overlap", trim.quantile = 0.95,
  quantile.group = "all")

Arguments

data

Data Frame - containing the dataset with previously calculated PS. The data frame must contain a treatment indicator variable called 'treat' and propensity score values called 'ps_values'.

trim.method

String, specifying the method to use to trim the dataset. Available options are "overlap" (default) to trim the non-overlapping tails of the control and treatment distributions, or "quantile" to trim to an interquantil range.

trim.quantile

Number, specifying the interquantile range to be trimmed. For example, 0.95 indicates that the dataset should be trimmed to the 0.025 / 0.975 interquantile range.

quantile.group

Specifies the group on which to determine the quantile values. Options are "all" (default) to determine the quantile values based on the propensity scores for the entire population, or "treat" to determine the quantile values based on the propensity scores for only the treatment group

Details

This function trims the supplied population based on propensity scores. Trimming can be based on the overlapping regions, or a specified interquantile range.

Value

Data Frame - trimmed dataset

Examples

1
2
3
4
5
## Not run: 
ps.trim(myData)
ps.trim(myData, trim.method = "quantile", trime.quantile = 0.90)

## End(Not run)

OHDSI/Centaur documentation built on May 9, 2017, 3:24 p.m.