# prior: Beta priors determination based on different prior... In ph2bye: Phase II Clinical Trial Design Using Bayesian Methods

## Description

The prior function to calculate the Beta prior parameters

## Usage

 `1` ```prior(type, mu, v, N, W, init) ```

## Arguments

 `type` type of prior information: "MeanVar" uses mean and variance, "Optimist" uses (ORR) mean, "ORRN" uses ORR and smaple size, "ORRW" uses ORR and CI width. `mu` prior(ORR) mean. `v` prior variance `N` prior sample size. `W` prior confidence interval width. `init` initial value to solve the nonlinear equations for "ORRW" type.

## Value

 `parameters` the vector of Beta parameters: a and b

## References

Thall, P. F., Simon, R. (1994). Practical Bayesian guidelines for phase IIB clinical trials. Biometrics 50: 337-349.

Mayo, M. S., & Gajewski, B. J. (2004). Bayesian sample size calculations in phase II clinical trials using informative conjugate priors. Controlled clinical trials 25(2): 157-167.

Tan, S. B., & Machin, D. (2002). Bayesian two-stage designs for phase II clinical trials. Statistics in medicine 21(14): 1991-2012. New York: Wiley.

## Examples

 ```1 2 3 4``` ```prior(type = "MeanVar", mu=0.2, v=0.025) prior(type = "Optimist", mu = 0.2) prior(type = "ORRN", mu = 0.2, N = 10) prior(type = "ORRW", mu = 0.2, W = 0.5) ```

### Example output

```Loading required package: animation
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
a    b
1.08 4.32
a   b
1.2 1.8
a   b
3.2 9.8
Algorithm parameters
--------------------
Method: Broyden  Global strategy: double dogleg (initial trust region = -2)
Maximum stepsize = 1.79769e+308
Scaling: fixed
ftol = 1e-08 xtol = 1e-08 btol = 0.01 cndtol = 1e-12

Iteration report
----------------
Iter         Jac     Lambda      Eta     Dlt0     Dltn         Fnorm   Largest |f|
0                                                    1.684634e-01  4.969173e-01
1  N(3.3e-02) N            0.4151  20.0025  20.0025  5.273271e-02  2.897546e-01
2  B(4.3e-02) N            0.8380   4.5700   4.5700  4.368695e-02  2.770594e-01
3  B(1.2e-02) W   0.4647   0.9011   4.5700   4.5700  2.946025e-02  2.392425e-01
4  B(1.7e-02) N            0.9760   3.1102   3.1102  1.520551e-02  1.740295e-01
5  B(2.0e-02) N            0.9973   0.6522   0.3220  1.559704e-02  1.765722e-01
5             W   0.3388   0.9973   0.3220   0.1610  1.383794e-02  1.663423e-01
6  B(5.5e-02) C            0.9990   0.1610   0.1610  1.239374e-02  1.574280e-01
7  B(4.4e-01) C            0.9986   0.1610   0.3220* 1.100110e-02  1.483263e-01
7             C            0.9986   0.3220   0.6439* 9.664322e-03  1.390274e-01
7             C            0.9986   0.6439   1.2878* 7.181440e-03  1.198116e-01
7             C            0.9986   1.2878   2.5757* 3.191233e-03  7.870810e-02
7             C            0.9986   2.5757   5.1513  2.326860e-03  6.629149e-02
8  B(3.0e-01) N            0.6277   2.1793   4.3585  4.082996e-04  2.179620e-02
9  B(3.1e-01) N            0.9778   0.4097   0.4097  1.388167e-04  1.417817e-02
10  B(2.3e-01) N            0.9488   0.1972   0.3944  8.994026e-06  3.351068e-03
11  B(2.7e-01) N            0.9577   0.0545   0.1090  2.131957e-07  5.427505e-04
12  B(2.5e-01) N            0.9515   0.0080   0.0159  9.466863e-10  3.735577e-05
13  B(2.6e-01) N            0.9221   0.0006   0.0012  2.977033e-12  2.043897e-06
14  B(2.6e-01) N            0.9309   0.0000   0.0001  4.442816e-15  7.921770e-08
15  B(2.6e-01) N            0.9340   0.0000   0.0000  1.024213e-19  3.802499e-10
a        b
1.582918 6.331671
```

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