MarginalProba: Bayesian test for anteriority / posteriority between two...

Description Usage Arguments Details Value Author(s) Examples

View source: R/prog.R

Description

This function estimates the posterior probability that event 'a' is older than event 'b' using the output of the MCMC algorithm. This provides a bayesian test for checking the following assumption: "Event a is older than event b"

Usage

1
MarginalProba(a_chain, b_chain)

Arguments

a_chain

numeric vector containing the output of the MCMC algorithm for the first one-parameter (date) a

b_chain

numeric vector containing the output of the same MCMC algorithm for the second one-parameter (date) b

Details

For a given output of MCMC algorithm, this function estimates the posterior probability of the event 'a' < 'b' by the relative frenquency of the event "the value of event 'a' is lower than the value of event 'b'" in the simulated Makov chain.

Value

Returns the posterior probability of the following assumption: "Event a is older than event b"

Author(s)

Anne Philippe <Anne.Philippe@univ-nantes.fr> and

Marie-Anne Vibet <Marie-Anne.Vibet@univ-nantes.fr>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  data(Events); attach(Events)

  # Probability that Event.1 is older than Event.12
  MarginalProba(Event.1, Event.12)
  # Probability that Event.1 is older than Event.2
  MarginalProba(Event.1, Event.2)

  # Probability that the beginning of the phase 1 is older than the end of the phase 1
  # Should always be 1 for every phase
  data(Phases); attach(Phases)

  MarginalProba(Phase.1.alpha, Phase.1.beta)

RChronoModel documentation built on May 1, 2019, 10:06 p.m.