remix_shrink: Calculate posterior shrink on parameter estimates

Description Usage Arguments Details Value Author(s)

View source: R/remix_shrink.R

Description

Posterior shrink is an estimate of how much the priors influence a posterior parameter estimate. This function implements the shrink equation for simmr_output objects

Usage

1
2
remix_shrink(simmr_out, clone_out, prior.control,
  nparms = simmr_out$input$n_sources, stat = mean)

Arguments

simmr_out

A simmr_output object, the output of simmr_mcmc

clone_out

A simmr_output object using cloned data from simmr_out

prior.control

A prior.control data.frame for simmr_mcmc

stat

A function name, giving the parameter you want to calculate shrink on. e.g. mean, median, .est_mode.

Details

Posterior shrinkage measures the degree to which the posterior estimate has shrunk towards the maximum likelihood estimate and away from the prior.

Values close to 1 indicate the prior has little influence on the posterior, whereas values close to 0 indicate the prior has a large influence on the posterior.

Some care must be taken in selecting parameter estimates to use in the shrink equation and also in estimating the MLE (which is not always straightfoward). For complex models the MLE may be estimated using data cloning, see simmr_clone.

Shrink values can occaisionally be >1 or <0. Values <0 occur when the posterior parameter estimate has moved in the opposite direction from the prior than the MLE. Values >1 occur when the MLE is closer to the prior estimate than the posterior. Values not in 0-1 can occur if (1) your MLE estimate is inaccurate, (2) your posterior is multi-model, or (3) your posterior estimate is constrained by other parameters. If (1) then try other methods for obtaining an MLE or increase replication if using data cloning. If (2) or (3) posterior shrink may be inappropriate for your model, because the posterior shrink cannot be characterised by a simple univariate measure.

See: Berger JO (1985) Statistical Decision Theory and Bayesian Analysis, Second Edition, Springer, New York.

Thanks to Ed Boone for suggesting this one.

Value

A remix_shrink object containing parameter estimates and the shrink estimate. Specifically remix_shrink contains:

dat

A data.frame with the shrink estimate, the prior, ML and posterior parameter estimates and the standard-error on the ML estimate.

stat

returns the parameter used.

K

returns the number of data clones.

Author(s)

Christopher J. Brown christo.j.brown@gmail.com


cbrown5/remixsiar documentation built on April 26, 2020, 12:40 a.m.