pba {PropScrRand} | R Documentation |
Propensity-Biased Allocation
Description
Performs propensity-biased allocation for assigning a new unit to treatment in a sequential design with two treatment levels (i.e., treatment and control).
Usage
pba(x, tr, newx, k = 1, global = 0.5)
pbaAgain(previous, newx, k = NA)
Arguments
x |
A data frame of the covariate values of previously assigned units. |
tr |
A vector of treatment assignments (0 or 1) for previously assigned units. |
newx |
Data frame of covariate values of the new unit. |
k |
Balancing parameter. |
global |
Global target proportion to be treated. |
previous |
The output of a previous call to |
Details
The function pba
generates a treatment assignment for a new unit. The steps of the process include regressesing tr
on x
by logistic regression, computeing the fitted value of the new unit using covarate values in newx
, and transforming the fitted propensity score into the probability of treatment by a call to piFunction
using k
and global
as parameters. The balancing parameter k
must be one of 0
, Inf
, or the ratio of two positive odd integers. Small values of k
result in less restrictive randomization while larger values of k
result in more forced balance. In particular, k = 0
is equivalent to pure randomization and k = Inf
results in deterministic allocation. Finally, a treatment assignment for the new unit is generated via a Bernoulli trial with probability from piFunction
.
The function pbaAgain
takes as input the output from a previous call to pba
or pbaAgain
and runs pba
for the new unit using the values of newx
. If k = NA
(the default), the value of k
from previous
is used; otherwise, the provided value of k
is used. The parameter global
is assumed to stay the same throughout the trial. The output of pbaAgain
contains the same information as pba
.
Value
results |
A list of results from the PBA procedure. |
phat |
The fitted propensity score for the new unit. |
ptreat |
The probability of assignment to the treatment group for the new unit. |
newtr |
Result of random assignment using |
input |
A list of inputs to PBA procdure. Used in future calls to |
x |
Input |
tr |
Input |
newx |
Input |
k |
Input |
global |
Input |
Author(s)
Travis Loux
References
Loux, T.M. (2013) A simple, flexible, and effective covariate-adaptive treatment allocation procedure. Statistics in Medicine 32(22), 3775-3787. DOI: 10.1002/sim.5837
Examples
x0 = data.frame(matrix(rnorm(60), ncol=3))
t0 = rbinom(nrow(x0), size=1, prob=0.5)
x1 = data.frame(matrix(rnorm(3), ncol=3))
trial1 = pba(x=x0, tr=t0, newx=x1, k=Inf)
x2 = data.frame(matrix(rnorm(3), ncol=3))
trial2 = pbaAgain(previous=trial1, newx=x2)
x3 = data.frame(matrix(rnorm(3), ncol=3))
trial3 = pbaAgain(previous=trial2, newx=x3, k=5/3)