data(NHANES)
male
or female
0-9
, 10-19
, ... 70+
8thGrade
, 9-11thGrade
, HighSchool
, SomeCollege
, or CollegeGrad
.Married
, Widowed
, Divorced
, Separated
, NeverMarried
, or LivePartner
(living with partner).0 - 4999
, 5000 - 9,999
,
10000 - 14999
, 15000 - 19999
, 20000 - 24,999
,
25000 - 34999
, 35000 - 44999
, 45000 - 54999
, 55000 - 64999
, 65000 - 74999
,
75000 - 99999
, or 100000 or More
.HHIncome
derived from the middle income in each categoryHome
, Rent
, or Other
indicating whether
the home of study participant or someone in their family is owned, rented or occupied
by some other arrangement.UnderWeight
(BMI < 5th percentile)
NormWeight
(BMI 5th to < 85th percentile),
OverWeight
(BMI 85th to < 95th percentile),
Obese
(BMI >= 95th percentile).12.0_18.4
, 18.5_24.9
, 25.0_29.9
, or 30.0_plus
.Yes
or No
.Excellent
, Vgood
, Good
, Fair
, or Poor
.None
, Several
, Majority
(more than half the days),
or AlmostAll
.None
, Several
, Majority
(more than half the days),
or AlmostAll
."Yes"
.
If the urine pregnancy results were negative and the respondent stated that they
were not pregnant, the respondent was coded as "No"
If the urine pregnancy
results were negative and the respondent did not know her pregnancy status,
the respondent was coded "unknown"
Persons who were interviewed,
but not examined also have a value of "unknown"
. In addition
there are missing values.
Yes
or No
.0_to_1hr
, 1_hr
, 2_hr
, 3_hr
, 4_hr
, More_4_hr
.
Not available 2009-2010.0_hrs
, 0_to_1hr
, 1_hr
, 2_hr
, 3_hr
, 4_hr
, More_4_hr
.
Not available 2009-2010.Yes
or No
, provieded they
answered Yes to having somked 100 or more cigarettes in their life time. All subjects who
have not smoked 100 or more cigarettes are listed as NA
here.Yes
or No
.Yes
or No
.AgeFirstMarij
Age participant first tried marijuana. Reported for participants aged 18 to 59 years.
Yes
or No
.Yes
or No
.Yes
or No
.Yes
or No
.Heterosexual
, Homosexual
, Bisexual
.NHANES
and NHANESraw
each include 75 variables available for the 2009-2010 and 2011-2012 sample years.
NHANESraw
has 20,293 observations of these variables plus four additional
variables that describe that sample weighting scheme employed.
NHANES
contains 10,000 rows of data resampled from
NHANESraw
to undo these oversampling effects.
NHANES
can be treated, for educational purposes,
as if it were a simple random sample from the American population.
A list of the variables in the data set follows appears below along with variable descriptions and links to the original NHANES documentation.
# Due to the sampling design, some races were over/under-sampled.
rbind(
NHANES = table(NHANES$Race1) / nrow(NHANES),
NHANESraw = table(NHANESraw$Race1) / nrow(NHANESraw),
diff = (table(NHANES$Race1) - table(NHANESraw$Race1)) / nrow(NHANESraw)
)
# SmokeNow is only asked of people who answer Yes to Smoke100
if (require(mosaic)) {
nhanes <-
NHANES %>%
mutate(
SmokingStatus = derivedFactor(
Current = SmokeNow == "Yes",
Former = SmokeNow == "No",
Never = Smoke100 == "No"
)
)
tally( ~SmokingStatus, data = nhanes )
}
Run the code above in your browser using DataLab