Jump to content


Photo

Subscript out of range


  • Please log in to reply
7 replies to this topic

#1 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 12 November 2010 - 05:49 PM

I have this PK/PD model (user defined) with very rich PK PD data. Initially it all worked fine. When I tried to use a more complicated model (e.g. adding a precursor compartment), then I got "subscript out of range" error for one individual. But the model still finished the run and returned results. The individual in question does not have prediction but still with parameters estimated. What could be the problem? Can I still trust the results? Thanks.

 

Jun



#2 Emily Colby

Emily Colby

    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 12 November 2010 - 05:53 PM

Dear Jun,

 

Are you using WinNonlin 5.x or earlier, or are you using Phoenix?

 

Emily



#3 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 12 November 2010 - 05:55 PM

Hi, Emily,

 

I am on WinNonlin 5.2.1

 

Jun



#4 Emily Colby

Emily Colby

    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 12 November 2010 - 05:56 PM

Can you post the code?



#5 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 12 November 2010 - 06:02 PM

COMMANDS

NFUNCTIONS 2

NDERIVATIVES 5

NPARAMETERS 15

PNAMES 'CL', 'Vc', 'K12', 'K21', 'K13', 'K31', 'Kout', 'R0', 'Emax', 'EC50', 'AMP', 'PERIOD', 'ACR', 'Rp','Gamma'

PUNIT 'L/hr','L','1/hr','1/hr','1/hr','1/hr','1/hr','pg/mL','~','ug/L','pg/mL','hr','hr','pg/mL','~'

NSECONDARY 2

SNAMES 'Kp_in','Kp_out'

SUNIT 'pg/mL/hr','1/hr'

END

remark - define temporary variables

TEMPORARY

 t=x

 Dose=CON(1)

 Kp_in=Kout*R0

 Kp_out=Kp_in/Rp

 Drug=1-Emax*(Z(1)/Vc)**Gamma/(EC50**Gamma+(Z(1)/Vc)**Gamma)

END

remark - define differential equations starting values

START

Z(1) = Dose

Z(2) = 0

Z(3) = 0

Z(4) = Rp

Z(5) = R0

END

remark - define differential equations

DIFFERENTIAL

DZ(1) = -(K12+K13+CL/Vc)*Z(1)+K21*Z(2)+K31*Z(3)

DZ(2) = K12*Z(1)-K21*Z(2)

DZ(3) = K13*Z(1)-K31*Z(3)

DZ(4) = Kp_in - Kp_out*Drug*Z(4)

DZ(5) = Kp_out*Drug*Z(4)-Kout*Z(5)

END

remark - define algebraic functions

FUNCTION 1

F= Z(1)/Vc

END

FUNCTION 2

F= Z(5)+ AMP*sin(2*3.1415*((T+ACR)/PERIOD))

END

remark - define any secondary parameters

SECO

Kp_in=Kout*R0

Kp_out=Kp_in/Rp

END

remark - end of model

EOM



#6 Emily Colby

Emily Colby

    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 12 November 2010 - 06:29 PM

Are there any blank cells in the dosing section? For example, if you entered there would be two doses, but only entered information for one dose, or left a cell blank? Is there anything different about the first subject's data compared with the rest of the subjects?

 

"Subscript out of range" usually means there was a matrix defined somewhere in the program, and the input given goes outside the dimensions of that matrix. This could be an internal matrix (such as built in functions, in which case the problem can be resolved by fixing the model code that uses those functions) or one that you have access to through the UI (e.g., data worksheets and other user inputs given in the UI).



#7 Emily Colby

Emily Colby

    Advanced Member

  • Members
  • PipPipPip
  • 88 posts

Posted 12 November 2010 - 06:34 PM

Another thing you might try is taking out the underscores (e.g., kpin instead of kp_in).



#8 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 12 November 2010 - 07:01 PM

Emily,

 

Thanks for the suggestions. There is no empty cells in dosing regimen. Actually I used the exact same dataset for other simpler models just fine (same dosing regimen). I tried to delete the underscore it didn't work either. And every time it always had the problem with same individual and I checked there was nothing special about that guy. Thanks.

 

Jun






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users