Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stan_hierarchical_response_thall

Fit the hierarchical response model described by Thall et al. (2003).


Description

Fit the hierarchical response model to exchangeable groups described by Thall et al. (2003).

Usage

stan_hierarchical_response_thall(
  group_responses,
  group_sizes,
  mu_mean,
  mu_sd,
  tau_alpha,
  tau_beta,
  ...
)

Arguments

group_responses

vector of integers, number of responses in each group

group_sizes

vector of integers, number of patients in each group

mu_mean

mean parameter of normal prior distribution on mu. See details.

mu_sd

standard deviation parameter of normal prior distribution on mu. See details.

tau_alpha

parameter alpha of inverse gamma prior distribution on tau. See details.

tau_beta

beta parameter of inverse gamma prior distribution on tau. See details.

...

Extra parameters are passed to rstan::sampling. Commonly used options are iter, chains, warmup, cores, and control.

Details

Thall et al. (2003) describe hierarchical methods for analysing treatment effects of a common intervention in several sub-types of a disease. The treatment effects are assumed to be different but exchangeable and correlated. Observing efficacy in one cohort, for example, increases one's expectations of efficacy in others. They demonstrate the hierarchical approach in a trial with binary response outcomes and in another with time-to-event outcomes. This function fits their model for binary response outcomes.

Let the probability of response in group i be π[i] for i = 1,...,N. They assume a logistic model so that θ_{i} = \log{π_{i} / (1 - π_{i})} is the log-odds of response in group i. They assume that θ_{i} \sim N(μ, σ^2).

The authors implemented their model in BUGS. As is the convention in BUGS, the authors define normal distributions by a precision parameter τ as opposed to the standard deviation parameter σ used here. We have re-specified their model to comply with the Stan convention of using standard deviation. The authors use a normal prior on μ, and a gamma prior on τ, equivalent to an inverse gamma prior on τ^{-1} = σ^2.

The authors provide WinBUGS code in their publication. We implement their model here in Stan.

Value

Object of class rstan::stanfit returned by rstan::sampling

References

Thall, Wathen, Bekele, Champlin, Baker, and Benjamin. 2003. “Hierarchical Bayesian approaches to phase II trials in diseases with multiple subtypes.” Statistics in Medicine 22 (5): 763–80. https://doi.org/10.1002/sim.1399.

See Also

Examples

## Not run: 
# Example from p.778 of Thall et al. (2003)
mod0 <- stan_hierarchical_response_thall(
  group_responses = c(0, 0, 1, 3, 5, 0, 1, 2, 0, 0),
  group_sizes = c(0, 2 ,1, 7, 5, 0, 2, 3, 1, 0),
  mu_mean = -1.3863,
  mu_sd = sqrt(1 / 0.1),
  tau_alpha = 2,
  tau_beta = 20)

## End(Not run)

trialr

Clinical Trial Designs in 'rstan'

v0.1.5
GPL (>= 3)
Authors
Kristian Brock [aut, cre] (<https://orcid.org/0000-0002-3921-0166>), Trustees of Columbia University [cph]
Initial release
2020-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.