bug-mcsim
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objet : MCMC


From: Frédéric BOIS
Subject: Objet : MCMC
Date: Thu, 20 Sep 2001 17:19:21 +0200

Hello,

Celine is out of town and I am only now able to answer your question.
Sorry about the delay.

I take your text and edit it with answers (I may not be able to finish today, 
so this may be partial answers):

"Here is my  understanding of MCMC. Monte carlo is an
integration technique which random numbers to find the
integration intervals and sum it up to arrive at the
final integral. And markov chains are memory-less
processes ( a physical phenomenonm which depends only
on the state which it was previously existing). In a
MCMC computatation, states depicting the physical
parameters are generated randomly according to a
probability distribution and the resulting
mathematical complexities in integration and
summations are handled by monte carlo integration."

=> You can conceptualize it like that, yes.


"Model File:
As i  understand, States are such set of variables
which have dynamics.This dynamics can be expressed in
form of a first  order differential equations ( this
what McSim supports). The physical  system evolves
according to these set of differential equations.The
variables that we want to  monitor ( which are
functions of other parameters and state variables) are
specified in CalcOutputs section which are called at
time intervals specified in Print () specification. "

=> this is right.


"Inputs (as i  understand) is a special section in
which prior distributions for variables can be
specified. Correct me if i am worng."

=> wrong; inputs are variables which can be forced to
     follow a particular time-course (forcing function). Typically
     stepwise changes in time. You cannot define a prior for an
     input. Priors can be defined only for parameters.


"Simulation File:

Via, Simulation() i  can specify what sort of
simulation do  i want to perform.
I have some problem in getting the utility of
Integrate() specification. Say i perform MCMC
simulation- as i know,monte carlo technique is used to
integrate; what is this lsodes?. And where are these
markov chains genreated ? and according to what
distribution function are these states generated ?
Where did i specify this? (Is this done in Distrib()
specification ?- if so what is the ratonale for
specifying in Simulation rather than model)."

=>  There is a difference between integrating (in time) a 
      system of ODEs and integrating a function via Monte 
      Carlo simulations. If you have specified state variables
      and an ODE system in the model file, chances are that 
      you will want values of the state variables at other times
      than time zero. This is performed by standard numerical 
      integration of the ODE system, with Euler or Gear (LSODES) 
      algorithms. This has nothing to do with Monte Carlo. 
      Rather than thinking of Monte Carlo as an integration technique,
      try to consider it as a sampling technique (it's the best approach 
      to understand MC and MCMC in MCSim. Simple Monte Carlo
      sample parameter vectors from distributins specified by Distrib()
      statements, compute output and state variables at given time points
      (specified by Print() statements) and print outthe answer. Taken 
      together the output forms a random sample of output values.
      MCMC is a more complex sampling technique which gives (in the
      long run) a sample from a joint posterior distribution of the parameters.
      This posterior distribution is implicitly specified by 1/ prior 
distributions
      specified with distrib(), 2/ conditionnal distributions also specified 
with 
      Distrib() statements.


"The MCMC section says that these simulaions are used
in context of bayesian inference. I have done quite an
extensive study on bayesian models and the idea that i
have is- the bayesian model has quite a number of
random variables in hierarchy of nodes. The dependency
among these nodes is provided by the conditional
probabilities of the node , given its parents. I
assign priors on some of the variables and then
provide observed / experimental data so that i  can
query the bayesian network and get the required
posterior distributions. Period(!). I am done with the
simulation."

=> Querying the network requires you to sample from the     posterior. If it 
has a closed form it's simple. If the posterior
     is not standard you can use Gibbs or Metropolis to get 
     a numerical sample, with allows you to do simple marginalization
     afterward.

"My problem is where exactly is this hierarchy
specified ? I see that Level has something to  do with
this - but again things are not clear because the
explicit mention of conditional probabilities is not
visible anywhere through my  eyes. I request you to 
help me here also."

=> See above. Distrib() statements of the form
     Distrib (A, Normal, B, 1); 
     with parameter symbols after the distribution type
     are conditional distributions: A is normally distributed 
     around B with SD, for example.
     More subtle is 
     Distrib (A, Normal, A, 1); 
     This is used if you have hierarchy Levels defined.
     In that case, A of a given level (the one in which
     the statement is issued) is supposed to be distributed, 
     say normally, around the value of A at the level above.
     At the top level you have an unconditional Distrib() like
     Distrib (A, Normal, 0, 1); 
     statement for A, and this is the prior for A. I know, this
     is cryptic, but it spares you the hassle of specifying subscripts
     for each level etc.


=> I will finish with your questions at another time. I hope this helps
     already. 
     Best regards.

     Frederic Bois




reply via email to

[Prev in Thread] Current Thread [Next in Thread]