PosteriorTrtSeqProb: Treatment Sequence Response Probabilities from Dataset

Description Usage Arguments Details Value Examples

View source: R/PosteriorTrtSeqProb.R

Description

Draws from the posterior of the treatment sequence response probabilities.

Usage

1
PosteriorTrtSeqProb(niter, dat, design = "design-1")

Arguments

niter

the number of posterior draws.

dat

a data frame (see Details).

design

an indicator of which SMART design, design-1, general, or design-3.

Details

dat should contain the following columns:

y, the end of study binary response indicator

a1, the stage-1 treatment assignment indicator

s, the end of stage-1 binary response indicator

Additionally, for design-1 and design-3 it should contain a2, the stage-2 treatment assignment indicator

For the general design, it should contain

a2r, stage-2 treatment assignment for responders to stage-1 treatment.

a2nr, stage-2 treatment assignment for non-responders to stage-1 treatment.

Value

Posterior draws of the probability of response at the end of the study for each embedded treatment sequence and the posterior draws of the probability of response at the end of stage-1 for each stage-1 treatment.

Examples

1
2
3
4
5
6
dat <- SimDesign1(sample_size=250,
                              response_prob = c(0.5,0.9,0.3,0.7,0.5,0.8),
                              stage_one_trt_one_response_prob = 0.7,
                              stage_one_trt_two_response_prob = 0.4)

PosteriorTrtSeqProb(niter = 1000, dat, design = "design-1")

SMARTbayesR documentation built on Oct. 1, 2021, 1:06 a.m.