ps.stratify: Compute Strata

Description Usage Arguments Details Value Examples

Description

Stratifies the popultion.

Usage

1
ps.stratify(data, n = 5)

Arguments

data

Data Frame - containing the dataset with previously calculated PS. The data frame must contain propensity scores in a variable called 'ps_values'.

n

Number of strata to divide the dataset into (default 5)

Details

This function stratifies a popultion based on an estimated propensity score. The stratum of each subject is added to the dataset as a categorical value.

Value

Vector - containing the categorical strata number for each subject

Examples

1
2
3
4
5
## Not run: 
ps.stratify(myData)
ps.stratify(myData, n = 10)

## End(Not run)

OHDSI/Centaur documentation built on May 7, 2019, 8:22 p.m.