I have a few questions about user-defined models 1. What is the exact executing sequence of all the code blocks (e.g. Temporary, Start, Transform, Function etc)? 2. Are the WinNonlin variables (e.g. F, WT, X, Y) are global variables that are accessible in any code block? I used “WT” as a variable symbol to store body weight data in “Diff” block and it doesn’t seem to affect the weighting scheme. 3. To follow up question two, in the User’s guide, p244 MODEL 1 TRANSFORM IF X > 10 THEN WT = 1/Y ELSE WT = 1/(Y*Y) ENDIF END My question is if I can use “F” instead of Y to specify a re-weighting scheme in Transform block. Or alternatively can I use the “IF THEN” structure in Function block to specify different weighting schemes. This question also goes back to question 2, is F a global variable? 4. I understand the “Diff” block runs to the last X variable. I want to code it in a way that the “Diff” system can run to an extended arbitrary time point which is determined dynamically in the estimation process. I see a clumsy way to do it is to insert a dummy time point in the data set. But I want it in a more flexible way. I noticed in the User’s guide there is an XARRAY variable. How do I access to that? So much for the first time. Appreciate your commets. Jun Shen Senior Pharmacokineticist Seventh Wave Labs
Dear Jun Shen Here are some answers to your questions 1. What is the exact executing sequence of all the code blocks (e.g. Temporary, Start, Transform, Function etc)? Answer: The sequence for blocks is temp/transform/start (if there are Des/diff (if there are Des)/Function 1, 2, …/ seco 2. Are the WinNonlin variables (e.g. F, WT, X, Y) are global variables that are accessible in any code block? I used “WT” as a variable symbol to store body weight data in “Diff” block and it doesn’t seem to affect the weighting scheme. Answer: only variables in the temp block are global – all others are local to that block 3. To follow up question two, in the User’s guide, p244 MODEL 1 TRANSFORM IF X > 10 THEN WT = 1/Y ELSE WT = 1/(Y*Y) ENDIF END My question is if I can use “F” instead of Y to specify a re-weighting scheme in Transform block. Or alternatively can I use the “IF THEN” structure in Function block to specify different weighting schemes. This question also goes back to question 2, is F a global variable? [i]
Ana, Thanks for the answers. For question #3 I intended to use different weighting schemes for different part of the data. For example, for Y>Value A, 1/F be used, for Y
Ana, Also for question #2 I had different experience. I defined a bunch of variables in “Diff” block and used them to calculate some secondary parameters in “SECO” block. Since all the values of these variables are still available in “SECO”, they kind of become “global”. Any comment? Thanks. Jun
Dear Jun, You should be able to use different weighting schemes for different part of the data. Below is an example: FUNC1 IF (T LE TLAG) THEN F=0.0 WT=0.0 ELSE F = … ENDIF END The only global variables that can be used throughout the code need to be defined in the TEMP block.In some cases then secondary block might be able to access some of the parameters defined but these would not be available in the rest of the code. Ana
Dear Ana, Thanks again. So to what other blocks does “SECO” have access, in addition to “DIFF”? Jun
Seco has access to TEMP ( as global variables), DIFF and FUNC