Jump to content


Photo

Enable command


  • Please log in to reply
2 replies to this topic

#1 Thomas Klitgaard

Thomas Klitgaard

    Member

  • Members
  • PipPip
  • 10 posts

Posted 10 July 2015 - 08:50 AM

I have a quite large model built in the previous PHX 1.3/NLME 1.2 version, and have recently migrated to PHX 1.4/NLME 1.3. I am now experiencing problems running my model and suspect it do be due a change in the "enable" command. I have

used in rigorously to manually turn covariates on/off during model development.

 

For instance, I have this statement :

 

 

          tvFTOTadj=(tvFTOT*(1+Mix1Sep2ontvFTOT*(Mix1Sep2==1))*(1+InsDosontvFTOT*InsDos)*(1+InsSmontvFTOT*InsSm))

          stparm(FTOT = 1/(1+exp(log(1/tvFTOTadj-1)+nFTOT)))

 

          fixef(tvFTOT = c(, 0.53,))

 

          #FTOT

          fixef(Mix1Sep2ontvFTOT(enable=0)=c(,0.1,))

          fixef(InsDosontvFTOT(enable=0)=c(,0.000025,)) # level is 4000 pM, ie. 0.000025*4000=0.1

          fixef(InsSmontvFTOT(enable=0)=c(,0.1,))

 

 

where I’d be manually testing three difference covariates on FTOT. In the base case, they would all be turned off with enable=0.

 

This is in agreement with the the modelling reference language manual for PHX v. 1.3 p. 43ff, where it states:

 

6 f(enable=1) = c(0.01, 0.1, 5)

Line 6 is like line 4, but the fixed effect f is enabled within an estimation run. This

is used in covariate effect modeling procedures. Enabling the fixed effect means

that it is estimated. The enable value is 1 if it is enabled and 0 (zero) if it is disabled

and not estimated.

After a model is fit, the statement on line 6 can be rewritten as

f(enable=0) = c(0.01, 0.1, 5)

to set the enable value to zero and disable the fixed effect estimation.

 

In the modelling reference language manual for PHX v. 1.4 p. 41ff, it now states:

 

6 f(enable=c(1)) = c(0.01, 0.1, 5)

Line 6 is like line 4, but the fixed effect f is enabled within an estimation run. This

is used in covariate effect modeling procedures. Enabling the fixed effect means

that it is estimated. If a fixed effect is disabled, that means its value is frozen to

0.0 and it is not estimated. There is a command-line argument, /xe, that determines

which variables are chosen to be disabled. If there is no such argument, all

fixed effects having an enable clause are disabled.

 

 

It seems that now there is syntax change, so that the assignment should be =c(1) for enabling. Would it be =c(0) for disabling?  It doesnt seem to work, however, since my script - running i v. 13 - is not running properly now. The fixed effects are still being estimted, though enable=c(0).

 

Also, the part in the manual text highliged in bold seems unclear, hence:

 

-“if a fixed effect is disabled” -  does this mean "if enable=c(0) is stated for that fixed effect"?

-what is this /xe argument, and where do I see it /check if its there

-"If there is no such argument, all fixed effects having an enable clause are

disabled". What does this mean - that just the word enable will trigger diablement?

 

In short, how do I get the enable functionality as it was in version 1.3. Ie. so can build the compete "shell" and easily turn on of off the fixed effect I want to test but setting enable to 1 or 0, w/o having to comment out the effect out entirely and set to 0.

 

I did get an answer from Bendt, but I did not understand it, alas (sorry, Berndt!).

 

Thank you in advance !


Edited by Thomas Klitgaard, 10 July 2015 - 08:53 AM.


#2 Ana Henry

Ana Henry

    Advanced Member

  • Members
  • PipPipPip
  • 220 posts

Posted 10 July 2015 - 05:28 PM

Hello Thomas,

The use of the enable command can be confusing.  I have gotten some explanation from our experts that I hope is helpful.

 

The main thing to understand is that Phoenix does not enable or disable a fixed effect by putting (enable=1) or (enable=0) on the fixed effect.

 

Fixed effects are enabled or disabled at run time by a command-line argument, not by editing the model file.

 

Just to make things complicated, there are two styles for this, old-style, and new-style.

The reason for putting in the new-style was to allow more than 32 covariate effects.

The reason for keeping the old-style was for backward compatibility.

Here's how they work:

 

old-style:

Every covariate effect, such as "effect on V of BW" has a corresponding fixed effect, such as "dVdBW", which in any run can be enabled or disabled.

There could be only up to 32 covariate effects because each covariate effect is represented by a bit in a 32-bit word.

That way, any 32-bit word could enable or disable any combination of them.

When the engine is run, there is a command-line argument, such as "/e 5", which would mean "enable bits 4 and 1, disable all others".

What the "enable" clause does is specify which bit the particular covariate effect refers to, so if the covariate effects were

                fixef( dVdBW(enable = 1) = c (, 1, ) )

                fixef( dVdAge(enable = 2) = c (, 1, ) )

                fixef( dCldBW(enable = 4) = c (, 1, ) )

                fixef( dCldAge(enable = 8) = c (, 1, ) )

The command-line argument "/e 5" enables dVdBW and dCldBW.

In this way, covariate search can be done by re--running the exact same model, just enabling different combinations of covariate effects on each run.

 

new-style:

The problem with the old-style is some people want to search more than 32 covariate effects, but we only had 32 bits.

So there is a new syntax, where instead of specifying a bit-number, we specify a simple positive integer number. It looks like this:

                fixef( dVdBW(enable = c(1)) = c (, 1, ) )

                fixef( dVdAge(enable = c(2)) = c (, 1, ) )

                fixef( dCldBW(enable = c(3)) = c (, 1, ) )

                fixef( dCldAge(enable = c(4)) = c (, 1, ) )

and the command-line argument is not "/e 5", it is "/xe 1_3" to enable the same two covariate effects as above.

The argument is changed from "/e" to "/xe", and the number following it is changed to a string of numbers separated by underscore characters "_".

That way, you can say "/xe  9_12_3_329_56789_2"

If you don't want to enable any of the covariate effects, you just say "/xe _" (put a single underscore - no numbers).

See the difference? Now there is no limit to the number of covariate effects you can have.

(If you have a lot of them, things can seriously bog down, but there's effectively no limit on how many you can have.)

It is necessary to put "c(..)" around the number, so the model translator can tell if it is old-style or new-style.

 

I hope this helps to clear up the confusion.



#3 Thomas Klitgaard

Thomas Klitgaard

    Member

  • Members
  • PipPip
  • 10 posts

Posted 14 July 2015 - 08:10 AM

Ana Henry, on 10 Jul 2015 - 7:28 PM, said:

Hello Thomas,

The use of the enable command can be confusing.  I have gotten some explanation from our experts that I hope is helpful.

The main thing to understand is that Phoenix does not enable or disable a fixed effect by putting (enable=1) or (enable=0) on the fixed effect.

Fixed effects are enabled or disabled at run time by a command-line argument, not by editing the model file.

Just to make things complicated, there are two styles for this, old-style, and new-style.

The reason for putting in the new-style was to allow more than 32 covariate effects.

The reason for keeping the old-style was for backward compatibility.

Here's how they work:

old-style:

Every covariate effect, such as "effect on V of BW" has a corresponding fixed effect, such as "dVdBW", which in any run can be enabled or disabled.

There could be only up to 32 covariate effects because each covariate effect is represented by a bit in a 32-bit word.

That way, any 32-bit word could enable or disable any combination of them.

When the engine is run, there is a command-line argument, such as "/e 5", which would mean "enable bits 4 and 1, disable all others".

What the "enable" clause does is specify which bit the particular covariate effect refers to, so if the covariate effects were

                fixef( dVdBW(enable = 1) = c (, 1, ) )

                fixef( dVdAge(enable = 2) = c (, 1, ) )

                fixef( dCldBW(enable = 4) = c (, 1, ) )

                fixef( dCldAge(enable = 8) = c (, 1, ) )

The command-line argument "/e 5" enables dVdBW and dCldBW.

In this way, covariate search can be done by re--running the exact same model, just enabling different combinations of covariate effects on each run.

new-style:

The problem with the old-style is some people want to search more than 32 covariate effects, but we only had 32 bits.

So there is a new syntax, where instead of specifying a bit-number, we specify a simple positive integer number. It looks like this:

                fixef( dVdBW(enable = c(1)) = c (, 1, ) )

                fixef( dVdAge(enable = c(2)) = c (, 1, ) )

                fixef( dCldBW(enable = c(3)) = c (, 1, ) )

                fixef( dCldAge(enable = c(4)) = c (, 1, ) )

and the command-line argument is not "/e 5", it is "/xe 1_3" to enable the same two covariate effects as above.

The argument is changed from "/e" to "/xe", and the number following it is changed to a string of numbers separated by underscore characters "_".

That way, you can say "/xe  9_12_3_329_56789_2"

If you don't want to enable any of the covariate effects, you just say "/xe _" (put a single underscore - no numbers).

See the difference? Now there is no limit to the number of covariate effects you can have.

(If you have a lot of them, things can seriously bog down, but there's effectively no limit on how many you can have.)

It is necessary to put "c(..)" around the number, so the model translator can tell if it is old-style or new-style.

I hope this helps to clear up the confusion.

Dear Ana,

 

Thank you for this more extensive explanation of the enable command. I fully get the part re the bit representation (guess / e5 would enable bit 1 and 3), but a few more questions:

 

-What about (manual for NLME 1.3, p. 42) " If there is no such argument, all fixed effects having an enable clause are disabled".

If I'm not running command line, I suppose there would be no /xe command. As I read this sentence, any fixef statment that contain the word "enable" (regardsless of value) is disabled.

 

-What about  (manual for PHX 1.3, p74):

fixef(dCldscr(enable=c(0)) = c(, 1, ))? 0 is not a positive integere - what does this mean?

 

- In the version of NLME(1.2), you precribe the use of enable command as follows (page 43ff):

 

___CITATATION START___

 

6 f(enable=1) = c(0.01, 0.1, 5)

Line 6 is like line 4, but the fixed effect f is enabled within an estimation run. This

is used in covariate effect modeling procedures. Enabling the fixed effect means

that it is estimated. The enable value is 1 if it is enabled and 0 (zero) if it is disabled

and not estimated.

After a model is fit, the statement on line 6 can be rewritten as

f(enable=0) = c(0.01, 0.1, 5)

to set the enable value to zero and disable the fixed effect estimation

 

___CITATATION END___

 

 

I used the command accordingly, in PHX, and it worked. So it seems that this is not only syntax, that changed. You also changed, that you cannot use the command in this way in 1.3, so that now it is used in the command line PML only?

 

Pls. compare the two manuals paragraphs.

 

Best regards,

Thomas






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users