First, conduct descriptive analysis (a and b), then crude regression analysis (c).
a: Cross-tabulate high waist circumference with categorical independent variables (exposure and covariates)
Test these associations for each variable using the Design-based F test (survey analysis equivalent to the chi-square test for independence).
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): ta food_any wccata,col percent
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): ta race_eth wccata,col percent
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): ta hinsur wccata,col percent
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): ta pr_age wccata,col percent
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
(running tabulate on estimation sample)
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
-------------------------------
| wccata
food_any | 0 1 Total
----------+--------------------
0 | 32.34 20.55 30.2
1 | 67.66 79.45 69.8
|
Total | 100 100 100
-------------------------------
Key: column percentage
Pearson:
Uncorrected chi2(1) = 99.3496
Design-based F(1, 16) = 2.9122 P = 0.1072
(running tabulate on estimation sample)
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
-------------------------------
RECODE of |
ridreth1 |
(Race/Eth |
nicity - | wccata
Recode) | 0 1 Total
----------+--------------------
White-NH | 52.3 53.95 52.6
Black-NH | 18.43 5.747 16.13
Mex Am | 17.74 29.71 19.91
Oth | 11.53 10.59 11.36
|
Total | 100 100 100
-------------------------------
Key: column percentage
Pearson:
Uncorrected chi2(3) = 260.4437
Design-based F(2.65, 42.45) = 3.9544 P = 0.0175
(running tabulate on estimation sample)
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
-------------------------------
| wccata
hinsur | 0 1 Total
----------+--------------------
0 | 25.93 20.27 24.9
1 | 55.11 56.98 55.45
2 | 18.96 22.76 19.65
|
Total | 100 100 100
-------------------------------
Key: column percentage
Pearson:
Uncorrected chi2(2) = 31.3658
Design-based F(1.93, 30.87) = 0.3659 P = 0.6891
(running tabulate on estimation sample)
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
-------------------------------
RECODE of |
dmdhrage |
(HH Ref |
Person | wccata
Age) | 0 1 Total
----------+--------------------
0 | 37.3 38.42 37.5
1 | 21.07 9.96 19.06
2 | 41.63 51.62 43.44
|
Total | 100 100 100
-------------------------------
Key: column percentage
Pearson:
Uncorrected chi2(2) = 132.5719
Design-based F(1.83, 29.30) = 1.8265 P = 0.1811
b: Calculate mean values of continuous independent variables (covariates) within each category of high waist circumference, among food secure boys.
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): mean ridageyr,over(wccata)coeflegend
svy, subpop(if subpop2==1 & male==1 & foodinsec==0): mean ridageyr,over(wccata)
test _b[c.ridageyr@0bn.wccata] =_b[c.ridageyr@1.wccata]
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
------------------------------------------------------------------------------
| Mean Legend
-------------+----------------------------------------------------------------
c.ridageyr@|
wccata |
0 | 9.352032 _b[c.ridageyr@0bn.wccata]
1 | 10.62444 _b[c.ridageyr@1.wccata]
------------------------------------------------------------------------------
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
-------------------------------------------------------------------
| Linearized
| Mean Std. Err. [95% Conf. Interval]
------------------+------------------------------------------------
c.ridageyr@wccata |
0 | 9.352032 .3012292 8.713455 9.99061
1 | 10.62444 .5600746 9.437139 11.81175
-------------------------------------------------------------------
Adjusted Wald test
( 1) c.ridageyr@0bn.wccata - c.ridageyr@1.wccata = 0
F( 1, 16) = 4.29
Prob > F = 0.0549
c: Using simple logistic regression models, calculate the crude odds ratios (OR) for the associations between each independent variable and waist circumference among food secure boys.
Descriptive analysis provides information about the absolute prevalence or means of characteristics among participants with and without the outcome. Calculation of crude odds ratios is also an important first step to regression analysis and provides initial ORs as you build your multivariable models. For this exercise, include child age as a linear term. We will work with this variable more in Exercise E9.
Food Assistance
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.food_any
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.food_any,or
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
i.food_any _Ifood_any_0-1 (naturally coded; _Ifood_any_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 1, 16) = 2.85
Prob > F = 0.1107
------------------------------------------------------------------------------
| Linearized
wccata | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ifood_any_1 | .6142502 .3638321 1.69 0.111 -.1570394 1.38554
_cons | -1.961632 .3808709 -5.15 0.000 -2.769042 -1.154222
------------------------------------------------------------------------------
i.food_any _Ifood_any_0-1 (naturally coded; _Ifood_any_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 1, 16) = 2.85
Prob > F = 0.1107
------------------------------------------------------------------------------
| Linearized
wccata | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ifood_any_1 | 1.84827 .67246 1.69 0.111 .8546704 3.996983
_cons | .1406287 .0535614 -5.15 0.000 .0627221 .3153029
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Race/Ethnicity
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.race_eth
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.race_eth,or
#xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logistic wccata i.race_eth
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
i.race_eth _Irace_eth_1-4 (naturally coded; _Irace_eth_1 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 3, 14) = 4.60
Prob > F = 0.0193
------------------------------------------------------------------------------
| Linearized
wccata | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irace_eth_2 | -1.196125 .4327867 -2.76 0.014 -2.113592 -.2786579
_Irace_eth_3 | .4845906 .312049 1.55 0.140 -.1769237 1.146105
_Irace_eth_4 | -.1160506 .4295402 -0.27 0.790 -1.026635 .7945338
_cons | -1.477006 .2580373 -5.72 0.000 -2.024021 -.9299918
------------------------------------------------------------------------------
i.race_eth _Irace_eth_1-4 (naturally coded; _Irace_eth_1 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 3, 14) = 4.60
Prob > F = 0.0193
------------------------------------------------------------------------------
| Linearized
wccata | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irace_eth_2 | .3023637 .130859 -2.76 0.014 .1208033 .7567987
_Irace_eth_3 | 1.62351 .5066148 1.55 0.140 .8378437 3.145916
_Irace_eth_4 | .8904302 .3824755 -0.27 0.790 .3582103 2.213409
_cons | .2283202 .0589151 -5.72 0.000 .1321231 .3945569
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Unknown #command
Health Insurance (hinsur)
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.hinsur
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.hinsur,or
#xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logistic wccata i.hinsur
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
i.hinsur _Ihinsur_0-2 (naturally coded; _Ihinsur_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 2, 15) = 0.40
Prob > F = 0.6769
------------------------------------------------------------------------------
| Linearized
wccata | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ihinsur_1 | .2795074 .3948765 0.71 0.489 -.5575933 1.116608
_Ihinsur_2 | .4288281 .4975491 0.86 0.401 -.625929 1.483585
_cons | -1.75432 .2856827 -6.14 0.000 -2.359941 -1.1487
------------------------------------------------------------------------------
i.hinsur _Ihinsur_0-2 (naturally coded; _Ihinsur_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 2, 15) = 0.40
Prob > F = 0.6769
------------------------------------------------------------------------------
| Linearized
wccata | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ihinsur_1 | 1.322478 .5222155 0.71 0.489 .5725855 3.054476
_Ihinsur_2 | 1.535457 .7639653 0.86 0.401 .5347644 4.408723
_cons | .1730248 .0494302 -6.14 0.000 .0944258 .3170487
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Unknown #command
Primary Respondant Age Category (pr_age)
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.pr_age
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata i.pr_age,or
#xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logistic wccata i.pr_age
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
i.pr_age _Ipr_age_0-2 (naturally coded; _Ipr_age_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 2, 15) = 2.34
Prob > F = 0.1306
------------------------------------------------------------------------------
| Linearized
wccata | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ipr_age_1 | -.7789516 .5110973 -1.52 0.147 -1.86243 .3045263
_Ipr_age_2 | .1851521 .3738566 0.50 0.627 -.6073885 .9776927
_cons | -1.478291 .3198481 -4.62 0.000 -2.156339 -.8002432
------------------------------------------------------------------------------
i.pr_age _Ipr_age_0-2 (naturally coded; _Ipr_age_0 omitted)
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 2, 15) = 2.34
Prob > F = 0.1306
------------------------------------------------------------------------------
| Linearized
wccata | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Ipr_age_1 | .4588868 .2345358 -1.52 0.147 .1552949 1.355982
_Ipr_age_2 | 1.203401 .4498996 0.50 0.627 .5447717 2.658316
_cons | .2280271 .072934 -4.62 0.000 .1157481 .4492197
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Unknown #command
Age
use "NHANES0708_all.dta"
svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata ridageyr
xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logit wccata ridageyr,or
#xi: svy,subpop(if subpop2==1 & male==1 & foodinsec==0): logistic wccata ridageyr
pweight: wtmec2yr
VCE: linearized
Single unit: missing
Strata 1: sdmvstra
SU 1: sdmvpsu
FPC 1: <zero>
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 1, 16) = 4.81
Prob > F = 0.0434
------------------------------------------------------------------------------
| Linearized
wccata | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ridageyr | .0816693 .0372445 2.19 0.043 .0027145 .1606241
_cons | -2.323536 .3852478 -6.03 0.000 -3.140225 -1.506847
------------------------------------------------------------------------------
(running logit on estimation sample)
Survey: Logistic regression
Number of strata = 16 Number of obs = 10,149
Number of PSUs = 32 Population size = 297,136,095
Subpop. no. obs = 439
Subpop. size = 8,131,107.05
Design df = 16
F( 1, 16) = 4.81
Prob > F = 0.0434
------------------------------------------------------------------------------
| Linearized
wccata | Odds Ratio Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
ridageyr | 1.085097 .0404139 2.19 0.043 1.002718 1.174243
_cons | .0979267 .0377261 -6.03 0.000 .0432731 .2216076
------------------------------------------------------------------------------
Note: _cons estimates baseline odds.
Unknown #command