/
riskfactors.Rd
186 lines (175 loc) · 8.53 KB
/
riskfactors.Rd
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-riskfactors.R
\docType{data}
\name{riskfactors}
\alias{riskfactors}
\title{The Behavioral Risk Factor Surveillance System (BRFSS) Survey
Data, 2009.}
\format{An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 245 rows and 34 columns.}
\source{
\url{https://www.cdc.gov/brfss/annual_data/annual_2009.htm}
}
\usage{
data(riskfactors)
}
\description{
The data is a subset of the 2009 survey from BRFSS, an ongoing data
collection program designed to measure behavioral risk factors for the
adult population (18 years of age or older) living in households.
}
\examples{
# explore the missingness with vis_miss
library(naniar)
vis_miss(riskfactors)
# Look at the missingness in the variables
miss_var_summary(riskfactors)
# and now as a plot
gg_miss_var(riskfactors)
# Look at the missingness in bmi and poor health
library(ggplot2)
p <-
ggplot(riskfactors,
aes(x = health_poor,
y = bmi)) +
geom_miss_point()
p
# for each sex?
p + facet_wrap(~sex)
# for each education bracket?
p + facet_wrap(~education)
}
\seealso{
the codebook:
\url{https://www.cdc.gov/brfss/annual_data/annual_2009.htm}
Format: a data frame with 245 observations on the following 34
variables.
\describe{
\item{\code{state}}{A factor with 52 levels. The labels and states
corresponding to the labels are as follows: 1:Alabama, 2:Alaska, 4:Arizona,
5:Arkansas, 6:California,8:Colorado, 9:Connecticut, 10:Delaware, 11:District
of Columbia,12:Florida, 13:Georgia, 15:Hawaii, 16:Idaho, 1
:Illinois,18:Indiana, 19:Iowa, 20:Kansas, 21:Kentucky, 22:Louisiana,23:Maine,
24:Maryland, 25:Massachusetts, 26:Michigan,27:Minnesota, 28:Mississippi,
2:Missouri, 30:Montana,31:Nebraska, 32:Nevada, 33:New Hampshire, 34:New
Jersey, 35:NewMexico, 36:New York, 37:North Carolina, 38:North Dakota,
39:Ohio,40:Oklahoma, 41:Oregon, 42:Pennsylvania, 44:Rhode Island,
45:SouthCarolina, 46:South Dakota, 47:Tennessee, 48:Texas, 49:Utah,
50:Vermont, 51:Virginia, 53:Washington, 54:West Virginia,55:Wisconsin,
56:Wyoming, 66:Guam, 72:Puerto Rico, 78:Virgin Islands}
\item{\code{sex}}{A factor with levels \code{Male} \code{Female}.}
\item{\code{age}}{A numeric vector from 7 to 97.}
\item{\code{weight_lbs}}{The weight without shoes in pounds.}
\item{\code{height_inch}}{The weight without shoes in inches.}
\item{\code{bmi}}{Body Mass Index (BMI). Computed by weight in Kilogram
/(height in Meters * height in Meters). Missing if any of weight or
height is missing.}
\item{\code{marital}}{A factor with levels \code{Married} \code{Divorced}
\code{Widowed} \code{Separated} \code{NeverMarried} \code{UnmarriedCouple}.}
\item{\code{pregnant}}{Whether pregnant now with two levels \code{Yes} and
\code{No}.}
\item{\code{children}}{A numeric vector giving the number of children less
than 18 years of age in household.}
\item{\code{education}}{A factor with the education levels \code{1}
\code{2} \code{3} \code{4} \code{5} \code{6} as 1: Never attended
school or only kindergarten; 2: Grades 1 through 8 (Elementary);
3: Grades 9 through 11 (Some high school); 4: Grade 12 or GED
(High school graduate); 5: College 1 year to 3 years (Some college
or technical school); 6: College 4 years or more (College
graduate).}
\item{\code{employment}}{A factor showing the employment status with levels
\code{1} \code{2} \code{3} \code{4} \code{5} \code{7} \code{8}. The labels
mean -- 1: Employed for wages; 2: Self-employed; 3: Out of work for more
than 1 year; 4: Out of work for less that 1 year; 5: A homemaker; 6: A
student; 7:Retired; 8: Unable to work.}
\item{\code{income}}{The annual household income from all sources with
levels \verb{<10k} \verb{10-15k} \verb{15-20k} \verb{20-25k} \verb{25-35k}
\verb{35-50k} \verb{50-75k} \verb{>75k} \code{Dontknow} \code{Refused}.}
\item{\code{veteran}}{A factor with levels \code{1} \code{2} \code{3}
\code{4} \code{5}. The question for this variable is: Have you ever
served on active duty in the United States Armed Forces, either in the
regular military or in a National Guard or military reserve unit? Active
duty does not include training for the Reserves or National Guard, but
DOES include activation, for example, for the Persian Gulf War. And the
labels are meaning: 1: Yes, now on active duty; 2: Yes, on active duty
during the last 12 months, but not now; 3: Yes, on active duty in the
past, but not during the last 12 months; 4: No, training for Reserves or
National Guard only; 5: No, never served in the military.}
\item{\code{hispanic}}{A factor with levels \code{Yes} \code{No}
corresponding to the question: are you Hispanic or Latino?}
\item{\code{health_general}}{Answer to question "in general your health is"
with levels \code{Excellent} \code{VeryGood} \code{Good} \code{Fair}
\code{Poor} \code{Refused}.}
\item{\code{health_physical}}{The number of days during the last 30 days
that the respondent's physical health was not good. -7 is for "Don't
know/Not sure", and -9 is for "Refused".}
\item{\code{health_mental}}{The number of days during the last 30 days
that the respondent's mental health was not good. -7 is for
"Don't know/Not sure", and -9 is for "Refused".}
\item{\code{health_poor}}{The number of days during the last 30 days
that poor physical or mental health keep the respondent from doing
usual activities, such as self-care, work, or recreation. -7 is
for "Don't know/Not sure", and -9 is for "Refused".}
\item{\code{health_cover}}{Whether having any kind of health care
coverage, including health insurance, prepaid plans such as HMOs,
or government plans such as Medicare. The answer has two levels:
\code{Yes} and \code{No}.}
\item{\code{provide_care}}{Whether providing any such care or assistance
to a friend or family member during the past month, with levels \code{Yes}
and \code{No}.}
\item{\code{activity_limited}}{ Whether being limited in any way in any
activities because of physical, mental, or emotional problems,
with levels \code{Yes} and \code{No}.}
\item{\code{drink_any}}{Whether having had at least one drink of
any alcoholic beverage such as beer, wine, a malt beverage or
liquor during the past 30 days, with levels \code{Yes} and
\code{No}.}
\item{\code{drink_days}}{The number of days during the past 30 days that
the respondent had at least one drink of any alcoholic beverage. -7 is
for "Don't know/Not sure", and -9 is for "Refused".}
\item{\code{drink_avg}}{The number of drinks on the average the respondent
had on the days when he/she drank, during the past 30 days. -7 is for
"Don't know/Not sure", and -9 is for "Refused".}
\item{\code{smoke_100}}{ Whether having smoked at least
100 cigarettes in the entire life, with levels \code{Yes} and
\code{No}.}
\item{\code{smoke_days}}{ The frequency of days now
smoking, with levels \code{Everyday} \code{Somedays} and
\code{NotAtAll}(not at all).}
\item{\code{smoke_stop}}{Whether
having stopped smoking for one day or longer during the past 12
months because the respondent was trying to quit smoking, with
levels \code{Yes} and \code{No}.}
\item{\code{smoke_last}}{A factor
with levels \code{3} \code{4} \code{5} \code{6} \code{7} \code{8}
corresponding to the question: how long has it been since last
smoking cigarettes regularly? The labels mean: 3: Within the past
6 months (3 months but less than 6 months ago); 4: Within the past
year (6 months but less than 1 year ago); 5: Within the past 5
years (1 year but less than 5 years ago); 6: Within the past 10
years (5 years but less than 10 years ago); 7: 10 years or more;
8: Never smoked regularly.}
\item{\code{diet_fruit}}{The number of
fruit the respondent eat every year, not counting juice. -7 is for
"Don't know/Not sure", and -9 is for "Refused".}
\item{\code{diet_salad}}{The number of servings of green salad the
respondent eat every year. -7 is for "Don't know/Not sure",
and -9 is for "Refused".}
\item{\code{diet_potato}}{ The number of
servings of potatoes, not including french fries, fried potatoes,
or potato chips, that the respondent eat every year. -7 is for
"Don't know/Not sure", and -9 is for "Refused".}
\item{\code{diet_carrot}}{The number of carrots the respondent eat
every year. -7 is for "Don't know/Not sure", and -9 is for
"Refused".}
\item{\code{diet_vegetable}}{The number of servings of
vegetables the respondent eat every year, not counting carrots,
potatoes, or salad. -7 is for "Don't know/Not sure", and -9 is
for "Refused".}
\item{\code{diet_juice}}{The number of fruit juices
such as orange, grapefruit, or tomato that the respondent drink
every year. -7 is for "Don't know/Not sure", and -9 is for
"Refused".}
}
library(MissingDataGUI) (named brfss)
}
\keyword{datasets}