Description Usage Arguments Details Value Examples

View source: R/PosteriorTrtSeqProb.R

Draws from the posterior of the treatment sequence response probabilities.

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

`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. |

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.

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.

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")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.