Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change detection of eta type variables #112

Open
MikeKSmith opened this issue Sep 4, 2018 · 7 comments
Open

Change detection of eta type variables #112

MikeKSmith opened this issue Sep 4, 2018 · 7 comments
Milestone

Comments

@MikeKSmith
Copy link

In read_nm_tables.R function index_table the variable detection for type eta is
stringr::str_detect(.$col, 'ETA\d+|ET\d+') ~ 'eta',

Consider changing to
stringr::str_detect(.$col, '^ETA|^ET') ~ 'eta'

to allow detection of ETA parameters by name e.g.
ETA_CL, ETA_V etc.

@bguiastr
Copy link
Collaborator

bguiastr commented Sep 5, 2018

Thanks for the suggestion.
My initial thoughts were to be rather strict to avoid false positive such as THETA. In that sense I think it is good that you added the regex '^', I just make one suggestion, could you please change '^ET' to '^ET\d+'?

This would however bring a problem to the eta_distrib() and eta_qq() plots due to use of a post-processing function to make the labels look nicer and in the right order. We will need to have an if statement in these functions checking that if not all 'eta' type variable match the 'ETA\d+|ET\d+' the post-processing function should be removed.

@jeslo328
Copy link

Hi Ben

I used this package - and it was easy to be maneuver as well adjustable. (fantastic job Ben)
So how would one change the "eta" to its respective names.
Will i be able to compile all the diagnostic plot in 1 as in old xpose (where we would be able to do with basic.gof(xpdb))

Thank you
Jesmin

@billdenney
Copy link
Contributor

I just had the same issue as @MikeKSmith with my ETAs named: ETA(KA), ETA(CL), ETA(V1), ETA(Q2), ETA(V2), ETA(Q3), ETA(V3)

@bguiastr
Copy link
Collaborator

@jeslo328 I guess an easy way to rename your panels would be through the labeller function:

xpdb_ex_pk %>% 
eta_distrib(xpdb = xpdb_ex_pk,
            labeller = labeller(variable = c('ETA(1)' = 'ETA CL',
                                             'ETA(2)' = 'ETA Vc',
                                             'ETA(3)' = 'ETA Ka')))

example

@bguiastr
Copy link
Collaborator

@MikeKSmith and @billdenney I had not realized that so many modelers were using specific ETA names. I can see the value for this in the plot and that it need to be implemented in the next version of xpose.

FYI the current code was developed to make use of $TABLE ETAS(1:LAST) in NONMEM which I find useful as you never forget an ETA value. I would also like for xpose to be able to make use of the phi file if no $TABLE are available... with a .source

@billdenney
Copy link
Contributor

billdenney commented Sep 12, 2018

@guiastrennec, I have moved to almost always using THETA and ETA naming so that I don't have to remember what the numbers of the parameters are. And, I made a suggestion to Bob Bauer a few weeks ago that will make them even more usable and useful; in the next version of NONMEM, you will be able to specify something like the following (syntax may be slightly different)

$THETA
CL=(0, 1, 5)

which will expand to

$THETA
(0, 1, 5)
$ABBR REPLACE THETA(CL)=THETA(1)

The same format will be available for $OMEGA and $SIGMA.

After that is available, I doubt that I will ever use numbers again.

@bguiastr
Copy link
Collaborator

Thanks for letting me know about this, it is very interesting!

@bguiastr bguiastr added this to the xpose 0.5 milestone Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants