Code from: Risk of dementia and related neurocognitive disorders among autistic and non-autistic older adults: role of established risk factors
Data files
Mar 30, 2026 version files 268.78 KB
-
1._Data_Cleaning_Part_1.sas
38.33 KB
-
2._Data_Cleaning_Part_2.sas
57.31 KB
-
3._Table_1.sas
6.66 KB
-
4._Time_varying_covariate_analysis.sas
115.97 KB
-
5._Forest_plot.sas
3.02 KB
-
Data_Dictionary.csv
6.81 KB
-
Data_Dictionary.docx
25.78 KB
-
README.md
4.42 KB
-
READme.txt
4.14 KB
-
Table_1_-_medians__means__freqs.sas
6.34 KB
Abstract
Background: Neurocognitive disorders (i.e. dementia) are a leading cause of cognitive decline and loss of independence among older adults. While reported rates are higher among autistic adults, it is unclear whether this disparity persists after accounting for known risk factors.
Objective: We compared neurocognitive disorder risk between autistic and non-autistic older adults after adjusting for known risk factors and evaluated whether risk factors moderated this disparity. We replicated our analyses among subsets of autistic older adults with and without co-occurring intellectual disability (ID).
Design: Retrospective longitudinal cohort study.
Setting: National Medicare Standard Analytical Files (2013-21).
Participants: The sample included 9201 autistic and 18 356 non-autistic older adults aged 65 or older, who were matched on demographic and clinical characteristics.
Methods: Our dependent variable was time to neurocognitive disorder, defined as years between age 65 or older and the date of first diagnosis.
Results: Autistic older adults had a 20% higher adjusted risk of neurocognitive disorders than non-autistic older adults (95% CI = 14%-25%; P < .001). Risk was highest among autistic adults with co-occurring ID [adjusted subhazard ratio (SHR) = 1.46; 95% CI = 1.36-1.57]. The disparity between cohorts was amplified in the presence of most known risk factors, notably hypertension (SHR = 2.04; 95% CI = 1.79-2.32), high cholesterol (SHR = 1.60; 95% CI = 1.46-1.75), depression (SHR = 1.52; 95% CI = 1.42-1.62), and type 2 diabetes (SHR = 1.45; 95% CI = 1.36-1.55).
Conclusions: Autistic older adults, particularly those with ID, face significantly higher risk of neurocognitive disorders even after adjusting for known risk factors. These findings emphasize that risk factors may impact the autistic population differently and highlight the need for early screening and tailored prevention strategies.
Dataset DOI: 10.5061/dryad.3j9kd51zv
Description of the data and file structure
--------------------------------------------------------------------------------
PROJECT OVERVIEW
--------------------------------------------------------------------------------
This project uses Medicare claims data (Parts A & B) to compare dementia risk between autistic vs. non-autistic older adults after controlling for dementia risk factors.
Key components:
- Data Cleaning: Prepares raw Medicare claims data for analysis.
- Table Generation: Produces descriptive and outcome tables for matched and unmatched cohorts.
- Matched Cohort Analysis: Uses propensity-score matching (1 autistic : ~2 non-autistic ratio).
- Unmatched Cohort Analysis: Uses the full sample without matching.
NOTE: This project uses restricted Medicare data that require CMS Data Use Agreement (DUA) approval. The datasets cannot be shared publicly.
--------------------------------------------------------------------------------
TOOLS AND DEPENDENCIES
--------------------------------------------------------------------------------
- Language: SAS v9.4
- Required Access: Secure server with Medicare Parts A & B claims files
- Matching Method: Variable-ratio propensity score matching
- Required SAS Macros: Ensure "Table 1 - medians, means, freqs.sas" is saved in the working directory before running table generation scripts.
--------------------------------------------------------------------------------
PROJECT STRUCTURE
--------------------------------------------------------------------------------
project_root
├── data_cleaning
│ ├── 1. Data Cleaning Part 1.sas
│ ├── 2. Data Cleaning Part 2.sas
├── table_generation
│ ├── Proc Table 1 Macro.sas
│ ├── 3. Table 1.sas
├── analysis
│ ├── 4. Time varying covariate analysis.sas
│ ├── 5. Forest plot.sas
├── docs
│ ├── Data Dictionary.docx, Data_Dictionary.csv
│ ├── READme.txt
--------------------------------------------------------------------------------
FILE DESCRIPTIONS
--------------------------------------------------------------------------------
- 1._Data_Cleaning_Part_1.sas: Cleans and prepares raw Medicare data (step 1)
- 2._Data_Cleaning_Part_2.sas: Finalizes analytic cohort (step 2)
- Table_1_-_medians__means__freqs.sas: Macro to produce descriptive statistics
- 3._Table_1.sas: Generates descriptive statistics for matched cohort
- 4._Time_varying_covariate_analysis.sas: Restructures data and runs models for TVC analysis
- 5._Forest_plot.sas: Generates log-scaled forest plot of odds ratios
- Data_Dictionary.docx, Data_Dictionary.csv: Variable names and definitions
- READme.txt: Project overview and instructions
--------------------------------------------------------------------------------
HOW TO RUN
--------------------------------------------------------------------------------
/* Step 1: Data Cleaning */
Run the file "1. Data Cleaning Part 1.sas"
Run the file "2. Data Cleaning Part 2.sas"
/* Step 2: Table Generation */
Run the file"3. Table 1.sas"
/* Step 3: Analysis */
Run the file "4. Time varying covariate analysis.sas"
Run the file "5. Forest plot.sas"
--------------------------------------------------------------------------------
DATA USE DISCLAIMER
--------------------------------------------------------------------------------
Medicare data are protected under CMS Data Use Agreements. This repository does NOT include raw data. Users must obtain appropriate DUA approval to access Medicare claims.
--------------------------------------------------------------------------------
CITATION
--------------------------------------------------------------------------------
If you use this project or scripts, please cite:
Nikahd, M., Hyer, M., Wolf, B., Patterson, B., Bishop, L., & Hand, B. (2026). Risk of dementia and related neurocognitive disorders among autistic and non-autistic older adults: role of established risk factors. Age and ageing, 55(2), afag015. https://doi.org/10.1093/ageing/afag015. PMID: 41638232
