Learn R Programming

SHELF (version 1.12.0)

elicitHeterogen: Elicit a prior distribution for a random effects variance parameter

Description

Opens a shiny app for the roulette elicitation method. The user clicks in the grid to allocate 'probs' to 'bins'. The elicited probability inside each bin is the proportion of probs in each bin. This will fit a distribution to the ratio R of the 'largest' (97.5th percentile) to 'smallest' (2.5th percentile) treatment effect. A distribution for the variance effects variance parameter is inferred from the distribution of R, assuming that the random effects are normally distributed.

Usage

elicitHeterogen(
  lower = 1,
  upper = 10,
  gridheight = 10,
  nbins = 9,
  scale.free = TRUE,
  sigma = 1
)

Value

BUGS code for incorporating the prior within a BUGS model. Additionally, a list with outputs

allocation

table of bins, with number of probs allocated to each bin.

Gamma

parameters of the fitted gamma distribution.

Log.normal

parameters of the fitted lognormal distribution.

sumsq

sum of squares of elicited - fitted probabilities for each distribution.

best.fitting

the distribution with the lowest sum of squares.

Arguments

lower

The lower limit on the x-axis of the roulette grid.

upper

The upper limit on the x-axis of the roulette grid.

gridheight

The maximum number of probs that can be allocated to a single bin.

nbins

The number of equally sized bins drawn between lower and upper.

scale.free

Logical. Default is TRUE for a scale free treatment effect, such as an odds ratio, hazard ratio or relative risk. Set to FALSE for a treatment effect that is scale dependent, or is on the probit scale. An approximation to the treatment effect on the logit scale will be used (assuming a dichotomised response).

sigma

Individual observation standard deviation, required if scale.free is FALSE.

Author

Jeremy Oakley <j.oakley@sheffield.ac.uk>

Examples

Run this code

if (FALSE) {
elicitHeterogen()
}

Run the code above in your browser using DataLab