Running a posted simulation

7 views
Skip to first unread message

Andre Jackson

unread,
Jun 15, 2022, 9:57:29 AM6/15/22
to mrgsolve

I am a new user and I have been trying to run the code located at:

Chapter 11 Topics | mrgsolve User Guide

for the one compartment oral model.  I was able to work through most of the code.  However,  I still got some errors.  How can I edit the code to get rid of the errors below in the following blocks?  The block and errors are listed. 

MAIN                                                                                    Error

double CL = TVCL*pow(WT/70,WTCL)*exp(ECL);   unexpected token ‘CL’ unexpected token ‘=’

double V  = TVV *pow(SEXVC,SEX)*exp(EV);           unexpected token ‘V’ unexpected token ‘=’

 

double KA = TVKA*exp(EKA);                                         unexpected token ‘KA’ unexpected token ‘=’


OMEGA #@name OMGA @correlation @block

ECL : 1.23 # Random effect on CL

EV  : 0.67 0.4 # Random effect on V                             unexpected token ‘0.4’

 EKA : 0.25 0.87 0.2 # Random effect on KA                  unexpected token ‘0.87’

 I have another question related to resampling eps.

In NONMEM code

COUNT=IREP

IF (ICALL.EQ.4) THEN

DOWHILE (Y.LT.0)

CALL SIMEPS (EPS)

Y=CP + ERR(1)

ENDDO

ENDIF

 

I found the code below for mrgsolve resampling eps, how does the $Table need to be edited to be comparable to the NONMEM code?

 ###RESAMPLING EPS

code <- '

$PARAM CL = 1, V = 20, FLAG=0 

$SIGMA 50 

$PKMODEL cmt="CENT" 

$TABLE

capture CP = CENT/V + EPS(1); 

int i = 0;

while(CP < 0 && FLAG > 0) {

  if(++i > 100) {

    mrg::report("Problem simulating positive CP");

    break;

  }

  simeps();

  CP = CENT/V + EPS(1);

}

 

'

Reply all
Reply to author
Forward
0 new messages