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

View source: R/elicitHeterogeneity.R

elicitHeterogenR Documentation

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
)

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.

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.

Note

Regarding the option “spread end probs over empty bins” (unchecked as the default): suppose for example, the leftmost and rightmost non-empty bins are [10,20] and [70,80], and each contain one prob, with 20 probs used in total. If the option is unchecked, it is assumed P(X<20) = P(X>70) = 0.05 and P(X<10) = P(X>80) = 0. If the option is checked, it is assumed P(X<20) = P(X>70) = 0.05 only.

Author(s)

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

Examples


## Not run: 
elicitHeterogen()

## End(Not run)

SHELF documentation built on Sept. 11, 2024, 6:54 p.m.