Jump to content


Photo

Save values in an array


  • Please log in to reply
9 replies to this topic

#1 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 10 December 2010 - 06:20 AM

Hi,

 

I need to save a series of values to an array. Not sure how to use an array in WinNonlin. I understand we can pre-specify values in CON(), can we also assign values to CON() in the code? Thanks.

 

Jun



#2 Ana Henry

Ana Henry

    Advanced Member

  • Members
  • PipPipPip
  • 232 posts

Posted 10 December 2010 - 04:35 PM

Dear Jun,

I am assuming that your question is for WNL 5 ASCII models or Classical Models in Phoenix WinNonlin. These values cannot be (re) assigned within the code. However, if you can explain what you want to do there is likely a workaround.

 

Ana



#3 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 10 December 2010 - 05:02 PM

Hi, Ana,

 

I am on WinNonlin 5.2.1. I have this multiple dosing PKPD simulation model. In this model I want to calculate a time duration in which the response is under some threshold after each dose. So I figure an array is the best way to handle this. I tried to program to save the values in CON() and got an error "floating point error, overflow". Thanks.

 

Jun



#4 Ana Henry

Ana Henry

    Advanced Member

  • Members
  • PipPipPip
  • 232 posts

Posted 10 December 2010 - 06:30 PM

Hi Jun,

The thresholds would likely be put into predefined placeholders in the constants array. It is difficult to answer this question without seeing your model. If you could share it we might be able to help.

 

Ana



#5 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 10 December 2010 - 07:02 PM

Hi, Ana,

 

The definition of threshold is not the problem. The model is simply a 2-compartment PK and indirect PD model. The threshold is defined as 0.7*R0, where R0 is the PD baseline parameter. Now I have 12 doses, I want to calculate a duration for each dose so I will have 12 duration results. That's the problem. Thanks.

 

Jun



#6 Simon Davis

Simon Davis

    Advanced Member

  • Administrators
  • 1,316 posts

Posted 10 December 2010 - 11:01 PM

Jun, this may be a somewhat inelegant solution but could you use the Predicted Data values from your model as input for an NCA PD model to get your desired end point of "a time duration in which the response is under some threshold after each dose" ?

 

(or if you are looking at PK then use the "therapeutic ranges" option

 

 Simon.



#7 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 10 December 2010 - 11:15 PM

Hi, Simon,

 

Actually, the programed code is more convenient for me. First, the NCA (either PK or PD) can only return one duration parameter a time. I would like to see 12 duration values from 12 doses, so I have to post-process the predicted data to make it work for 12 dose profiles. And this is only one simulation, we may need to do a lot more. Second, the accuracy of this duration parameter in NCA depends on the time points provided in the simulation dataset. We may not have a lot of time points. If we can calculate this value in differential equation system, it would be much more accurate. It all comes down to one question now.

 

How can I use array (to be assigned values) in a user-defined model? Thanks.

 

Jun



#8 Simon Davis

Simon Davis

    Advanced Member

  • Administrators
  • 1,316 posts

Posted 14 December 2010 - 02:40 PM

Hi Jun, sorry I haven't worked out an answer to your array question; but one thing I did want to stress is that in a Phoenix workflow the steps I described would be quite easy to set up and if necessary duplicate/template so that it executed with a single click.

 

I notice you're quite an industrious user of Classic WinNonlin, with the R-type syntax of the new Phoenix drug model engine many of your problems would be easier. Do you have a plan to start using it soon? even if it is only for exploratory models before you can fully validate it?

 

  Simon.

 

PS could you use a Multi-Transform step after your model has run to;

 

a) identify the data as your 12 'profiles'

B) use a change from Baseline step ?



#9 Jun Shen

Jun Shen

    Member

  • Members
  • PipPip
  • 23 posts

Posted 14 December 2010 - 04:08 PM

Hi, Simon,

 

Thanks for looking into this problem. Since I haven't used Phoenix, I am not sure how different it is to define an ASCII model in Phoenix from Classic WNL. Do you mean Phoenix has a totally different syntax (like R)? Could you provide some reference or examples? It's a matter of time for us to migrate to Phoenix eventually. But we may still want to keep the classic for historical reasons.

 

Also I am not so sure how to use multi-transform to solve my problem. Thanks.

 

Jun



#10 Simon Davis

Simon Davis

    Advanced Member

  • Administrators
  • 1,316 posts

Posted 14 December 2010 - 07:52 PM

I really would suggest looking at Phoenix sooner rather than later, a couple of reminders.

1) you can install Phoenix WiNonlin 6 and WinNonlin 5 on the same machine.

2) You can still run WNL 5 user code in Phoenix (as well as of the old built in models, NCA etc.)

3) there is no charge to upgrade to Phoenix WinNonlin 6; you may find the recorded Webinars useful e.g. http://www.pharsight....php#replay_031

A Comparison of Phoenix WinNonlin 6.0 and WinNonlin 5.2.1

Multi-transform is very useful for pre- and post-processing in WNL classic and can be found under the Tools menu. If you can't still solve your problem, we could perhaps take a look at your code and maybe provide an answer - you could send it to Support@pharsight.com if you don't want to post it here.

Simon Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users