Closed liud4 closed 4 years ago
@liud4 In addition to cdr_boxes, are there any other variables in the eligibility data that should be numeric? We are manually setting the following to be character:
cdr = as.character(as.numeric(cdr))
cdr_boxes = as.character(as.numeric(cdr_boxes))
cdr_mem = as.character(as.numeric(cdr_mem))
cdr_orient = as.character(as.numeric(cdr_orient))
cdr_judg = as.character(as.numeric(cdr_judg))
cdr_affairs = as.character(as.numeric(cdr_affairs))
cdr_hobbies = as.character(as.numeric(cdr_hobbies))
cdr_care = as.character(as.numeric(cdr_care))
As per our phone call today, I will update process_eligibilty.R
to use process_factor_variables.R
. This should correct the values for the CDR substituents to have levels 0, 0.5, 1, 2, and 3.
The following cdr variables from the eligibility database should have factor version. But I did not see it in the merged dataset: cdr, cdr_mem, cdr_orient, cdr_judg, cdr_affairs, cdr_hobbies, cdr_care. For example, I saw cdr.elig in the merged dataset, but not cdr.factor.elig.
In addition, cdr_boxes in the eligibility database (named cdr.boxes.elig in the merged dataset) should be a numeric variable instead of a character variable.
https://github.com/liud4/rVMAP/blob/8f722d8362e7e7e3b8aeffd842c18f9e9a88a663/R/process_eligibility.R#L45-L52