# Inferring Age-Dependent Disease Topic from Diagnosis Data

## Documentation for package ‘AgeTopicModels’ version 0.1.0

- DESCRIPTION file.
- Package NEWS.

## Help Pages

age_imputation | imputing missing age if you can't find some of them The function does two stage imputation: i. if the individual has other age label - use the mean, min, or max of other age labels for the missing ones. ii. if the individual has no age label - use the mean, min, max for all the diagnosis codes iii. if there is no age info available for any of this code, we will impute it as the mean of all age codes in the data
diseasematrix2longdata | Disease matrix reformatting for ATM
disease_info_phecode_icd10 | Disease information linking PheCodes and ICD-10
HES_age_example | Example HES diagnosis ages
HES_icd10_example | Example HES ICD-10 diagnoses
icd2phecode | Mapping the disease code from icd10 to phecode
loading2weights | Mapping individuals to fixed topic loadings.
longdata2diseasematrix | Title
phecode_icd10 | ICD-10 <-> PheCode mapping
phecode_icd10cm | ICD-10-CM <-> PheCode mapping
plot_age_topics | Title plot the topic loadings across age.
plot_lfa_topics | Title plot topic loadings for LFA.
prediction_OR | Title Compute prediction odds ratio for a testing data set using pre-training ATM topic loading. Note only diseases listed in the ds_list will be used. The prediction odds ratio is the odds predicted by ATM versus a naive prediction using disease probability.
short_icd10 | Short labels (at most first for letters/digits) for ICD-10 codes
short_icd10cm | Short labels (at most first for letters/digits) for ICD-10-CM codes
simulate_genetic_disease_from_topic | Simulate genetic-disease-topic structure (step 2)
simulate_topics | Simulate genetic-disease-topic structure (step 1)
SNOMED_ICD10CM | SNOMED <-> ICD-10(-CM) mapping (excerpt)
UKB_349_disease | List of 349 UK Biobank diseases (example)
UKB_HES_10topics | Example topic model output (10 topics, UKB HES)
wrapper_ATM | Run ATM on diagnosis data.
wrapper_LFA | Run LFA on diagnosis data.