How do I freeze parameters?

Hello, Our group has written the PML code for a PK model. Now we are attempting to “freeze” or “fix” some of the parameters based on values in the literature and results of a previous model. We clicked on the setup tab, and under there we entered the Initial estimate, Lower, and Upper parameter limits , but when we execute the model, Phoenix seems to be ignoring our set limits for the parameters. What can we do within Phoenix to have these parameters be fixed or frozen? Thank You, Parag

Dear Parag, In PML you can freeze parameters in the fixef statement as seen for fixed effect c below: fixef(a b = 6.02 c(freeze) = 3.14 d = c(0.01, 0.1, 5) e = c(0.01, 0.1, 5) ) In this example a, b, c, d, and e are fixed effect parameters. Line 1 says that a is a fixed effect parameter. Line 2 gives b an initial value of 6.02. Line 3 gives c a fixed, non-estimated initial value. Line 4 gives d an initial value of 0.1, and provides a lower bound of 0.01 and an upper bound of 5. Line 5 is like line 4. This information is in page 47 of the Phoenix Modeling Language Reference Guide that is provided with the application. Best Regards, Ana

Hi Anna, Thank you for your reply. The issue with using the fixef statement in the code is that this will freeze the parameter at the same value for every subject. Is there a way to freeze the same parameter at a unique value for each subject? This is what I had hoped would occur under the setup tab–>parameters when we enter an intial value with a lower and upper limits set very close to the initial value. However, when we execute the model, phoenix appears to ignore the the upper and lower limits for these parameters. Thank you for you help, - Parag

Hi Parag, Sorry for missunderstanding your question. What you are trying to do is not possible via the PML code for fixed effects. However, you could consider converting the structural parameters to covariates. Ana

HI Anna, Would conversion of the parameters to covariates allow us to set the value for each patient? I am trying to figure where in the reference guide it is explained how to do this. Do you happen to know? Thanks, - Parag

Hi Parag, I don’t know if this is in the reference guide explicitly. You could do a simple run, and make a Table showing the Structural Parameters. Then take that table and merge it with the input dataset, making a new dataset in which the structural parameters are covariates. Then take the model and get rid of those structural parameters, making them covariates instead. Sorry I don’t have an example of this but maybe someone else in the forum does? Ana

What Ana described is our usual workflow for sequential PK/PD or any model where you try to fix “individual parameters” to previously estimated values. Step 1: estimate your individual parameters and output with a table Step 2: merge original data with individual parameters Step 3: use the individual parameters as the sole covariate in your equation covariate ( CLI) # individual clearance e.g. TVCL = CLI this way the column CLI will “fix” the values of individual paramters to those previously estimated. if you are using the built in model you can still use the covariate functionality buy you might need to fix some not needed parameters: TVCL = intercept + theta*CLI fix intercept to zero and theta to 1 to get the right equation to your parameter Samer Mouksassi

Attached is a written example using individual PK parameters (frozen) in a PK/PD model. The example walks you through the PK modeling, taking the output and merging it with the original data, and feeding the individual parameters in as covariates. [file name=3dayPhoenixNLMETraining2012Jan3ec_US_PHX_6_2_1_ex10.pdf size=668087]Certara | Drug Development Solutions (652 KB)

Attached is the Phoenix project file for the previous example. [file name=pkfix_pd.phxproj size=3517769]Certara | Drug Development Solutions (3.35 MB)

Thank you so much Ana, Samer and ecolby for your helpful responses! I will try this method and let you know if I run into problems/questions. - Parag

Hi all, I’ve tried this method both in the PML code (as Sameer provided instructions for) and using a pre-built graphical model (as the PDF by ecolby provided instructions for), and in both cases it isn’t working for me. The model fails to execute when I try to freeze via the PML code. C:\Users\parag\AppData\Local\Temp\Phoenix\DME_41~1>“C:\PHSTMinGW\bin\gcc” -O3 -g -UWIN32 -fverbose-asm -I.\Work -c .\Work\Model.c ERROR in compiling Model.c --------------- Model build failed ---------------- ------------- log4.txt: Could Not Find C:\Users\parag\AppData\Local\Temp\Phoenix\DME_41~1\Work*.o .\Work\Model.c:622: error: initializer element is not constant .\Work\Model.c:625: error: initializer element is not constant .\Work\Model.c:628: error: initializer element is not constant ‘“.\NLME7.exe”’ is not recognized as an internal or external command, operable program or batch file. When I tried to do it using the graphical pre-built model, the model runs but it reports the parameters estimates as 1 (Which is what they are frozen to) but it does not report the fixed values of the parameters. I’m not sure what I’m doing wrong or if there’s a problem with the model itself.

For the textual model, please send the code. There is probably a syntax error. For the built-in model, you should not see the PK parameters in the Theta worksheet in the output because they are mapped in as covariates. The table from the PK model contains the PK parameters for all the individuals (“table01” in the Results tab).

Thanks for explaining the graphical model results, ecolby. I had suspected this might be the case, but wasn’t sure. Here’s our PML code: test(){ deriv(A1=-(CLD/V1)*A1 + (CLD/V2)*A2-(CLS/V1)*A1-(CLH/V1)*A1) deriv(A2=(CLD/V1)*A1-(CLD/V2)*A2) deriv(AS=(CLS/V1)*A1-(CLSH/VS)AS) deriv(AH=(CLH/V1)A1+(CLSH/VS)AS) #this model has one-way clearance arrows from the central compartment to the liver and spleen compartments #CLSH= clearance from spleen to liver. This is the added connection in this model #AS= mass in spleen, CLS= clearance from plasma to spleen, CLH= clearance from plasma to liver, AH=mass in liver C = A1/V1 C2 = A2/V2 CS = AS/VS CH = AH/VH #Declaring dosing to A1 dosepoint(A1) #Error Model- changed to match 1 compartment error(CEps=1) observe(CObs=C(1+CEps)) error(CEpsS=1) observe(CObsS=CS(1+CEpsS)) error(CEpsH=1) observe(CObsH=CH(1+CEpsH)) # covariates covariate (CLDI) # individual CLD covariate (V1I) # individual V1 covariate (V2I) # individual V2 #Parameter Model stparm(V1=(tvV1)) stparm(V2=(tvV2)) stparm(CLD=(tvCLD)) stparm(VS=(tvVS)) stparm(VH=(tvVH)) stparm(CLS=(tvCLS)) stparm(CLH=(tvCLH)) stparm(CLSH=(tvCLSH)) fixef(tvV1=V1I) #fixed to covariate fixef(tvV2=V2I) # fixed to covariate fixef(tvCLD=CLDI) #fixed to covariate fixef(tvVS=c(,.1,)) fixef(tvVH=c(,1,)) fixef(tvCLS=c(,.01,)) fixef(tvCLH=c(,.01,)) fixef(tvCLSH=c(,.001,)) } Do you see any synthax errors? Thanks again for all your help.

Yes, # covariates covariate (CLDI) # individual CLD covariate (V1I) # individual V1 covariate (V2I) # individual V2 should not have any space between “covariate” and “()”. Try this instead: # covariates covariate(CLDI) # individual CLD covariate(V1I) # individual V1 covariate(V2I) # individual V2

Hi ecolby, I tried with deleting the space in the code and I am still getting same result (same error messages as earlier). Any ideas on what the issue is? Thanks, - Parag

I think the problem is setting fixed effects to covariates in the fixef() statements. Try setting them in the stparm() statements instead, like this: #Parameter Model stparm(V1=(V1I)) stparm(V2=(V2I)) stparm(CLD=(CLDI)) stparm(VS=(tvVS)) stparm(VH=(tvVH)) stparm(CLS=(tvCLS)) stparm(CLH=(tvCLH)) stparm(CLSH=(tvCLSH)) fixef(tvVS=c(,.1,)) fixef(tvVH=c(,1,)) fixef(tvCLS=c(,.01,)) fixef(tvCLH=c(,.01,)) fixef(tvCLSH=c(,.001,))

That seems to have done the trick! It’s now executing fine. Thank you so much, ecolby!