stan_hierarchical_response_thall: Fit the hierarchical response model described by Thall _et...

View source: R/stan_hierarchical_response_thall.R

stan_hierarchical_response_thallR Documentation

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 \pi[i] for i = 1,...,N. They assume a logistic model so that \theta_{i} = \log{\pi_{i} / (1 - \pi_{i})} is the log-odds of response in group i. They assume that \theta_{i} \sim N(\mu, \sigma^2).

The authors implemented their model in BUGS. As is the convention in BUGS, the authors define normal distributions by a precision parameter \tau as opposed to the standard deviation parameter \sigma 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 \mu, and a gamma prior on \tau, equivalent to an inverse gamma prior on \tau^{-1} = \sigma^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

rstan::stanfit, rstan::sampling

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 documentation built on April 1, 2023, 12:03 a.m.