resultrtostats.rand {BayesianPlatformDesignTimeTrend} | R Documentation |

## resultrtostats.rand

### Description

The inner function of function `resultstantoRfunc.rand`

### Usage

```
resultrtostats.rand(
trteff = NA,
treatmentindex = NA,
armleft,
K,
group,
fit,
ns
)
```

### Arguments

`trteff` |
Stan posterior samples of treatment effect sample distribution |

`treatmentindex` |
A vector of treatment index at the beginning of a trial |

`armleft` |
The number of treatment left in the platform (>2) |

`K` |
Total number of arms at the beginning |

`group` |
The current stage |

`fit` |
The stan output |

`ns` |
A vector of accumulated number of patient at each stage |

### Value

A list of stan result inference stats1: A vector of posterior probability for all treatment arms including dropped and active treatment arm stats4: The mean treatment effect estimate of each treatment compared to control stats5: The variance of treatment effect estimate of each treatment compared to control post.prob.btcontrol: a vector including Posterior probability of each active treatment arm better than control

### Author(s)

Ziyan Wang

### Examples

```
## Not run: resultrtostats.rand(trteff = NA, treatmentindex = NA, armleft, K, group, fit, ns)
```

*BayesianPlatformDesignTimeTrend*version 1.2.3 Index]