Description Usage Arguments Value References Examples

View source: R/sequential_monitor.R

Make animation plots to present sequential monitor the patients using Beta-Binomial Bayesian model

1 | ```
BB.aniplot(a, b, r, N=1, alpha=0.05, seed=1234, time.interval=1, output=TRUE)
``` |

`a` |
the hyperparameter (shape1) of the Beta prior for the experimental drug. |

`b` |
the hyperparameter (shape2) of the Beta prior for the experimental drug. |

`r` |
vector of number of response in each cohort, the value of each element should not exceed N |

`N` |
the number of patients treated by the experimental drug at a certain stage of the trial. |

`alpha` |
the siginificant level to determine the credible interval, set 0.05 by default. |

`seed` |
a single integer value, random number generator (RNG) state for random number generation. |

`time.interval` |
a positive number to set the time interval of the animation (unit in seconds); default to be 1. |

`output` |
a logical value, whether to output the inference results of posterior distribution and mean, observed data and credible interval. |

animation plot of updating posterior as prior, and output the inference information of prior and posterior distribution if `output=TRUE`

.

Yin, G. (2012).
*Clinical Trial Design: Bayesian and Frequentist Adaptive Methods.*
New York: Wiley.

1 2 3 4 5 6 7 | ```
# Using APL data
r=rep(0,6)
BB.aniplot(a=1,b=1,r=r, alpha=0.05, seed=1234)
# Simulate binomial data
B <- 10; N=1; p=0.3
r <- rbinom(n = B,size = N,prob = p)
BB.aniplot(a=1,b=1,r=r,time.interval = 0.2,output = FALSE)
``` |

ph2bye documentation built on May 29, 2017, 9:08 a.m.

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.