NONMEM Users Network Archive

Hosted by Cognigen

Re: how to implement AR residual error model in Nonmem with FOCE INT routine

From: Gastonguay, Marc <marcg>
Date: Wed, 6 Jan 2010 12:34:58 -0500

The verbatim code provided below was written for NONMEM 6 or earlier.
You'll find more detail here:
http://gaps.cpb.ouhsc.edu/nm/98jul1098.html

This code will not work with NONMEM 7, because COMMONS are no longer
part of the NONMEM system. The NONMEM 7 help file ARnmprd5.for: "
CORRELATION ACROSS L2 RECORDS " seems to address this type of auto-
correlated residual model, but I have not yet tried this in version 7.
Perhaps others have some experience.

Hope this helps.

Marc

Marc R. Gastonguay, Ph.D. < marcg
President & CEO, Metrum Research Group LLC < metrumrg.com >
Scientific Director, Metrum Institute < metruminstitute.org >
2 Tunxis Rd, Suite 112, Tariffville, CT 06081 Direct:
+1.860.670.0744 Main: +1.860.735.7043 Fax: +1.860.760.6014



On Jan 6, 2010, at 11:29 AM, nonmem

> The following code causes errors. I use ADVAN13 to run a PD model.
>
> $ERROR
> " FIRST
> " COMMON /NMPRD5/ C(50,29)
> " DIMENSION T(300)
> " IF (NEWIND.NE.2) I=0
> " IF (CMT==4) THEN
> " I=I+1
> " T(I)=TIME
> " DO 5 J=1,I
> " 5 C(J,I) = EXP(-THETA(9)*(TIME-T(J)))
> " ENDIF
>
> Errors:
>
> FIRST
> 1
> Error: Unclassifiable statement at (1)
> fsubs.f90:365.25:
> COMMON /NMPRD5/ C(50,29)
> 1
> Error: Unexpected COMMON statement at (1)
> fsubs.f90:366.21:
> DIMENSION T(300)
> 1
> Error: Unexpected attribute declaration statement at (1)
> fsubs.f90:370.22:
> T(I)=EVTREC(NVNT,03)
> 1
> Error: Unexpected STATEMENT FUNCTION statement at (1)
> fsubs.f90:372.50:
> 5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
> 1
> Error: Unexpected STATEMENT FUNCTION statement at (1)
> fsubs.f90:373.4:
> ENDIF
> 1
> Error: Expecting END DO statement at (1)
> fsubs.f90:492.6:
> END
> 1
> Error: END DO statement expected at (1)
> fsubs.f90:493.6:
> SUBROUTINE TOL(NRD)
> 1
> Error: Unclassifiable statement at (1)
> fsubs.f90:494.39:
> USE SIZES, ONLY: DPSIZE,ISIZE
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:495.25:
> DIMENSION :: NRD(*)
> 1
> Error: Unexpected attribute declaration statement at (1)
> fsubs.f90:496.32:
> INTEGER(KIND=ISIZE) :: NRD
> 1
> Error: Unexpected data declaration statement at (1)
> fsubs.f90:497.6:
> NRD(1)=7
> 1
> Error: Unclassifiable statement at (1)
> fsubs.f90:500.6:
> END
> 1
> Error: END DO statement expected at (1)
> fsubs.f90:501.6:
> SUBROUTINE DES (A,P,T,DADT,IR,DA,DP,DT)
> 1
> Error: Unclassifiable statement at (1)
> fsubs.f90:502.17:
> USE NMPRD4P
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:503.39:
> USE SIZES, ONLY: DPSIZE,ISIZE
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:504.57:
> USE NMPRD_INT, ONLY: MSEC=>ISECDER,MFIRST=>IFRSTDER
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:505.33:
> USE PROCM_REAL,ONLY: EVTREC
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:506.39:
> USE PROCM_INT, ONLY: NVNT=>NEVENT
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:507.52:
> USE PRMOD_INT, ONLY: ICALL=>ICALLD,IDEFD,IDEFA
> 1
> Error: Unexpected USE statement at (1)
> fsubs.f90:508.78:
> IMPLICIT REAL(KIND=DPSIZE) (A-Z)
> 1
> Error: Letter A already has an IMPLICIT type at (1)
> fsubs.f90:509.10:
> SAVE
> 1
> Error: Unexpected attribute declaration statement at (1)
> fsubs.f90:510.78:
> INTEGER(KIND=ISIZE) :: IR
> 1
> Error: Unexpected data declaration statement at (1)
> fsubs.f90:511.20:
> DIMENSION :: A(*),P(*),DADT(*),DA(IR,*),DP(IR,*),DT(*)
> 1
> Error: Cannot change attributes of USE-associated symbol amnt at (1)
> fsubs.f90:514.6:
> IDEFD(1)= 0
> 1
> Error: Unclassifiable statement at (1)
> Fatal Error: Error count reached limit of 25.
> gfortran: Internal error: Aborted (program f951)
> Please submit a full bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> gfortran: fsubs.o: No such file or directory
> No nonmem execution.
>
>
> ----- Original Message -----
> From: nonmem
> Date: Wednesday, January 6, 2010 10:50 am
> Subject: Re: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
> To: nmusers
>
> > Hello Nonmem Users,
> >
> > Is there a more detailed explanation of the code in
> >
> >
> >
> > http://cognigencorp.com/nonmem/nm/97dec172003.html somwhere? I
> > try to implement a second-order autoregressive process. If
> > C(J,1) is a correlation coefficient, can I use more complex
> > equations for C(j,1)? Will this code work if we use ADVAN13 (PD
> > model here)?
> >
> > Thanks!
> > Pavel
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "Gastonguay, Marc"
> > Date: Tuesday, December 29, 2009 10:09 am
> > Subject: Re: [NMusers] how to implement AR residual error model
> > in Nonmem with FOCE INT routine
> > To: Ethan Wu
> > Cc: nmusers
> >
> > > Hello Ethan,
> > > This archived NMusers discussion thread might be useful:
> > >
> > > http://cognigencorp.com/nonmem/nm/97dec172003.html
> > >
> > > Marc
> > >
> > > Marc R. Gastonguay, Ph.D.
> > > President & CEO, Metrum Research Group LLC < metrumrg.com >
> > > Scientific Director, Metrum Institute < metruminstitute.org >
> > > 2 Tunxis Rd, Suite 112, Tariffville, CT 06081 Direct:
> > > +1.860.670.0744 Main: +1.860.735.7043 Fax: +1.860.760.6014
> > >
> > >
> > >
> > > On Dec 29, 2009, at 9:14 AM, Ethan Wu wrote:
> > >
> > > > Dear all,
> > > > I am fitting a PK/PD model using FOCE INT. I do see a high
> > >
> > > > correlation between WRES
> > > > I wonder could someone help me with implementation of AR
> > > residual
> > > > error model in NONMEM.
> > > > Many thanks! Happy new year to all.
> > > >
> > > >
> > >
> > >
> >


Received on Wed Jan 06 2010 - 12:34:58 EST

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.