11.1 Total cholesterol
UK Biobank measurements range from 0.601 to 15.46 mmol/L. We filter the allowable range to lie between 0.5 and 30.
<- gp_clinical %>%
totchol filter(grepl(totchol_codes, code)) %>%
mutate(totchol = coalesce(as.numeric(value1), as.numeric(value2), as.numeric(value3))) %>%
filter(totchol > 0.5 & totchol < 30) %>%
filter(!(value3 %in% c("MEA001", "mg/mmol", "%", "MEA090", "MEA093",
"MEA099", "MEA110", "MEA142", "MEA156", "mmo",
"mmol", "mmol/d", "mOsm/kg", "mPa/s", "nmol/l",
"U/mL", "umol/L")))
%>% group_by(code, term_description) %>%
totchol summarize(n=n(), mean = mean(totchol, na.rm=T)) %>%
arrange(desc(n)) %>% kable()
ggplot(data=totchol, aes(x=log10(totchol))) + geom_density() + theme_minimal()