Closed omair-a-khan closed 5 years ago
bump @liud4
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.
Old functions: total_score, proportion_non_missing (where are these functions saved?)
New functions: totscore, totscore.impute
@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?
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
Dandan, can you please double check derive_cognitive_complaint.R. If it is okay, please comment and close this issue.
@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