plot_DSpower: 2D or 3D visualization for the Dunn-Sidak power

Description Usage Arguments Details Value Examples

View source: R/plot_DSpower.R

Description

2D or 3D visualization for the Dunn-Sidak power

Usage

1
plot_DSpower(Q1, Q2, Q3, pi1, pi2, P, n, ...)

Arguments

Q1

a vector of numeric value for the range of Q12 probability

Q2

a vector of numeric value for the range of Q21 probability

Q3

a vector of numeric value for the range of Q31 probability

pi1

the respond rate of treatment 1, 2, 3 in stage I in SMART

pi2

the respond rate for patients who do not respond to a treatment in stage I, but respond to another treatment in stage II

P

Randomization probability in stage I

n

Sample size in SMART

...

other arguments fits to DSpower and plot3D

Details

One of Q1, Q2, Q3 must be a single value, and the other two should be a range of numerical value between 0 and 1.

Value

a 2D contour plot or 3D plot for the Dunn-Sidak power

Examples

1
2
3
4
5
6
7
8
9
Q1 = 0.3
Q2 = seq(0.1, 0.9, by = 0.005)
Q3 = seq(0.1, 0.9, by = 0.005)
pi1 = c(0.4, 0.35, 0.25)
pi2 = c(0.35, 0.32, 0.36, 0.56, 0.37, 0.4)
P = c(1/3, 1/3, 1/3)
n = 365

plot_DSpower(Q1, Q2, Q3, pi1, pi2, P, n, col = "black", nlevels = 30)

wangjunyao0121/RASMART documentation built on Dec. 23, 2021, 5:07 p.m.