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.
how to implement AR residual error model in Nonmem with FOCE INT routine
9 messages
6 people
Latest: Jan 20, 2010
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
Quoted reply history
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.
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
Quoted reply history
----- 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: [email protected]
> 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.
> >
> >
>
>
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. < [email protected] >
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
Quoted reply history
On Jan 6, 2010, at 11:29 AM, [email protected] wrote:
> 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: [email protected]
> 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: [email protected]
>
> > 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: [email protected]
> >
> > > 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.
> > > >
> > > >
> > >
> > >
> >
If ADVAN13 is used then one must be using NONMEM 7.1.0. NONMEM 7.1.0 is
coded in Fortran 90/95. Try replacing
$ERROR
" FIRST
" COMMON /NMPRD5/ C(50,29)
" DIMENSION T(300)
" IF(NEWIND.NE.2) I=0
with
$ERROR
" FIRST
" USE SIZES, ONLY: NO
" USE NMPRD_REAL, ONLY: C=>CORRL2
" REAL (KIND=DPSIZE) :: T(NO)
" INTEGER (KIND=ISIZE) :: I,J
" MAIN
" IF(NEWIND.NE.2) I=0
The dimension of T should be the same as NO in SIZES.f90.
There is a help item available. In the html directory double-click the
file named index.htm (not $index.htm) to open the index for html-help,
select "a" as the first letter of the keyword, and then proceed to the
link for autocorrelation.
It is difficult (impossible) to anticipate how individuals will use
verbatim code so any use of verbatim code may be problematic. Only the
simplest examples have been tested using NONMEM 7.1.0, so please proceed
with caution.
If you continue to have problems then provide us the control stream and
at least a few individuals from the data set and we will attempt to help
with implementation.
Tom
ICON Development Solutions
e-mail: [email protected]
Quoted reply history
________________________________
From: [email protected] [mailto:[email protected]]
On Behalf Of [email protected]
Sent: Wednesday, January 06, 2010 11:29 AM
To: [email protected]
Subject: Re: [NMusers] how to implement AR residual error model in
Nonmem with FOCE INT routine
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 http://gcc.gnu.org/bugs.html for
instructions.
gfortran: fsubs.o: No such file or directory
No nonmem execution.
----- Original Message -----
From: [email protected]
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: [email protected]
> 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: [email protected]
>
> > 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.
> > >
> > >
> >
> >
>
Dear Tom and all,
I work with the code provided in the html help for NM7 and it successfully
estimates autocorrelation between observations; I just want to point out
what appeared to be a typo to me: " IF (NEWIND.LE.2) I=0 should be " IF
(NEWIND.NE.2) I=0, and to share that to my experience it is required (with
the new methods like SAEM) to introduce the THETA (through a variable name)
in the abbreviated code rather than in the verbatim code.
Best regards,
Elodie
Elodie L. Plan, PharmD, MSc,
PhD student
********************************************
The Pharmacometrics Research Group
Quoted reply history
From: [email protected] [mailto:[email protected]] On
Behalf Of Ludden, Thomas
Sent: Wednesday, January 06, 2010 6:57 PM
To: [email protected]; [email protected]
Subject: RE: [NMusers] how to implement AR residual error model in Nonmem
with FOCE INT routine
If ADVAN13 is used then one must be using NONMEM 7.1.0. NONMEM 7.1.0 is
coded in Fortran 90/95. Try replacing
$ERROR
" FIRST
" COMMON /NMPRD5/ C(50,29)
" DIMENSION T(300)
" IF(NEWIND.NE.2) I=0
with
$ERROR
" FIRST
" USE SIZES, ONLY: NO
" USE NMPRD_REAL, ONLY: C=>CORRL2
" REAL (KIND=DPSIZE) :: T(NO)
" INTEGER (KIND=ISIZE) :: I,J
" MAIN
" IF(NEWIND.NE.2) I=0
The dimension of T should be the same as NO in SIZES.f90.
There is a help item available. In the html directory double-click the file
named index.htm (not $index.htm) to open the index for html-help, select "a"
as the first letter of the keyword, and then proceed to the link for
autocorrelation.
It is difficult (impossible) to anticipate how individuals will use verbatim
code so any use of verbatim code may be problematic. Only the simplest
examples have been tested using NONMEM 7.1.0, so please proceed with
caution.
If you continue to have problems then provide us the control stream and at
least a few individuals from the data set and we will attempt to help with
implementation.
Tom
ICON Development Solutions
e-mail: [email protected]
_____
From: [email protected] [mailto:[email protected]] On
Behalf Of [email protected]
Sent: Wednesday, January 06, 2010 11:29 AM
To: [email protected]
Subject: Re: [NMusers] how to implement AR residual error model in Nonmem
with FOCE INT routine
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 http://gcc.gnu.org/bugs.html> for
instructions.
gfortran: fsubs.o: No such file or directory
No nonmem execution.
----- Original Message -----
From: [email protected]
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: [email protected]
> 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: [email protected]
>
> > 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.
> > >
> > >
> >
> >
>
Hello Thomas,
I tried the code as described in your email and in "correlations accross L2
records" help file:
$ERROR
" FIRST
" USE SIZES, ONLY: NO
" USE NMPRD_REAL, ONLY: C=>CORRL2
" REAL (KIND=DPSIZE) :: T(NO)
" INTEGER (KIND=ISIZE) :: I,J
" MAIN
" IF(NEWIND.NE.2) I=0
" IF (NEWL2.EQ.1.AND.CMT.EQ.4) THEN
" I=I+1
" T(I)=TIME
" DO 5 J=1,I
" 5 C(J,I) = EXP(-THETA(9)*(TIME-T(J)))
" ENDIF
The following errors occur:
IL1D027J.txt
newline
1 file(s) copied.
IL1D027J.OUT
FMSG
1 file(s) copied.
1 file(s) copied.
fsubs.f90:339.12:
REAL (EVTREC(NVNT,31)=DPSIZE) :: T(NO)
1
Error: Assumed size array 'evtrec' at (1) is not permitted in an initialization
expressi
fsubs.f90:340.15:
INTEGER (EVTREC(NVNT,31)=ISIZE) :: I,J
1
Error: Assumed size array 'evtrec' at (1) is not permitted in an initialization
expressi
fsubs.f90:371.22:
T(I)=EVTREC(NVNT,03)
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
fsubs.f90:373.6:
5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
1
Warning: Extension: REAL array index at (1)
fsubs.f90:373.8:
5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
1
Warning: Extension: REAL array index at (1)
fsubs.f90:372.6:
DO 5 J=1,I
1
Warning: Deleted feature: Loop variable at (1) must be integer
fsubs.f90:372.11:
DO 5 J=1,I
1
Warning: Deleted feature: End expression in DO loop at (1) must be integer
gfortran: fsubs.o: No such file or directory
No nonmem execution.
Thanks,
Pavel
Quoted reply history
----- Original Message -----
From: "Ludden, Thomas"
Date: Wednesday, January 6, 2010 4:50 pm
Subject: RE: [NMusers] how to implement AR residual error model in Nonmem with
FOCE INT routine
To: Elodie Plan , [email protected], [email protected]
> Dear Elodie:
>
> Thank you for pointing out the documentation error in the help
> item. It
> will be corrected in the next release.
>
> Also, thank you for pointing out the need for using abbreviated code
> instead of verbatim code for introducing the THETA used to estimate
> correlation when using the SAEM method.
>
> Tom
>
> ________________________________
>
> From: Elodie Plan [mailto:[email protected]]
> Sent: Wednesday, January 06, 2010 3:28 PM
> To: Ludden, Thomas; [email protected]; [email protected]
> Subject: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
>
>
> Dear Tom and all,
>
>
>
> I work with the code provided in the html help for NM7 and it
> successfully estimates autocorrelation between observations; I
> just want
> to point out what appeared to be a typo to me: " IF
> (NEWIND.LE.2) I=0
> should be " IF (NEWIND.NE.2) I=0, and to share that to my experience
> it is required (with the new methods like SAEM) to introduce the THETA
> (through a variable name) in the abbreviated code rather than in the
> verbatim code.
>
>
>
> Best regards,
>
> Elodie
>
>
>
> Elodie L. Plan, PharmD, MSc,
>
> PhD student
>
> ********************************************
>
> The Pharmacometrics Research Group
>
>
>
> From: [email protected] [mailto:owner-
> [email protected]]on Behalf Of Ludden, Thomas
> Sent: Wednesday, January 06, 2010 6:57 PM
> To: [email protected]; [email protected]
> Subject: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
>
>
> If ADVAN13 is used then one must be using NONMEM 7.1.0. NONMEM
> 7.1.0 is
> coded in Fortran 90/95. Try replacing
>
>
>
> $ERROR
>
> " FIRST
>
> " COMMON /NMPRD5/ C(50,29)
>
> " DIMENSION T(300)
>
> " IF(NEWIND.NE.2) I=0
>
>
>
> with
>
>
> $ERROR
> " FIRST
>
> " USE SIZES, ONLY: NO
> " USE NMPRD_REAL, ONLY: C=>CORRL2
>
> " REAL (KIND=DPSIZE) :: T(NO)
>
> " INTEGER (KIND=ISIZE) :: I,J
>
> " MAIN
>
> " IF(NEWIND.NE.2) I=0
>
>
>
> The dimension of T should be the same as NO in SIZES.f90.
>
>
>
> There is a help item available. In the html directory double-
> click the
> file named index.htm (not $index.htm) to open the index for html-help,
> select "a" as the first letter of the keyword, and then proceed
> to the
> link for autocorrelation.
>
>
>
> It is difficult (impossible) to anticipate how individuals will use
> verbatim code so any use of verbatim code may be problematic.
> Only the
> simplest examples have been tested using NONMEM 7.1.0, so please
> proceedwith caution.
>
>
>
> If you continue to have problems then provide us the control
> stream and
> at least a few individuals from the data set and we will attempt
> to help
> with implementation.
>
>
>
> Tom
>
>
>
> ICON Development Solutions
>
> e-mail: [email protected]
>
>
>
>
>
>
>
>
>
> ________________________________
>
> From: [email protected] [mailto:owner-
> [email protected]]on Behalf Of [email protected]
> Sent: Wednesday, January 06, 2010 11:29 AM
> To: [email protected]
> Subject: Re: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
> 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
> > for
> instructions.
> gfortran: fsubs.o: No such file or directory
> No nonmem execution.
>
>
>
>
> ----- Original Message -----
> From: [email protected]
> 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: [email protected]
>
> > 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: [email protected]
> >
> > > 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.
> > > >
> > > >
> > >
> > >
> >
>
>
Dear Pavel,
Do you have a variable in $INPUT named "KIND"? If so, it is causing
that data item (EVTREC(NVNT,31) to be substituted for KIND in the
Fortran statements
" REAL (KIND=DPSIZE) :: T(NO)
" INTEGER (KIND=ISIZE) :: I,J
.
If that is not the case, then can you send me your control stream and a
few individuals from the data file to test?
Thanks,
Tom
Quoted reply history
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Friday, January 08, 2010 11:37 AM
To: Ludden, Thomas
Cc: [email protected]
Subject: Re: RE: [NMusers] how to implement AR residual error model in
Nonmem with FOCE INT routine
Hello Thomas,
I tried the code as described in your email and in "correlations accross
L2 records" help file:
$ERROR
" FIRST
" USE SIZES, ONLY: NO
" USE NMPRD_REAL, ONLY: C=>CORRL2
" REAL (KIND=DPSIZE) :: T(NO)
" INTEGER (KIND=ISIZE) :: I,J
" MAIN
" IF(NEWIND.NE.2) I=0
" IF (NEWL2.EQ.1.AND.CMT.EQ.4) THEN
" I=I+1
" T(I)=TIME
" DO 5 J=1,I
" 5 C(J,I) = EXP(-THETA(9)*(TIME-T(J)))
" ENDIF
The following errors occur:
IL1D027J.txt
newline
1 file(s) copied.
IL1D027J.OUT
FMSG
1 file(s) copied.
1 file(s) copied.
fsubs.f90:339.12:
REAL (EVTREC(NVNT,31)=DPSIZE) :: T(NO)
1
Error: Assumed size array 'evtrec' at (1) is not permitted in an
initialization expressi
fsubs.f90:340.15:
INTEGER (EVTREC(NVNT,31)=ISIZE) :: I,J
1
Error: Assumed size array 'evtrec' at (1) is not permitted in an
initialization expressi
fsubs.f90:371.22:
T(I)=EVTREC(NVNT,03)
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
fsubs.f90:373.6:
5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
1
Warning: Extension: REAL array index at (1)
fsubs.f90:373.8:
5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
1
Warning: Extension: REAL array index at (1)
fsubs.f90:372.6:
DO 5 J=1,I
1
Warning: Deleted feature: Loop variable at (1) must be integer
fsubs.f90:372.11:
DO 5 J=1,I
1
Warning: Deleted feature: End expression in DO loop at (1) must be
integer
gfortran: fsubs.o: No such file or directory
No nonmem execution.
Thanks,
Pavel
----- Original Message -----
From: "Ludden, Thomas"
Date: Wednesday, January 6, 2010 4:50 pm
Subject: RE: [NMusers] how to implement AR residual error model in
Nonmem with FOCE INT routine
To: Elodie Plan , [email protected], [email protected]
> Dear Elodie:
>
> Thank you for pointing out the documentation error in the help
> item. It
> will be corrected in the next release.
>
> Also, thank you for pointing out the need for using abbreviated code
> instead of verbatim code for introducing the THETA used to estimate
> correlation when using the SAEM method.
>
> Tom
>
> ________________________________
>
> From: Elodie Plan [mailto:[email protected]]
> Sent: Wednesday, January 06, 2010 3:28 PM
> To: Ludden, Thomas; [email protected]; [email protected]
> Subject: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
>
>
> Dear Tom and all,
>
>
>
> I work with the code provided in the html help for NM7 and it
> successfully estimates autocorrelation between observations; I
> just want
> to point out what appeared to be a typo to me: " IF
> (NEWIND.LE.2) I=0
> should be " IF (NEWIND.NE.2) I=0, and to share that to my experience
> it is required (with the new methods like SAEM) to introduce the THETA
> (through a variable name) in the abbreviated code rather than in the
> verbatim code.
>
>
>
> Best regards,
>
> Elodie
>
>
>
> Elodie L. Plan, PharmD, MSc,
>
> PhD student
>
> ********************************************
>
> The Pharmacometrics Research Group
>
>
>
> From: [email protected] [mailto:owner-
> [email protected]]on Behalf Of Ludden, Thomas
> Sent: Wednesday, January 06, 2010 6:57 PM
> To: [email protected]; [email protected]
> Subject: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
>
>
> If ADVAN13 is used then one must be using NONMEM 7.1.0. NONMEM
> 7.1.0 is
> coded in Fortran 90/95. Try replacing
>
>
>
> $ERROR
>
> " FIRST
>
> " COMMON /NMPRD5/ C(50,29)
>
> " DIMENSION T(300)
>
> " IF(NEWIND.NE.2) I=0
>
>
>
> with
>
>
> $ERROR
> " FIRST
>
> " USE SIZES, ONLY: NO
> " USE NMPRD_REAL, ONLY: C=>CORRL2
>
> " REAL (KIND=DPSIZE) :: T(NO)
>
> " INTEGER (KIND=ISIZE) :: I,J
>
> " MAIN
>
> " IF(NEWIND.NE.2) I=0
>
>
>
> The dimension of T should be the same as NO in SIZES.f90.
>
>
>
> There is a help item available. In the html directory double-
> click the
> file named index.htm (not $index.htm) to open the index for html-help,
> select "a" as the first letter of the keyword, and then proceed
> to the
> link for autocorrelation.
>
>
>
> It is difficult (impossible) to anticipate how individuals will use
> verbatim code so any use of verbatim code may be problematic.
> Only the
> simplest examples have been tested using NONMEM 7.1.0, so please
> proceedwith caution.
>
>
>
> If you continue to have problems then provide us the control
> stream and
> at least a few individuals from the data set and we will attempt
> to help
> with implementation.
>
>
>
> Tom
>
>
>
> ICON Development Solutions
>
> e-mail: [email protected]
>
>
>
>
>
>
>
>
>
> ________________________________
>
> From: [email protected] [mailto:owner-
> [email protected]]on Behalf Of [email protected]
> Sent: Wednesday, January 06, 2010 11:29 AM
> To: [email protected]
> Subject: Re: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
> 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
> > for
> instructions.
> gfortran: fsubs.o: No such file or directory
> No nonmem execution.
>
>
>
>
> ----- Original Message -----
> From: [email protected]
> 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: [email protected]
>
> > 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: [email protected]
> >
> > > 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.
> > > >
> > > >
> > >
> > >
> >
>
>
If indeed the difficulty is caused by having a variable named KIND,
then the character @ may be used to prevent the "replacement rule" from
being applied:
"@ REAL (KIND=DPSIZE) :: T(NO)
"@ INTEGER (KIND=ISIZE) :: I,J
See the help item for verbatim code.
On Fri, 8 Jan 2010 11:57:53 -0500, "Ludden, Thomas"
<[email protected]> said:
> Dear Pavel,
>
> Do you have a variable in $INPUT named "KIND"? If so, it is causing
> that data item (EVTREC(NVNT,31) to be substituted for KIND in the
> Fortran statements
>
> " REAL (KIND=DPSIZE) :: T(NO)
> " INTEGER (KIND=ISIZE) :: I,J
> .
> If that is not the case, then can you send me your control stream and a
> few individuals from the data file to test?
>
> Thanks,
>
> Tom
>
> ________________________________
>
Quoted reply history
> From: [email protected] [mailto:[email protected]]
> Sent: Friday, January 08, 2010 11:37 AM
> To: Ludden, Thomas
> Cc: [email protected]
> Subject: Re: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
>
>
> Hello Thomas,
>
> I tried the code as described in your email and in "correlations accross
> L2 records" help file:
>
> $ERROR
> " FIRST
> " USE SIZES, ONLY: NO
> " USE NMPRD_REAL, ONLY: C=>CORRL2
> " REAL (KIND=DPSIZE) :: T(NO)
> " INTEGER (KIND=ISIZE) :: I,J
> " MAIN
> " IF(NEWIND.NE.2) I=0
> " IF (NEWL2.EQ.1.AND.CMT.EQ.4) THEN
> " I=I+1
> " T(I)=TIME
> " DO 5 J=1,I
> " 5 C(J,I) = EXP(-THETA(9)*(TIME-T(J)))
> " ENDIF
>
> The following errors occur:
>
> IL1D027J.txt
> newline
> 1 file(s) copied.
> IL1D027J.OUT
> FMSG
> 1 file(s) copied.
> 1 file(s) copied.
> fsubs.f90:339.12:
> REAL (EVTREC(NVNT,31)=DPSIZE) :: T(NO)
> 1
> Error: Assumed size array 'evtrec' at (1) is not permitted in an
> initialization expressi
> fsubs.f90:340.15:
> INTEGER (EVTREC(NVNT,31)=ISIZE) :: I,J
> 1
> Error: Assumed size array 'evtrec' at (1) is not permitted in an
> initialization expressi
> fsubs.f90:371.22:
> T(I)=EVTREC(NVNT,03)
> 1
> Error: Unexpected STATEMENT FUNCTION statement at (1)
> fsubs.f90:373.6:
> 5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
> 1
> Warning: Extension: REAL array index at (1)
> fsubs.f90:373.8:
> 5 C(J,I) = EXP(-THETA(9)*(EVTREC(NVNT,03)-T(J)))
> 1
> Warning: Extension: REAL array index at (1)
> fsubs.f90:372.6:
> DO 5 J=1,I
> 1
> Warning: Deleted feature: Loop variable at (1) must be integer
> fsubs.f90:372.11:
> DO 5 J=1,I
> 1
> Warning: Deleted feature: End expression in DO loop at (1) must be
> integer
> gfortran: fsubs.o: No such file or directory
> No nonmem execution.
>
> Thanks,
> Pavel
>
>
> ----- Original Message -----
> From: "Ludden, Thomas"
> Date: Wednesday, January 6, 2010 4:50 pm
> Subject: RE: [NMusers] how to implement AR residual error model in
> Nonmem with FOCE INT routine
> To: Elodie Plan , [email protected], [email protected]
>
> > Dear Elodie:
> >
> > Thank you for pointing out the documentation error in the help
> > item. It
> > will be corrected in the next release.
> >
> > Also, thank you for pointing out the need for using abbreviated code
> > instead of verbatim code for introducing the THETA used to estimate
> > correlation when using the SAEM method.
> >
> > Tom
> >
> > ________________________________
> >
> > From: Elodie Plan [mailto:[email protected]]
> > Sent: Wednesday, January 06, 2010 3:28 PM
> > To: Ludden, Thomas; [email protected]; [email protected]
> > Subject: RE: [NMusers] how to implement AR residual error model in
> > Nonmem with FOCE INT routine
> >
> >
> >
> > Dear Tom and all,
> >
> >
> >
> > I work with the code provided in the html help for NM7 and it
> > successfully estimates autocorrelation between observations; I
> > just want
> > to point out what appeared to be a typo to me: " IF
> > (NEWIND.LE.2) I=0
> > should be " IF (NEWIND.NE.2) I=0, and to share that to my experience
> > it is required (with the new methods like SAEM) to introduce the THETA
> > (through a variable name) in the abbreviated code rather than in the
> > verbatim code.
> >
> >
> >
> > Best regards,
> >
> > Elodie
> >
> >
> >
> > Elodie L. Plan, PharmD, MSc,
> >
> > PhD student
> >
> > ********************************************
> >
> > The Pharmacometrics Research Group
> >
> >
> >
> > From: [email protected] [mailto:owner-
> > [email protected]]on Behalf Of Ludden, Thomas
> > Sent: Wednesday, January 06, 2010 6:57 PM
> > To: [email protected]; [email protected]
> > Subject: RE: [NMusers] how to implement AR residual error model in
> > Nonmem with FOCE INT routine
> >
> >
> >
> > If ADVAN13 is used then one must be using NONMEM 7.1.0. NONMEM
> > 7.1.0 is
> > coded in Fortran 90/95. Try replacing
> >
> >
> >
> > $ERROR
> >
> > " FIRST
> >
> > " COMMON /NMPRD5/ C(50,29)
> >
> > " DIMENSION T(300)
> >
> > " IF(NEWIND.NE.2) I=0
> >
> >
> >
> > with
> >
> >
> > $ERROR
> > " FIRST
> >
> > " USE SIZES, ONLY: NO
> > " USE NMPRD_REAL, ONLY: C=>CORRL2
> >
> > " REAL (KIND=DPSIZE) :: T(NO)
> >
> > " INTEGER (KIND=ISIZE) :: I,J
> >
> > " MAIN
> >
> > " IF(NEWIND.NE.2) I=0
> >
> >
> >
> > The dimension of T should be the same as NO in SIZES.f90.
> >
> >
> >
> > There is a help item available. In the html directory double-
> > click the
> > file named index.htm (not $index.htm) to open the index for html-help,
> > select "a" as the first letter of the keyword, and then proceed
> > to the
> > link for autocorrelation.
> >
> >
> >
> > It is difficult (impossible) to anticipate how individuals will use
> > verbatim code so any use of verbatim code may be problematic.
> > Only the
> > simplest examples have been tested using NONMEM 7.1.0, so please
> > proceedwith caution.
> >
> >
> >
> > If you continue to have problems then provide us the control
> > stream and
> > at least a few individuals from the data set and we will attempt
> > to help
> > with implementation.
> >
> >
> >
> > Tom
> >
> >
> >
> > ICON Development Solutions
> >
> > e-mail: [email protected]
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [email protected] [mailto:owner-
> > [email protected]]on Behalf Of [email protected]
> > Sent: Wednesday, January 06, 2010 11:29 AM
> > To: [email protected]
> > Subject: Re: [NMusers] how to implement AR residual error model in
> > Nonmem with FOCE INT routine
> >
> > 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
> > > for
> > instructions.
> > gfortran: fsubs.o: No such file or directory
> > No nonmem execution.
> >
> >
> >
> >
> > ----- Original Message -----
> > From: [email protected]
> > 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: [email protected]
> >
> > > 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: [email protected]
> > >
> > > > 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.
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >