# PharmPK Discussion - If then Else - Phoenix 6.4

PharmPK Discussion List Archive Index page
• On 29 Jul 2015 at 12:45:42, renu singh (singrenu.-at-.yahoo.com) sent the message
`Hi,I will really appreciate if some could provide me info on how to write "if then else" function inPhoenix 6.4.I am also seeking input on different ways to limit the estimates of typical values of theta to belowa certain value. I have given bounds to the initial estimates but I am getting final estimateshigher than my upper bound.Looking forward to suggestions.Renu`
Back to the Top

• On 29 Jul 2015 at 14:04:50, Ana Henry (Ana.Henry.-at-.certara.com) sent the message
`Hello Renu,The If statement in Phoenix 6.4 can be accessed via the Data Wizard>Transformation>CustomThe syntax is like Excel:If(logical_statement,then do this, else do this)ExampleIf(conc='BQL',0,conc)This forces you to map a variable to 'conc'  (it can have a different name).  It reads 'Ifconcentration is equal to BQL set it to 0 else set to the value of variable conc'.  It creates a newcolumn that you specify the name. Character data in the IF statement need quotes around it. Thereshould be no spaces between If and the parenthesis.Embedded IF-statements are also allowedIf(Subject<>1,conc,if(conc=0,'BQL',conc))Subject and conc variables need to be mapped then the tool will interpret this as 'If subject is not1, then set the new column to the value of conc, else, if subject=1 and conc equals zero, set thenew column value to 'BQL' else (i.e. subject=1 but concentration not equal to 0) set the new columnvalue to 0'.Hope this helps,Ana HenryCertara Int.`
Back to the Top

• On 29 Jul 2015 at 16:06:36, Ana Henry (Ana.Henry.-a-.certara.com) sent the message
`I would like to clarify that if the question about ' if and then' statements in Phoenix 6.4 refersto Pharsight Modeling Language, the syntax is different than the UI.The PML syntax is as followsif (Aa < 2){Aa = Aa + some_dose_amount} else {} }Ana Henry`
Back to the Top

• On 30 Jul 2015 at 09:01:24, Simon Davis (Simon.Davis.aaa.certara.com) sent the message
`Hi Renu,   If I read your message correctly you want an IF_then statement within your Phoenix model code,depending what you are trying to achieve you might look at Sleep or Sequence, if you can post yourproject on the forum we can try to help you in  more specific termsGet tips and discuss Phoenix with other users; www.certara.com/forums       Best regards,                         Simon.Simon.Davis.-a-.certara.comSenior Scientific ConsultantPharsight- A Certaraâ„¢ Company`
Back to the Top

 PharmPK Discussion List Archive Index page

Copyright 1995-2014 David W. A. Bourne (david@boomer.org)