Closed tomaszaba closed 1 week ago
@tomaszaba this is fantastic! I like it.
Following are minor comments:
looking that the wrangle stuff and because you really like that, it makes more sense to use wrangle with the age function also. I don't like it, but you like it and that is what is important. and I think most people will understand it.
for the functions that you want to collapse into one, I am a bit worried about that but I can see where you are coming from. What I would like to suggest is that the functions used for the one function should also be exported so that users can have a choice of potentially using those primitives rather than the one big function
Related to the one big function for prevalence, I need to see the implementation of this to fully get on board. My main worry is about code maintenance. But I can be persuaded.
Please go ahead with these. They are fantastic!
Please use a new branch from dev
for your re-factor process.
@tomaszaba this is fantastic! I like it.
Following are minor comments:
looking that the wrangle stuff and because you really like that, it makes more sense to use wrangle with the age function also. I don't like it, but you like it and that is what is important. and I think most people will understand it.
for the functions that you want to collapse into one, I am a bit worried about that but I can see where you are coming from. What I would like to suggest is that the functions used for the one function should also be exported so that users can have a choice of potentially using those primitives rather than the one big function
Related to the one big function for prevalence, I need to see the implementation of this to fully get on board. My main worry is about code maintenance. But I can be persuaded.
Please go ahead with these. They are fantastic!
Please use a new branch from
dev
for your re-factor process.
Thanks for the feedback, Ernest. All well noted. I'm confident that I will persuade you on this one very easily 😅.
@ernestguevarra, here is my suggestion on how we can tidy up
mwana
's package index:Package index
Built-in datasets
anthro.01
anthro.02
anthro.03
anthro.04
Wrangle data
mw_wrangle_muac()
mw_wrangle_wfhz()
mw_process_age()
- this one uses a different verb because we agreed not to use the verb to wrangle for age.Recode variables
mw_recode_muac()
Statistical tests
mw_stattest_ageratio()
Check IPC AMN sample size requirements
mw_check_ipc_sample_size()
ormw_check_ipc_ssreq()
Check Plausibility
mw_plausibility_check_mfaz()
ormw_check_plausibility_mfaz()
mw_plausibility_check_wfhz()
ormw_check_plausibility_wfhz()
mw_plausibility_check_muac()
ormw_check_plausibility_muac()
Neat output tables
mw_neat_output_table()
On this one for now we have three functions for each plausibility. I am thinking about refactoring this into a single function that user can control with an argument
.for = c("wfhz", "mfaz", "muac")
. What do you think?For this, currently we have four functions that estimated wasting prevalence based on
wfhz
,mfaz
,muac
andcombined
. The arguments to pass to each function are the same. Last night I thought about wrapping all this in just one function that can be controlled by the argument.based_on
. The pseudocode is something as:In this way, the exported function for prevalence estimation would just be the above.
What do you think about this and about the suggested package index.