# During study time, the SDMT was performed in a non-standardised way until around 2015-02-18, only giving subjects 60 seconds. # Some filled assessments were marked and were all manually evaluated for correction. # A decision was reached to multiply old results by a factor of 1.5 assuming a proportional increase in completed fields. sdmt_time<-openxlsx::read.xlsx("/Volumes/Data/source/tid.sdmt.xlsx") |> tidyr::pivot_longer(cols = c(tid.1md, tid.6md)) |> mutate(deltager=as.character(deltager)) sdmt_time$name <- as.double(as.character(factor(sdmt_time$name,labels = c("2","4")))) # Setting cut date sdmt_cut<-as.Date("2015-02-18") # Joining datasets to have date of visit sdmt_corr <- left_join(ls_nas$sdmt,sdmt_time |> mutate(name=as.character(name)), by = c("rnumb"="deltager","instance"="name")) # Modyfying old correction table to be complete sdmt_corr$value <- if_else(sdmt_corr$talos_sdmt00