liud4 / rVMAP

Data Management code for VMAC-MAP study
Other
3 stars 0 forks source link

removing deprecated cognitive complaint derivation #8

Closed omair-a-khan closed 5 years ago

omair-a-khan commented 5 years ago

@liud4 : Yesterday as we were walking back from Light Hall you mentioned that there were some outdated cognitive complaint variables. Can you please let me know what to exclude? The most recent update is here: https://github.com/liud4/rVMAP/blob/post-version-1.0/R/derive_cognitive_complaint.R

omair-a-khan commented 5 years ago

bump @liud4

liud4 commented 5 years ago

Please remove code related to gifford and gifford25, i.e. line 244-289. I would also like to consolidate the old functions and the new functions below because they are essentially the same.

omair-a-khan commented 5 years ago

@liud4 , total_score(), average_score(), and proportion_non_missing() are the new functions whereas totscore() is the old function (see https://github.com/liud4/rVMAP/blob/post-version-1.0/R/total_average_score.R and https://github.com/liud4/rVMAP/blob/post-version-1.0/R/proportion_non_missing.R). I have deleted totscore() as it is equivalent to the newer total_score() (and it is not ever called, actually), but It seems as though totscore.impute() returns the mean-imputed vector but actually does not compute a total score. This is different from total_score() and average_score().

The derivation is actually really confusing and I don't understand it at all. For the sake of readability, can you please rewrite the code to not use confusing or non-descriptive function names like VTM(), rescale(), and rescale2() as well as avoiding confusing or non-descriptive variable names such as junk and junk.rescaled?

liud4 commented 5 years ago

Omair,

I updated the code with correctly reverse coded SCD items, and the Gifford45 bank. I have not changed any functions of VTM(), rescale() and rescale2() which are related to Gifford45 total calculation derivation.

Dandan

omair-a-khan commented 5 years ago

Dandan, can you please double check derive_cognitive_complaint.R. If it is okay, please comment and close this issue.