Learn R Programming

PropScrRand (version 1.1.1)

piFunction: Get PBA Treatment Probability

Description

Used within calls to pba and pbaAgain to obtain the probability a unit is assigned treatment given its fitted propensity score.

Usage

piFunction(fit, kparam, qparam)

Arguments

fit

Fitted propensity score.

kparam

Balancing parameter.

qparam

Global target for proportion of units treated.

Value

A numeric object. In the conext of PBA, the probability of assignment to treatment for the current unit.

Details

The input kparam must be one of 0, Inf, or the ratio of two positive odd integers. Both fit and qparam must be between 0 and 1.

Examples

Run this code
# NOT RUN {
piFunction(fit=0.6, kparam=1, qparam=0.5)
piFunction(fit=0.6, kparam=5, qparam=0.5)
piFunction(fit=0.6, kparam=1/5, qparam=0.5)

piFunction(fit=0.6, kparam=1, qparam=2/3)
piFunction(fit=0.6, kparam=5, qparam=2/3)
piFunction(fit=0.6, kparam=1/5, qparam=2/3)
# }

Run the code above in your browser using DataLab