-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathindex.Rmd
86 lines (60 loc) · 3.79 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title : NHANESApp
# Any way to force line breaks? https://github.com/ramnathv/slidify/issues/135
# Not \n or <br/>
subtitle : A Shiny Web Application Which Provides Easy Access to National Health and Nutrition Examination Survey (NHANES) Data
author : Richard Seiter
framework : io2012 # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
url:
lib: libraries
assets: assets
widgets : [] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
---
## What Is NHANES?
- The [National Health and Nutrition Examination Survey](http://www.cdc.gov/nchs/nhanes/about_nhanes.htm) is a survey conducted in the United States every other year. It estimates health and nutrition information for the US population as a whole based on a weighted sample of about 10,000 people.
- A comprehensive set of data is made publicly available. However, the data can be difficult to download and process.
- One common use of the NHANES data is establishing reference ranges for laboratory blood tests.
- NHANES data is also used in a wide variety of scientific studies.
---
## What Is the Purpose of NHANESApp?
- [NHANESApp](https://rseiter.shinyapps.io/NHANESApp/) is a web application developed using R and deployed using [Shiny](http://www.rstudio.com/products/shiny/).
- NHANESApp provides an easy to use and effective graphical interface to the 1999-2000 NHANES "standard" laboratory blood test data. Two use cases are illustrated.
- Use case 1: Examine laboratory test results for their 5% and 95% quantiles (25%, 50%, and 75% are also shown) in a histogram. These quantiles are typically used for test reference ranges and the histogram gives a perspective on the entire distribution. Notice how the 95% level for serum glucose is close to the cutoff for diabetes.
- Use case 2: Examine scatter plots of one test result versus another. This enables exploration of associations between test results (for example, see if serum calcium and phosphorus levels are related, note the green regression line).
- NHANESApp allows users to interactively select variables to examine.
---
## Laboratory Test Quantiles for Glucose
```{r, echo=F}
NHANES_data_file <- "C:/Users/rseiter/Documents/Education/Coursera - Developing Data Products/Course Project/DevDataProdProject/NHANESApp/NHANES_1999.RData"
load(file = NHANES_data_file)
selectVar <- "Glucose (mg/dL) - LBXSGL"
NHANESVar <- which(NHANES_pulldown_choices == selectVar)
hist(NHANES_data[,NHANESVar], xlab=selectVar, col='lightblue',
main='Histogram with 5%, 25%, 50%, 75%, and 95% quantiles')
quant <- quantile(NHANES_data[,NHANESVar], probs = c(0.05, 0.25, 0.5, 0.75, 0.95),
na.rm=TRUE)
for (i in 1:length(quant)) abline(v=quant[i],col="red")
```
---
## Scatterplot of Serum Calcium and Phosphorus
```{r, echo=F, warning=F}
library(car)
selectVar <- "Calcium, total (mg/dL) - LBXSCA"
NHANESVar <- which(NHANES_pulldown_choices == selectVar)
selectYVar <- "Phosphorus (mg/dL) - LBXSPH"
NHANESYVar <- which(NHANES_pulldown_choices == selectYVar)
scatterplot(NHANES_data[,NHANESVar], NHANES_data[,NHANESYVar], xlab=selectVar,
ylab=selectYVar)
```
<!--
---
## Conclusions
- NHANESApp provides an easy to use and effective interface to the NHANES data for examing test result distributions and associations.
- There are a variety of enhancements that would be helpful:
- Allow specifying axes limits to focus on relevant portions of the distributions.
- Allow specifying subsets (e.g. by age or gender). Clinical reference ranges are often age range or gender specific.
- Allow variable transformations (e.g. log). This can help viewing distributions which are non-normal or have an extremely wide range.
-->