Rép. : Help-mcsim Digest, Vol 15, Issue 10
Frédéric BOIS <Frederic.Bois <at> ineris.fr>
2004-07-22 08:24:42 GMT
- The latest version of the doc, with pdf etc. is attached. Your Unix
system should be able to
automatically create the pdf ps etc from the texinfo file (that's
precribed in the makefile, but
it may not work if you do not have the translation tools).
- The difference between v5beta and v5beta2 were minor and cosmetic.
See the MCSim-changelog
in the doc section for important changes.
- Can a user-defined likelihood function be easily implemented in
MCSim? : it depends what you want to
do with it. Assume you want the likelihood for one data point. You
should be able to represent your data
as an input function, taking the observed value at a prescribed
observation time. Then the likelihood
should be representable as a standard function of the parameters,
state and output variables and that data.
Now if you want to compute the total likelihood for a dataset you
have to find a way to (say) form the product
of individual datapoints likelihood. To do that you can setup an
output variable to act as an accumulator:
this_point-like = f(params, this_data)
total_like = total_like * this_point-like
Just make sure that it behave correctly. That should be easy for
discrete-time sims. For integration it's more difficult
because Calc-Deriv (the "model") may be called several times within
an integration step and the product would be formed
too often (to avoid that I tend to use control input function of the
An alternative is to code the product in the "yourcode.c" file. The
TransformPred function is called after a Monte Carlo
simulation and can be used for that. If you are not using MC
simulations you may need to add calls to TransformPred
elsewhere in the program.
- I should be able to use vector indexing, right? : yes.
- Some If-then-else blocks can be implemented using the ( ? : )
construct. An alternative
is the create a baseline model.c file and then change it manually
(it's written in C).
Just make sure you keep a copy so that mod doesn't overwrite it at the
I hope this helps.
Frederic Y. Bois,
Unite de Toxicologie Experimentale, responsable
Parc ALATA, BP 2
5, rue Taffanel
60550 Verneuil en Halatte
tel: + 33 (0)3 44 55 65 96
fax: + 33 (0)3 44 55 66 05
email: frederic.bois <at> ineris.fr
web: http://www.ineris.fr, http://toxi.ineris.fr
>>> help-mcsim-request <at> gnu.org Mercredi 21 Juillet 2004 18:05:10 >>>
Date: Thu, 15 Jul 2004 07:54:38 -0500
From: "Eric Hack" <kcahcire <at> msn.com>
Subject: MCSim beta version documentation
To: help-mcsim <at> gnu.org
Message-ID: <BAY4-F18KUUVbbpKlkj0001219f <at> hotmail.com>
Content-Type: text/plain; format=flowed
First, does anyone have the latest version of the beta version
that has been translated from texinfo to html? How about PDF,
or other formats?
Secondly, I think I downloaded version 5 beta, but I see that the
version 5 beta 2. Is this an updated beta? If so, what is new?
Date: Tue, 20 Jul 2004 14:37:42 -0400
From: "Eric Hack" <hack <at> tera.org>
Subject: translating a model into MCSim
To: <frederic.bois <at> Ineris.fr>
Cc: help-mcsim <at> gnu.org
<ABEC59A68A73FA4F9C93E89B308F14CE299237 <at> TERAS0002.tera.org>
Content-Type: text/plain; charset="us-ascii"
I want to translate a model to MCSim and have a couple of questions.
The model is a discrete-time model and the data are time (duration) of
exposure, outcome (tumor or no), and frequency at many time points and
exposure levels. The model incorporates an ad hoc likelihood function
which was being used to obtain MLEs for the parameters.
Can a user-defined likelihood function be easily implemented in MCSim?
There are also several logical constructs that I think may be
to translate to MCSim. The code includes many if-then-else blocks, do
loops, goto statements, and scheduled code blocks (to run at specific
value of independent variable). I think all of the do loops and goto
statements facilitate array operations, so I should be able to use
vector indexing, right? Can the if-then-else blocks be coded in the
model definition file, or should I code these into the model.c file
after the translation by mod?
C. Eric Hack
Toxicology Excellence for Risk Assessment (TERA)
2300 Montana Avenue
Cincinnati, OH 45211
(513) 542 7475 x 19
Help-mcsim mailing list
Help-mcsim <at> gnu.org