milanwiedemann / suddengains

An R package for identifying sudden gains in longitudinal data
https://milanwiedemann.github.io/suddengains/
Other
7 stars 0 forks source link

add option to NOT use 3rd criterion #8

Closed milanwiedemann closed 5 years ago

milanwiedemann commented 5 years ago

this is already possible for the first sg_crit1_cutoff = 0 and second criterion sg_crit2_cutoff = 0 but not for the third criterion. in code this could look like this: sg_crit3_cutoff = NULL. to unify the code NULL could also be added to the sg_crit2_cutoff and sg_crit2_cutoff arguments.

milanwiedemann commented 5 years ago

graham: use sg_crit1_cutoff, sg_crit2_pct, and sg_crit3 with TRUE and FALSE for 3rd crit, or "adjusted", NULL ...

milanwiedemann commented 5 years ago

done, testing now. for sg_crit1_cutoff and sg_crit2_pct = NULL will unselect it for sg_crit3 use FALSE, return NAs in the details dataframe and exclude it from multiplying when calculating the final sg variables.