AnalyseMCMC
Analyse gravitational-wave parameter-estimation results from SPINspiral and lalinference_mcmc
 All Classes Files Functions Variables Pages
Functions/Subroutines
analyseMCMC_stats.f90 File Reference

(AnalyseMCMC version 0.7.1, revision 448, hash 2f54722 (2013-11-19))

Compute statistics for analyseMCMC. More...

Functions/Subroutines

subroutine statistics (exitcode)
 Compute basic statistics for analyseMCMC. More...
 
subroutine save_stats (exitcode)
 Determine the number of points to use for the computation of R-hat Since we need a fixed number of points for all chains, take nn = the minimum of (the length of each chain after the burn-in) and use the last nn data points of each chain. More...
 
subroutine save_bayes (exitcode)
 Save Bayes-factor statistics to file. More...
 
subroutine save_cbc_wiki_data (ic)
 Save data in CBC wiki format. More...
 
subroutine compute_mixing (mynn, print_data)
 Compute mixing (R-hat) for multiple chains. Use unwrapped data. More...
 
subroutine compute_autocorrelations ()
 Determine the number of points to use for the computation of R-hat Since we need a fixed number of points for all chains, take nn = the minimum of (the length of each chain after the burn-in) and use the last nn data points of each chain. More...
 

Detailed Description

Compute statistics for analyseMCMC.

Function/Subroutine Documentation

subroutine statistics ( integer, intent(out)  exitcode)

Compute basic statistics for analyseMCMC.

Return values
exitcodeExit status code
  • Other results are returned using a number of modules

References compute_autocorrelations(), compute_mixing(), revper(), save_cbc_wiki_data(), and set_derivedparameternames().

Referenced by analysemcmc().

subroutine save_stats ( integer, intent(out)  exitcode)

Determine the number of points to use for the computation of R-hat Since we need a fixed number of points for all chains, take nn = the minimum of (the length of each chain after the burn-in) and use the last nn data points of each chain.

Save statistics to file

Return values
exitcodeExit status code

Referenced by analysemcmc().

subroutine save_bayes ( integer, intent(out)  exitcode)

Save Bayes-factor statistics to file.

Return values
exitcodeExit status code

Referenced by analysemcmc().

subroutine save_cbc_wiki_data ( integer, intent(in)  ic)

Save data in CBC wiki format.

Parameters
icChain number

References rev2pi(), and rrevpi().

Referenced by statistics().

subroutine compute_mixing ( integer, intent(in)  mynn,
logical, intent(in)  print_data 
)

Compute mixing (R-hat) for multiple chains. Use unwrapped data.

Parameters
mynnNumber of iterations to compute Rhat for. Use nn=0 for full chains. The last nn data points are used.
print_dataPrint results or not.
Note
This works only for fixed chain length, so take the min N
See Also
Brooks & Gelman, Journal of Computational and Graphical Statistics, Vol.7, Nr.4, p.434-455, 1998:

Referenced by statistics().

subroutine compute_autocorrelations ( )

Determine the number of points to use for the computation of R-hat Since we need a fixed number of points for all chains, take nn = the minimum of (the length of each chain after the burn-in) and use the last nn data points of each chain.

Compute autocorrelations

  • use the original nChains0 chains and allDat()
  • results are printed to stdout if prAcorr>0

Referenced by statistics().