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

evidencePP

Evidence estimation via power posteriors


Description

Function to estimate the evidence (marginal likelihood) with Power posteriors, based on the adjusted pseudolikelihood function.

Usage

evidencePP(
  formula,
  prior.mean = NULL,
  prior.sigma = NULL,
  aux.iters = 1000,
  n.aux.draws = 50,
  aux.thin = 50,
  ladder = 30,
  main.iters = 20000,
  burn.in = 5000,
  thin = 1,
  V.proposal = 1.5,
  seed = 1,
  temps = NULL,
  estimate = c("MLE", "CD"),
  ...
)

Arguments

formula

formula; an ergm formula object, of the form <network> ~ <model terms> where <network> is a network object and <model terms> are ergm-terms.

prior.mean

vector; mean vector of the multivariate Normal prior. By default set to a vector of 0's.

prior.sigma

square matrix; variance/covariance matrix for the multivariate Normal prior. By default set to a diagonal matrix with every diagonal entry equal to 100.

aux.iters

count; number of auxiliary iterations used for drawing the first network from the ERGM likelihood. See control.simulate.formula and ergmAPL.

n.aux.draws

count; number of auxiliary networks drawn from the ERGM likelihood. See control.simulate.formula and ergmAPL.

aux.thin

count; number of auxiliary iterations between network draws after the first network is drawn. See control.simulate.formula and ergmAPL.

ladder

count; length of temperature ladder (>=3). See ergmAPL.

main.iters

count; number of MCMC iterations after burn-in for the adjusted pseudo-posterior estimation.

burn.in

count; number of burn-in iterations at the beginning of an MCMC run for the adjusted pseudo-posterior estimation.

thin

count; thinning interval used in the simulation for the adjusted pseudo-posterior estimation. The number of MCMC iterations must be divisible by this value.

V.proposal

count; diagonal entry for the multivariate Normal proposal. By default set to 1.5.

seed

integer; seed for the random number generator. See set.seed and MCMCmetrop1R.

temps

numeric vector; inverse temperature ladder, t \in [0,1].

estimate

If "MLE" (the default), then an approximate maximum likelihood estimator is returned. If "CD" , the Monte-Carlo contrastive divergence estimate is returned. See ergm.

...

additional arguments, to be passed to the ergm function. See ergm and ergmAPL.

References

Bouranis, L., Friel, N., & Maire, F. (2018). Bayesian model selection for exponential random graph models via adjusted pseudolikelihoods. Journal of Computational and Graphical Statistics, 27(3), 516-528. https://arxiv.org/abs/1706.06344

Examples

## Not run: 
# Load the florentine marriage network:
data(florentine)

PPE <- evidencePP(flomarriage ~ edges + kstar(2),
                  aux.iters   = 500, 
                  noisy.nsim  = 50,   
                  aux.thin    = 50,   
                  main.iters  = 2000,
                  burn.in     = 100,
                  V.proposal  = 2.5)
                                   
# Posterior summaries:
summary(PPE)

# MCMC diagnostics plots:
plot(PPE)
  
# Log-evidence (marginal likelihood) estimate:             
PPE$log.evidence

## End(Not run)

Bergm

Bayesian Exponential Random Graph Models

v5.0.2
GPL (>= 2)
Authors
Alberto Caimo [aut, cre], Lampros Bouranis [aut], Robert Krause [aut] Nial Friel [ctb]
Initial release
2020-11-12

We don't support your browser anymore

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