Summary method for mcmcabn objects.

# S3 method for mcmcabn
summary(object,
     quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975),
     lag.max = 10,
     ...)

Arguments

object

object of class mcmcabn.

quantiles

numeric vector of probabilities with values in [0,1]. (Values up to 2e-14 outside that range are accepted and moved to the nearby endpoint.)

lag.max

maximum lag at which to calculate the acf. Default is set to 10.

...

arguments to be passed to methods.

Details

The summary function for mcmcabn objects returns multiple summary metrics for assessing the quality of the MCMC run. Thinning is the number of thinned MCMC steps for one MCMC returned.

Value

This method prints: the number of burn-in steps, the number of MCMC steps, the thinning, the maximum achieved score, the empirical mean of the MCMC samples, the empirical standard deviation of the MCMC samples, the user defined quantiles of the posterior network score, the global acceptance rate, a table of the accepted and rejected moves in function of the methods used, the sample size adjusted for autocorrelation and the autocorrelations by lag.

Author

Gilles Kratzer

References

Scutari, M. (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35(3), 1 - 22. doi:http://dx.doi.org/10.18637/jss.v035.i03.

Examples

## Example from the asia dataset from Lauritzen and Spiegelhalter (1988)
## provided by Scutari (2010)
#summary the MCMC run
summary(mcmc.2par.asia)
#> MCMC summary:
#> Number of burn-in steps: 1000
#> Number of MCMC steps: 1e+05
#> Thinning: 99
#> 
#> Maximum score: -11151.13
#> Empirical mean: -11164.74
#> Empirical standard deviation: 7.407195
#> Quantiles of the posterior network score:
#>              0.025      0.25       0.5      0.75    0.975
#> BN score -11188.58 -11168.16 -11163.84 -11159.79 -11154.2
#> 
#> 
#> Global acceptance rate: 0.2047952
#>     Accepted Rejected
#> MBR        9       24
#> MC3      186      752
#> REV       10       20
#> 
#> 
#> Sample size adjusted for autocorrelation: 51.58366
#> 
#> Autocorrelations by lag:
#>     0         1         2         3        4         5         6         7
#> acf 1 0.5684532 0.5619595 0.5225394 0.478408 0.4586218 0.4566739 0.4189232
#>             8         9        10
#> acf 0.4024697 0.3702477 0.3348253