SimDesign1: Simulate a SMART with Design 1

Description Usage Arguments Value Examples

View source: R/SimDesign1.R

Description

This function simulates a SMART with Design 1.

Usage

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

Arguments

sample_size

the total sample size

response_prob

a vector of probabilities of response for each of the 6 embedded treatment sequences.

stage_one_trt_one_response_prob

the probability of response to first stage-1 treatment.

stage_one_trt_two_response_prob

the probability of response to second stage-1 treatment.

Value

a data frame with treatment response indicators for each stage of treatment, a1 and a2, end of stage-1 response indicator s, and final outcome y.

Examples

1
2
3
4
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)

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