Hi, Do you see errors with the if statements below? Before I added the if statement, there were no warnings. #residual error error(CEpsblood=0.5) observe(Cobsblood = Cblood * (1 + CEpsblood)) error(CEps2 = 0.7) if (pbmccc1>=1, observe(CObs2 = C2 + CEps2), observe(CObs2 = C2 * (1 + CEps2) + ((pbmccc1-0.87)/0.87)) error(CEps3 = 0.6) if (pmncc1>=1, observe(CObs3 = C3 + CEps3), observe(CObs3 = C3 * (1 + CEps3) + ((pmncc1-0.87)/0.87))
I haven’t checked the syntax otherwise but both if statements need one more closing bracket e.g. ) Simon
Try this instead: #residual error error(CEpsblood=0.5) observe(Cobsblood = Cblood * (1 + CEpsblood)) error(CEps2 = 0.7) observe(CObs2 = C2 + (pbmccc1>=1)CEps2 + (pbmccc1<1)C2CEps2 + (pbmccc1<1)(pbmccc1-0.87)/0.87 ) error(CEps3 = 0.6) observe(CObs3 = C3 + (pmncc1>=1)CEps3 + (pbmccc1<1)C3CEps3 + (pbmccc1<1)(pmncc1-0.87)/0.87 ) Note that (pmncc1>=1) = 1 if it’s true and 0 if it’s false.
Hi, The way I coded it in my previous message in this thread was incorrect. The corrected statement is: #residual error error(CEps2 = 0.7) observe(CObs2 = C2 + CEps2*((pbmccc1>=1 + (pbmccc1<1)C2)) + (pbmccc1<1)(pbmccc1-0.87)/0.87*pbmcccparm) The error message now is that tvpbmccc1 is undefined. However, what I want to do is reference the value of pbmccc1 that corresponds to each concentration. In other words, I want the value of pbmccc1 to be taken from the dataset, while pbmcccparm is an estimated parameter. Is there a way to have the model obtain pbmccc1 from the dataset, as opposed to it being interpreted as a parameter to be estimated?