Re: How $simulation work with $estimation
Dear Elodie/Steve/Nick,
Thank you for your replies. So we can either simulate or bootstrap to
perform a visual predictive check. I just downloaded a WFN package
(developed by Nick) which is very convenient. By doing $Sim and $Est we can
get simulated data. Now I just wonder since we also get estimated parameters
(THETA, ETA, SIGMA) from simulation or bootstrap, has anyone ever used these
parameters? I mean in addition to comparing the percentiles of the DV can we
extract any useful information by looking at those parameters? Something
like, if the estimated parameters from real dataset fall within the 95%
intervals of simulated or bootstraped data? Does such comparison make any
sense?
A following question is how we export those parameters to a table. I know I
bring up old stuff. Alison and other people have posted codes. But these
codes do not seem to work for me. I wonder if anyone has successfully used
these codes.
Attached codes I found in previous discussions.
SUBROUTINE INFN (ICALL,THETA,DATREC,INDXS,NEWIND)
DIMENSION THETA(*),DATREC(*),INDXS(*)
DOUBLE PRECISION THETA
IF (ICALL.EQ.3) THEN
DO WHILE(DATA)
IF (NEWIND.LE.1) WRITE (50,*) ETA
ENDDO
WRITE (51,*) OBJECT
WRITE (52,*) THETA
WRITE (53,*) SETHET
WRITE (54,*) OMEGA(BLOCK)
WRITE (55,*) SEOMEG(BLOCK)
WRITE (56,*) SIGMA(BLOCK)
WRITE (57,*) SESIGM(BLOCK)
WRITE (58,*) IERE,IERC
ENDIF
Quoted reply history
On Tue, Oct 14, 2008 at 8:26 PM, Nick Holford <[EMAIL PROTECTED]>wrote:
> Jun,
>
> In addition to Elodie's clear explanation of the basic process of using
> $SIM and $EST in the same control stream you may wish to know that you don't
> have to use the same parameters for simulation as those used for estimation.
> The ICALL variable has a value of 4 when NONMEM is simulating so you can do
> this:
>
> $THETA
> 1 FIX ; sim_CL
> 10 ; est_CL
>
> $PK
>
> IF (ICALL.EQ.4) THEN ; for simulation
> CL=THETA(1)
> ELSE ; for estimation
> CL=THETA(2)
> ENDIF
>
> Nick
>
>
> Elodie Plan wrote:
>
>>
>> Dear Jun,
>>
>> When $SIM and $EST on the same model file, the simulation will be run
>> first, based on initial values, and then, afterwards, the estimation of the
>> simulated data will be done, that's it, no further re-simulation based on
>> the estimated parameters will follow.
>>
>> So what you should do is first to analyze your observed data in an
>> estimation model file, and then report your estimated parameters as initial
>> values to run your simulation-estimation study; this allows you to compare
>> estimates of real data to estimates of simulated data, so to check
>> simulation properties of your model.
>>
>> I hope this helps,
>>
>> Elodie
>>
>> / Elodie Plan, PharmD, MSc, ///
>>
>> / PhDstudent// ///
>>
>> /*****************************************///
>>
>> /Div. of Pharmacokinetics and Drug Therapy,
>> Department of Pharmaceutical Biosciences,
>> Faculty of Pharmacy, //Uppsala University/
>>
>> / PO - Box 591 - 751 24 //Uppsala - SWEDEN/
>>
>> /Office +46 18 4714385 - Fax +46 18 4714003
>> ------------------------------------------------------------///
>>
>> *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> *On Behalf Of *Jun Shen
>> *Sent:* Wednesday, October 15, 2008 1:01 AM
>> *To:* [email protected]
>> *Subject:* [NMusers] How $simulation work with $estimation
>>
>> Dear NMusers,
>>
>> I wonder how does $Simulation work with $Estimation in NONMEM exactly?
>> The manual says, NONMEM will simulate DVs and replace the original DVs
>> based on the parameter initial values. But the initial values are not
>> final
>> estimates. Does the simulation based on initial values make sense? Do
>> $Estimation and $Simulation run alternatively? The $Simulation generates a
>> set of data based on which the parameters are estimated? And then the
>> predictions are made on the estimated parameters? A little confused.
>>
>> Appreciate any comment.
>>
>> Jun
>>
>>
> --
> Nick Holford, Dept Pharmacology & Clinical Pharmacology
> University of Auckland, 85 Park Rd, Private Bag 92019, Auckland, New
> Zealand
> [EMAIL PROTECTED] tel:+64(9)923-6730 fax:+64(9)373-7090
> http://www.fmhs.auckland.ac.nz/sms/pharmacology/holford
>
>