Help with error message

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

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

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

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

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 = fmClI) 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

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

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

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

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