An internal function called by BPSM to sort propensity scores and match units with close propensity scores in the same treatment condition.
Usage
sortps(D, N, N1, p2, L, Data)
Arguments
D
Number of covariates including the intercept.
N
Number of units.
N1
Number of treated units.
p2
Estimated propensity scores.
L
Number of within-group matches requested for the AI method.
Data
A matrix containing Y, t, and X.
Details
The function generates the above arguments from the inputed data and returns IDs of the matched units with close propensity scores in the same treatment condition.