Learn R Programming

bhmbasket (version 0.9.5)

getMuVar: getMuVar

Description

This function returns the variance of \(\mu\) that is worth a certain number of subjects for the distribution of the response rates.

Usage

getMuVar(response_rate, tau_scale, n_worth = 1)

Arguments

response_rate

A numeric for the response rate

tau_scale

A numeric for the scale parameter of the Half-normal distribution of \(\tau\)

n_worth

An integer for the number of subjects the variance of \(\mu\) should be worth with regard to the variability of the distribution of the response rate, Default: 1

Value

Returns a numeric for the variance of \(\mu\)

Details

Calculates the variance mu_var in $$logit(p) = \theta ~ N(\mu, \tau), \mu ~ N(mu_mean, mu_var), \tau ~ HN(tau_scale),$$ for n_worth number of observations, as in Neuenschwander et al. (2016).

References

Neuenschwander, Beat, et al. "Robust exchangeability designs for early phase clinical trials with multiple strata." Pharmaceutical statistics 15.2 (2016): 123-134.

Examples

Run this code
# NOT RUN {
  getMuVar(response_rate = 0.3,
           tau_scale     = 1)
  getMuVar(response_rate = 0.3,
           tau_scale     = 1,
           n_worth       = 2)
# }

Run the code above in your browser using DataLab