# Using a NONMEM dataset in Phoenix

**URL:** <https://forum.certara.com/t/using-a-nonmem-dataset-in-phoenix/2685>\
**Category:** Modelling and Simulation\
**Created:** [January 31, 2014, 3:14pm UTC](https://forum.certara.com/t/using-a-nonmem-dataset-in-phoenix/2685 "2014-01-31T15:14:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagar110](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@sagar110](https://forum.certara.com/u/sagar110)\
**Post date:** [January 31, 2014, 3:14pm UTC](https://forum.certara.com/t/using-a-nonmem-dataset-in-phoenix/2685/1 "2014-01-31T15:14:03Z")

</div>

Hello, I would like to know if there is a way i can use this directly in Phoenix NLME without having to manipulate the dataset. A simple example would be if I have a parent metabolite dataset in NONMEM format. ID Time DV CMT 1 0 100 1 1 0 5 2 1 1 50 1 1 1 10 2 Is there a way to code this so i can have two different observe statements (for CObs, and C2Obs), but only having to map one column (DV) and specifying for example CMT == 1? CObs:C2Obs.

---

<div class="post-metadata">

**Author:** ![SimonDavis](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@SimonDavis](https://forum.certara.com/u/SimonDavis)\
**Post date:** [January 31, 2014, 3:48pm UTC](https://forum.certara.com/t/using-a-nonmem-dataset-in-phoenix/2685/2 "2014-01-31T15:48:52Z")

</div>

Hi Sagar, you can; but it’s really very easy with a pivot to turn it into the Phoenix default for this type of data; ![](http://pharsight.com/extranet/media/kunena/attachments/legacy/images/Pivot.jpg) Which you can then easily build the model for with the graphical editor If that’s not suitable for you then I’ll have to have a poke around to remind myself how to code it this way. Simon ![](http://pharsight.com/extranet/media/kunena/attachments/legacy/images/Pivotresults.jpg)

 ![Pivotresults.jpg](https://us1.discourse-cdn.com/certara/original/2X/b/bebfb6ee31eae729e6499169937c488bbad9a652.jpeg) ![Pivot.jpg](https://us1.discourse-cdn.com/certara/original/1X/1542b37eea00f51dbd13d8a9964b834efe625dc3.jpeg)

---

<div class="post-metadata">

**Author:** ![Samer\_Mouksassi](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Samer\_Mouksassi](https://forum.certara.com/u/Samer_Mouksassi)\
**Post date:** [January 31, 2014, 4:13pm UTC](https://forum.certara.com/t/using-a-nonmem-dataset-in-phoenix/2685/3 "2014-01-31T16:13:40Z")

</div>

Hi, How phoenix nlme is designed is to have a separate column for each kind of observation. This can be easily done using a simple data transformation the logic is below: if (CMT = 1 , PK= DV , BLANK) if (CMT =2, MET = DV, BLANK) so you create tow new columns for each type of DV now that does not really answer your question but that is what I recommend. In NLME you do not have to have two lines with the same time point you can have: ID Time PARENT MET 1 0 100 5 etc the caveat is that if you have mdv it will apply for both so keepign two separate lines gives you more flexibility ID Time PARENT MET MDV 1 0 100 1 1 0 5 0 To answer your question you can have conditional observe statement like this : observe(CObs = (C\*(CMT==1) + C2\*(CMT==2) ) + CEps \* ( (CMT==1) + CMixRatio \*(CMT==2)) ) CEps should appear once in each observe statement. [file name=cmtflag.phxproj size=662045][Certara | Drug Development Solutions](http://pharsight.com/extranet/media/kunena/attachments/legacy/files/cmtflag.phxproj%5B/file%5D%5Bcmtflag.phxproj%7Cattachment%5D(upload://okAD7R3MOIzsXMiKt5o8A5H2sp4.phxproj)) (647 KB)
