install.packages('googleVis') |
library(RJSONIO) |
library(googleVis) |
M <- gvisMotionChart(Smoking, idvar="Disorder", timevar="Age", options=list(state='{\"showTrails\":false};')) |
plot(M) |
cat(M$html$chart, file="tmp.html") #this produces html for pasting into blog |
The table below is taken from Figure 4 of Woloshin et al (2008)
Grey shading means fewer than 1 death per 1000 women. All ratios are >= 0.75 (grey shaded data gave ratios of 1).
Lung | ||||||||||||||
Vascular | Disease | Cancer | Infection | Disease | ||||||||||
Age | Smoking status | Heart | Lung | Breast | Colon | Ovarian | Cervical | All | ||||||
Disease | Stroke | Cancer | Cancer | Cancer | Cancer | Cancer | Pneumonia | Flu | AIDS | COPD | Accidents | Combined | ||
35 | Never smoker | 1 | 1 | 1 | 2 | 14 | ||||||||
Smoker | 1 | 1 | 1 | 1 | 1 | 2 | 14 | |||||||
40 | Never smoker | 1 | 2 | 1 | 1 | 2 | 19 | |||||||
Smoker | 4 | 2 | 4 | 2 | 1 | 1 | 2 | 27 | ||||||
45 | Never smoker | 2 | 1 | 1 | 3 | 1 | 1 | 1 | 2 | 25 | ||||
Smoker | 9 | 3 | 7 | 3 | 1 | 1 | 1 | 1 | 2 | 2 | 45 | |||
50 | Never smoker | 4 | 1 | 1 | 4 | 1 | 1 | 2 | 37 | |||||
Smoker | 13 | 5 | 14 | 4 | 1 | 1 | 1 | 4 | 2 | 69 | ||||
55 | Never smoker | 8 | 2 | 2 | 6 | 2 | 2 | 1 | 1 | 1 | 2 | 55 | ||
Smoker | 20 | 6 | 26 | 5 | 2 | 2 | 1 | 1 | 9 | 2 | 110 | |||
60 | Never smoker | 14 | 4 | 3 | 7 | 3 | 3 | 1 | 1 | 2 | 2 | 84 | ||
Smoker | 31 | 8 | 41 | 6 | 3 | 3 | 1 | 2 | 18 | 2 | 167 | |||
65 | Never smoker | 25 | 7 | 5 | 8 | 5 | 4 | 1 | 2 | 3 | 3 | 131 | ||
Smoker | 45 | 15 | 55 | 7 | 5 | 3 | 1 | 4 | 31 | 3 | 241 | |||
70 | Never smoker | 46 | 14 | 7 | 9 | 7 | 4 | 1 | 4 | 5 | 4 | 207 | ||
Smoker | 66 | 25 | 61 | 8 | 6 | 4 | 1 | 7 | 44 | 4 | 335 | |||
75 | Never smoker | 86 | 30 | 7 | 10 | 10 | 5 | 1 | 8 | 6 | 7 | 335 | ||
Smoker | 99 | 34 | 58 | 10 | 9 | 4 | 14 | 61 | 7 | 463 |
Here is the data (Smoking) based on the table and used by the R code:
Disorder | Age | Type | N_per_1000 | Ratio |
Heart Disease | 2035 | Vascular disease | 1 | 1.000 |
Heart Disease | 2040 | Vascular disease | 4 | 4.000 |
Heart Disease | 2045 | Vascular disease | 9 | 4.500 |
Heart Disease | 2050 | Vascular disease | 13 | 3.250 |
Heart Disease | 2055 | Vascular disease | 20 | 2.500 |
Heart Disease | 2060 | Vascular disease | 31 | 2.214 |
Heart Disease | 2065 | Vascular disease | 45 | 1.800 |
Heart Disease | 2070 | Vascular disease | 66 | 1.435 |
Heart Disease | 2075 | Vascular disease | 99 | 1.151 |
Stroke | 2035 | Vascular disease | 1 | 1.000 |
Stroke | 2040 | Vascular disease | 2 | 1.000 |
Stroke | 2045 | Vascular disease | 3 | 3.000 |
Stroke | 2050 | Vascular disease | 5 | 5.000 |
Stroke | 2055 | Vascular disease | 6 | 3.000 |
Stroke | 2060 | Vascular disease | 8 | 2.000 |
Stroke | 2065 | Vascular disease | 15 | 2.143 |
Stroke | 2070 | Vascular disease | 25 | 1.786 |
Stroke | 2075 | Vascular disease | 34 | 1.133 |
Lung Cancer | 2035 | Cancer | 1 | 1.000 |
Lung Cancer | 2040 | Cancer | 4 | 1.000 |
Lung Cancer | 2045 | Cancer | 7 | 7.000 |
Lung Cancer | 2050 | Cancer | 14 | 14.000 |
Lung Cancer | 2055 | Cancer | 26 | 13.000 |
Lung Cancer | 2060 | Cancer | 41 | 13.667 |
Lung Cancer | 2065 | Cancer | 55 | 11.000 |
Lung Cancer | 2070 | Cancer | 61 | 8.714 |
Lung Cancer | 2075 | Cancer | 58 | 8.286 |
Breast Cancer | 2035 | Cancer | 1 | 1.000 |
Breast Cancer | 2040 | Cancer | 2 | 1.000 |
Breast Cancer | 2045 | Cancer | 3 | 1.000 |
Breast Cancer | 2050 | Cancer | 4 | 1.000 |
Breast Cancer | 2055 | Cancer | 5 | 0.833 |
Breast Cancer | 2060 | Cancer | 6 | 0.857 |
Breast Cancer | 2065 | Cancer | 7 | 0.875 |
Breast Cancer | 2070 | Cancer | 8 | 0.889 |
Breast Cancer | 2075 | Cancer | 10 | 1.000 |
Colon Cancer | 2035 | Cancer | 0 | 1.000 |
Colon Cancer | 2040 | Cancer | 0 | 1.000 |
Colon Cancer | 2045 | Cancer | 1 | 1.000 |
Colon Cancer | 2050 | Cancer | 1 | 1.000 |
Colon Cancer | 2055 | Cancer | 2 | 1.000 |
Colon Cancer | 2060 | Cancer | 3 | 1.000 |
Colon Cancer | 2065 | Cancer | 5 | 1.000 |
Colon Cancer | 2070 | Cancer | 6 | 0.857 |
Colon Cancer | 2075 | Cancer | 9 | 0.900 |
Ovarian Cancer | 2035 | Cancer | 0 | 1.000 |
Ovarian Cancer | 2040 | Cancer | 0 | 1.000 |
Ovarian Cancer | 2045 | Cancer | 1 | 1.000 |
Ovarian Cancer | 2050 | Cancer | 1 | 1.000 |
Ovarian Cancer | 2055 | Cancer | 2 | 1.000 |
Ovarian Cancer | 2060 | Cancer | 3 | 1.000 |
Ovarian Cancer | 2065 | Cancer | 3 | 0.750 |
Ovarian Cancer | 2070 | Cancer | 4 | 1.000 |
Ovarian Cancer | 2075 | Cancer | 4 | 0.800 |
Cervical Cancer | 2035 | Cancer | 0 | 1.000 |
Cervical Cancer | 2040 | Cancer | 0 | 1.000 |
Cervical Cancer | 2045 | Cancer | 0 | 1.000 |
Cervical Cancer | 2050 | Cancer | 0 | 1.000 |
Cervical Cancer | 2055 | Cancer | 1 | 1.000 |
Cervical Cancer | 2060 | Cancer | 1 | 1.000 |
Cervical Cancer | 2065 | Cancer | 1 | 1.000 |
Cervical Cancer | 2070 | Cancer | 1 | 1.000 |
Cervical Cancer | 2075 | Cancer | 0 | 1.000 |
Pneumonia | 2035 | Infection | 0 | 1.000 |
Pneumonia | 2040 | Infection | 0 | 1.000 |
Pneumonia | 2045 | Infection | 1 | 1.000 |
Pneumonia | 2050 | Infection | 1 | 1.000 |
Pneumonia | 2055 | Infection | 1 | 1.000 |
Pneumonia | 2060 | Infection | 2 | 2.000 |
Pneumonia | 2065 | Infection | 4 | 2.000 |
Pneumonia | 2070 | Infection | 7 | 1.750 |
Pneumonia | 2075 | Infection | 14 | 1.750 |
AIDS | 2035 | Infection | 1 | 1.000 |
AIDS | 2040 | Infection | 1 | 1.000 |
AIDS | 2045 | Infection | 1 | 1.000 |
AIDS | 2050 | Infection | 0 | 1.000 |
AIDS | 2055 | Infection | 0 | 1.000 |
AIDS | 2060 | Infection | 0 | 1.000 |
AIDS | 2065 | Infection | 0 | 1.000 |
AIDS | 2070 | Infection | 0 | 1.000 |
AIDS | 2075 | Infection | 0 | 1.000 |
COPD | 2035 | Lung disease | 0 | 1.000 |
COPD | 2040 | Lung disease | 1 | 1.000 |
COPD | 2045 | Lung disease | 2 | 1.000 |
COPD | 2050 | Lung disease | 4 | 1.000 |
COPD | 2055 | Lung disease | 9 | 9.000 |
COPD | 2060 | Lung disease | 18 | 9.000 |
COPD | 2065 | Lung disease | 31 | 10.333 |
COPD | 2070 | Lung disease | 44 | 8.800 |
COPD | 2075 | Lung disease | 61 | 10.167 |
Accidents | 2035 | Accidents | 2 | 1.000 |
Accidents | 2040 | Accidents | 2 | 1.000 |
Accidents | 2045 | Accidents | 2 | 1.000 |
Accidents | 2050 | Accidents | 2 | 1.000 |
Accidents | 2055 | Accidents | 2 | 1.000 |
Accidents | 2060 | Accidents | 2 | 1.000 |
Accidents | 2065 | Accidents | 3 | 1.000 |
Accidents | 2070 | Accidents | 4 | 1.000 |
Accidents | 2075 | Accidents | 7 | 1.000 |
No comments:
Post a Comment