#****************************************************************** #Scale ID: CESD-8 #Scale Name: Centre for Epidemiological Studies Depression Scale (8-item) #TILDA Variable: MHcesd_capi_sf #Dataset: TILDA Waves 2-7 #Author: #Institution: The Irish Longitudinal Study on Ageing (TILDA), #Description: #Creates the CES-D 8-item depression score from CAPI responses. #Items are scored 0-3 and summed to produce a total score ranging #from 0-24. Positive affect items are reverse scored. #Citation: #Briggs, R., Carey, D., O'Halloran, A.M., Kenny, R.A. and Kennelly, #S.P. (2018). Validation of the 8-item CES-D scale in TILDA. #Version: 1.0 #Date: 2026-06-01 #Language: Stata ******************************************************************/ # Create AMT score: 1 point for each correct answer data$AMTscore <- rowSums( data[paste0("mt", sprintf("%03d", 1:10))] == 1, na.rm = TRUE ) # Set score to missing if AMT was missing by design data$AMTscore[!is.na(data$mt001) & data$mt001 == -1] <- NA_real_ # Variable label attr(data$AMTscore, "label") <- "AMT Score (0-10)"