Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bayes.influence

Observation sensitivity analysis in beta-binomial model


Description

Computes probability intervals for the log precision parameter K in a beta-binomial model for all "leave one out" models using sampling importance resampling

Usage

bayes.influence(theta,data)

Arguments

theta

matrix of simulated draws from the posterior of (logit eta, log K)

data

matrix with columns of counts and sample sizes

Value

summary

vector of 5th, 50th, 95th percentiles of log K for complete sample posterior

summary.obs

matrix where the ith row contains the 5th, 50th, 95th percentiles of log K for posterior when the ith observation is removed

Author(s)

Jim Albert

Examples

data(cancermortality)
start=array(c(-7,6),c(1,2))
fit=laplace(betabinexch,start,cancermortality)
tpar=list(m=fit$mode,var=2*fit$var,df=4)
theta=sir(betabinexch,tpar,1000,cancermortality)
intervals=bayes.influence(theta,cancermortality)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.