1: Comparing age among boys with and without food assistance

a: Correcting for clustered/stratified sampling and survey weights

use "NHANES0708_all.dta"

svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
svy, subpop(if subpop2==1 & male==1): mean ridageyr,over(food_any)coeflegend
svy, subpop(if subpop2==1 & male==1): mean ridageyr,over(food_any)

test _b[c.ridageyr@0bn.food_any] =_b[c.ridageyr@1.food_any]
      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 =          677
                                Subpop. size    =   12,094,827
                                Design df       =           16

------------------------------------------------------------------------------
             |       Mean  Legend
-------------+----------------------------------------------------------------
  c.ridageyr@|
    food_any |
          0  |   9.704803  _b[c.ridageyr@0bn.food_any]
          1  |   10.09739  _b[c.ridageyr@1.food_any]
------------------------------------------------------------------------------

(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 =          677
                                       Subpop. size    =   12,094,827
                                       Design df       =           16

---------------------------------------------------------------------
                    |             Linearized
                    |       Mean   Std. Err.     [95% Conf. Interval]
--------------------+------------------------------------------------
c.ridageyr@food_any |
                 0  |   9.704803   .5548951      8.528478    10.88113
                 1  |   10.09739   .2952791       9.47143    10.72336
---------------------------------------------------------------------


Adjusted Wald test

 ( 1)  c.ridageyr@0bn.food_any - c.ridageyr@1.food_any = 0

       F(  1,    16) =    0.55
            Prob > F =    0.4707

b: Correcting for clustered/stratified sampling, but not survey weights

use "NHANES0708_all.dta"

svyset sdmvpsu, strata(sdmvstra)
svy,subpop(if subpop2==1 & male==1): mean ridageyr,over(food_any)

test _b[c.ridageyr@0bn.food_any] =_b[c.ridageyr@1.food_any]
      pweight: <none>
          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 =     10,149
                                         Subpop. no. obs =        677
                                         Subpop. size    =        677
                                         Design df       =         16

---------------------------------------------------------------------
                    |             Linearized
                    |       Mean   Std. Err.     [95% Conf. Interval]
--------------------+------------------------------------------------
c.ridageyr@food_any |
                 0  |   9.455357   .4741716      8.450158    10.46056
                 1  |   9.576991   .2267987      9.096199    10.05778
---------------------------------------------------------------------


Adjusted Wald test

 ( 1)  c.ridageyr@0bn.food_any - c.ridageyr@1.food_any = 0

       F(  1,    16) =    0.08
            Prob > F =    0.7806

c: Ignoring survey sampling

use "NHANES0708_all.dta"

svyset

ttest ridageyr if subpop2==1 & male==1,by(food_any)
no survey characteristics are set


Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       0 |     112    9.455357    .4252126    4.500027     8.61277    10.29794
       1 |     565    9.576991    .1595503    3.792467    9.263606    9.890376
---------+--------------------------------------------------------------------
combined |     677    9.556869    .1504646    3.914973    9.261434    9.852303
---------+--------------------------------------------------------------------
    diff |            -.121634     .405212               -.9172616    .6739936
------------------------------------------------------------------------------
    diff = mean(0) - mean(1)                                      t =  -0.3002
Ho: diff = 0                                     degrees of freedom =      675

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.3821         Pr(|T| > |t|) = 0.7641          Pr(T > t) = 0.6179

2: Comparing race/ethnicity among boys with and without food assistance

a: Correcting for clustered/stratified sampling and survey weights

use "NHANES0708_all.dta"

svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
svy, subpop(if subpop2==1 & male==1): ta race_eth food_any,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   =          677
                                              Subpop. size      =   12,094,827
                                              Design df         =           16

-------------------------------
RECODE of |
ridreth1  |
(Race/Eth |
nicity -  |      food_any      
Recode)   |     0      1  Total
----------+--------------------
 White-NH | 70.88  42.17  49.12
 Black-NH |  3.83  19.39  15.62
   Mex Am | 12.43  24.55  21.62
      Oth | 12.86  13.89  13.64
          | 
    Total |   100    100    100
-------------------------------
  Key:  column percentage

  Pearson:
    Uncorrected   chi2(3)         =  729.2291
    Design-based  F(2.34, 37.50)  =    7.9025     P = 0.0008

b: Correcting for clustered/stratified sampling, but not survey weights

use "NHANES0708_all.dta"

svyset sdmvpsu, strata(sdmvstra)
svy, subpop(if subpop2==1 & male==1): ta race_eth food_any,col percent
      pweight: <none>
          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   =     10,149
                                                Subpop. no. obs   =        677
                                                Subpop. size      =        677
                                                Design df         =         16

-------------------------------
RECODE of |
ridreth1  |
(Race/Eth |
nicity -  |      food_any      
Recode)   |     0      1  Total
----------+--------------------
 White-NH | 48.21   24.6  28.51
 Black-NH | 8.929  25.49  22.75
   Mex Am | 25.89  32.92  31.76
      Oth | 16.96  16.99  16.99
          | 
    Total |   100    100    100
-------------------------------
  Key:  column percentage

  Pearson:
    Uncorrected   chi2(3)         =  464.7301
    Design-based  F(2.67, 42.75)  =    5.4865     P = 0.0038

c: Ignoring survey sampling

use "NHANES0708_all.dta"

svyset

ta race_eth food_any if subpop2==1 & male==0,col chi2
no survey characteristics are set


+-------------------+
| Key               |
|-------------------|
|     frequency     |
| column percentage |
+-------------------+

 RECODE of |
  ridreth1 |
(Race/Ethn |
   icity - |       food_any
   Recode) |         0          1 |     Total
-----------+----------------------+----------
  White-NH |        36        127 |       163 
           |     41.86      22.76 |     25.31 
-----------+----------------------+----------
  Black-NH |        21        153 |       174 
           |     24.42      27.42 |     27.02 
-----------+----------------------+----------
    Mex Am |        20        172 |       192 
           |     23.26      30.82 |     29.81 
-----------+----------------------+----------
       Oth |         9        106 |       115 
           |     10.47      19.00 |     17.86 
-----------+----------------------+----------
     Total |        86        558 |       644 
           |    100.00     100.00 |    100.00 

          Pearson chi2(3) =  15.4581   Pr = 0.001

3: Exporting data

use "NHANES0708_all.dta"

svyset sdmvpsu [pw=wtmec2yr], strata(sdmvstra)
tabout race_eth food_any if subpop2==1 & male==1 using "Tabout.csv", c(col) f(2) svy replace
tabout food_any if subpop2==1 & male==1 using "Tabout.csv", c(mean ridageyr se) f(2) sort sum svy append
      pweight: wtmec2yr
          VCE: linearized
  Single unit: missing
     Strata 1: sdmvstra
         SU 1: sdmvpsu
        FPC 1: <zero>

Survey results being calculated
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
.......
Table output written to: Tabout.csv

        food_any                
RECODE of ridreth1 (Race/Ethnicity - Recode)    0       1       Total
        Prop.   Prop.   Prop.
White-NH        0.71    0.42    0.49
Black-NH        0.04    0.19    0.16
Mex Am  0.12    0.25    0.22
Oth     0.13    0.14    0.14
Total   1.00    1.00    1.00

Survey results being calculated
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..........
Table output written to: Tabout.csv

        food_any                
RECODE of ridreth1 (Race/Ethnicity - Recode)    0       1       Total
        Prop.   Prop.   Prop.
White-NH        0.71    0.42    0.49
Black-NH        0.04    0.19    0.16
Mex Am  0.12    0.25    0.22
Oth     0.13    0.14    0.14
Total   1.00    1.00    1.00

food_any        Mean    SE
0       9.70    (0.55)
1       10.10   (0.30)
Total   10.00   (0.30)

4: Replicate Table 1, Boys

a: Counts are unweighted (practice using the tabout command to generate weighted column percentages with one line of code) b: Report mean ± SE (the “mean ± SD” label is incorrect in the paper) (practice using the tabout command to generate weighted means ± se for continuous variables) c: Discrepancies of counts of overweight & Obese There are minor discrepancies of the counts of overweight and obese, and for the percent with private insurance compared to the data reported in the Kohn article.

use "NHANES0708_all.dta"

tabout age_3cat race_eth bmicat food_any if subpop2==1 & male==1 using "T1.csv", c(freq col) f(0 1) replace
Table output written to: T1.csv

        food_any                                        
        0       0       1       1       Total   Total
        No.     %       No.     %       No.     %
RECODE of ridageyr (Age at Screening Adjudicated - Recode)                     
>                          
4 to 7  49      43.8    192     34.0    241     35.6
8 to 11 24      21.4    192     34.0    216     31.9
12 to 17        39      34.8    181     32.0    220     32.5
Total   112     100.0   565     100.0   677     100.0

RECODE of ridreth1 (Race/Ethnicity - Recode)                                   
>          
White-NH        54      48.2    139     24.6    193     28.5
Black-NH        10      8.9     144     25.5    154     22.7
Mex Am  29      25.9    186     32.9    215     31.8
Oth     19      17.0    96      17.0    115     17.0
Total   112     100.0   565     100.0   677     100.0

bmicat                                          
Normal wt       75      67.0    357     63.2    432     63.8
Overweight      17      15.2    111     19.6    128     18.9
Obese   20      17.9    97      17.2    117     17.3
Total   112     100.0   565     100.0   677     100.0