Jump to content


Photo

Help with error message


  • Please log in to reply
8 replies to this topic

#1 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 22 November 2013 - 09:47 PM

Hi,

Sometimes I get the following error:

 

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

 

Could you please give me an idea of what is wrong, because I can't figure it out?

 

Thanks,

Georgia



#2 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 25 November 2013 - 06:35 PM

This is the code that I keep getting the above error.

 

test(){

deriv(A1 = - (Cl * C) - (Clform * C))

 

deriv(A1met = - (CLmet * C1met) + (Clform * C))

C = A1 / V

dosepoint(A1)

C1met = A1met / Vmet

error(CEps = 2.21884)

observe(CObsmet = C1met + CEps * (1 + C1met * CMixRatio))

stparm(V = VI)

stparm(Cl=ClI)

stparm(Cl = (1-fm)*ClI)

 

stparm(Vmet = tvVmet*(BW/70)^dVdBW * exp(nVmet))

 

stparm(CLmet = tvCLmet * exp(dClmetd_2B6_91*(_2B6_9==1))* exp(nCLmet))

 

 

 

stparm(Clform = fm*ClI)

 

 

covariate(ClI)

covariate(VI)

covariate(BW)

 

 

covariate(_2B6_9())

 

 

fixef(dClmetd_2B6_91(enable=2) = c(, 0, ))

fixef(tvVmet = c(0, 40000, ))

fixef(tvCLmet = c(0, 1500, ))

 

fixef(fm (freeze) = c(, 0.7, ))

fixef(CMixRatio = c(0, 0.102878, ))

fixef(dVdBW = c(0, 0.5, ))

ranef(diag(nVmet, nCLmet) = c(0.04, 0.04))

}

 

 

Any help?

Thanks



#3 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 25 November 2013 - 06:35 PM

This is the code that I keep getting the above error.

 

test(){

deriv(A1 = - (Cl * C) - (Clform * C))

 

deriv(A1met = - (CLmet * C1met) + (Clform * C))

C = A1 / V

dosepoint(A1)

C1met = A1met / Vmet

error(CEps = 2.21884)

observe(CObsmet = C1met + CEps * (1 + C1met * CMixRatio))

stparm(V = VI)

stparm(Cl=ClI)

stparm(Cl = (1-fm)*ClI)

 

stparm(Vmet = tvVmet*(BW/70)^dVdBW * exp(nVmet))

 

stparm(CLmet = tvCLmet * exp(dClmetd_2B6_91*(_2B6_9==1))* exp(nCLmet))

 

 

 

stparm(Clform = fm*ClI)

 

 

covariate(ClI)

covariate(VI)

covariate(BW)

 

 

covariate(_2B6_9())

 

 

fixef(dClmetd_2B6_91(enable=2) = c(, 0, ))

fixef(tvVmet = c(0, 40000, ))

fixef(tvCLmet = c(0, 1500, ))

 

fixef(fm (freeze) = c(, 0.7, ))

fixef(CMixRatio = c(0, 0.102878, ))

fixef(dVdBW = c(0, 0.5, ))

ranef(diag(nVmet, nCLmet) = c(0.04, 0.04))

}

 

 

Any help?

Thanks



#4 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 25 November 2013 - 07:01 PM

Dear colleague

My computers are all in repair and I am writing for one that is running already NLME for days. Therefore I cannot check but I can see twice the structural parameter Cl defined which is not allowed

 

 

 stparm(Cl=ClI)

 stparm(Cl = (1-fm)*ClI)

 

 Remove one of the two and try again and let me know.

best

Serge



#5 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 25 November 2013 - 08:41 PM

Thanks for the answer.

I did remove the stparm(Cl = (1-fm)*ClI) , but I get the same error.

I 'll try again and see what happen.

But when I run the following code

test(){

deriv(A1 = - (Cl * C) - (Clform * C))

 

deriv(A1met = - (CLmet * C1met) + (Clform * C))

C = A1 / V

dosepoint(A1)

C1met = A1met / Vmet

error(CEps = 2.21884)

observe(CObsmet = C1met + CEps * (1 + C1met * CMixRatio))

stparm(V = VI)

stparm(Cl=ClI)

stparm(Cl = (1-fm)*ClI)

 

stparm(Vmet = tvVmet*(BW/70)^dVdBW * exp(nVmet))

 

stparm(CLmet = tvCLmet * exp(nCLmet))

stparm(Clform = fm*ClI)

 

 

covariate(ClI)

covariate(VI)

covariate(BW)

fixef(tvVmet = c(0, 40000, ))

fixef(tvCLmet = c(0, 1500, ))

 

fixef(fm (freeze) = c(, 0.7, ))

fixef(CMixRatio = c(0, 0.102878, ))

fixef(dVdBW = c(0, 0.5, ))

ranef(diag(nVmet, nCLmet) = c(0.04, 0.04))

}

 

It runs perfectly.

Then I add as a covariate the CYP2B69 and then I get the error.

Thanks,

Georgia



#6 serge guzy

serge guzy

    Advanced Member

  • Members
  • PipPipPip
  • 485 posts

Posted 25 November 2013 - 09:34 PM

Can you check the covariate type tab and see if you by chance added an empty cell? If so, remove it. Difficult to know without getting the project. Anyway, I cannot check any project as I am stuck with my computer but let me know. My colleagues can also help you if they see the project. If the data are confidential, can you send the project without data? It will allow to check the interface and the code.

best

Serge



#7 Samer Mouksassi

Samer Mouksassi

    Advanced Member

  • Val_Members
  • PipPipPip
  • 90 posts

Posted 26 November 2013 - 04:41 AM

Hi,

If I understand well the code runs and when you add this line :

covariate(_2B6_9())

 

it stops and provide this error : Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

 

In addition to Serge's suggestion, try to unfreeze all the parameters and rerun to see if you still get this error.

 

Also I would use names that does not have special characters:

replace : _2B6_9 by ENZB69 for example

 

Samer



#8 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 26 November 2013 - 06:03 PM

Thank you both so much!

The model finally run!

I don't get very good results, (I unfroze the fm and I get a negative estimate)-

BUT the model run!

 

I really appreciate your help. I am self taught at Phoenix, so I am trying to find my way.

 

Georgia



#9 Georgia Charkoftaki

Georgia Charkoftaki

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 26 November 2013 - 06:03 PM

Thank you both so much!

The model finally run!

I don't get very good results, (I unfroze the fm and I get a negative estimate)-

BUT the model run!

 

I really appreciate your help. I am self taught at Phoenix, so I am trying to find my way.

 

Georgia






2 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    Bing (2)