prepost.test: Pretest-posttest RCT for quantitative observations with...

View source: R/prepost.R

prepost.testR Documentation

Pretest-posttest RCT for quantitative observations with possible missing values

Description

In a typical pretest-posttest RCT, subjects are randomized to two treatments, and response is measured at baseline, prior to intervention with the randomized treatment (pretest), and at prespecified follow-up time (posttest). Interest focuses on the effect of treatments on the change between mean baseline and follow-up response. Missing posttest response for some subjects is routine, and disregarding missing cases can lead to invalid inference.

Usage

prepost.test(baseline, post, treatment, conf.level = 0.95, delta = "estimate")

Arguments

baseline

A vector of quantitative baseline measurements

post

A vector of quantitative post-test measurements with same length as baseline. May contain missing values

treatment

A vector of 0s and 1s corresponding to treatment indicator. 1 = treated, Same length as baseline

conf.level

confidence level of the interval

delta

A numeric between 0 and 1 OR the string "estimate" (the default). The proportion of observation treated.

Author(s)

Claus Ekstrom ekstrom@sund.ku.dk

References

Marie Davidian, Anastasios A. Tsiatis and Selene Leon (2005). "Semiparametric Estimation of Treatment Effect in a Pretest-Posttest Study with Missing Data". Statistical Science 20, 261-301.

See Also

chisq.test

Examples

# From Altman
expo = c(rep(1,9),rep(0,7))
bp1w = c(137,120,141,137,140,144,134,123,142,139,134,136,151,147,137,149)
bp_base = c(147,129,158,164,134,155,151,141,153,133,129,152,161,154,141,156)
diff = bp1w-bp_base
prepost.test(bp_base, bp1w, expo)


ekstroem/MESS documentation built on July 28, 2023, 4:02 a.m.