Stata output for EXEMPLAR 4

 

pweight is est_wt

strata is strata

 

. svyprop eo

 

------------------------------------------------------------------------------

pweight:  est_wt                                Number of obs      =      2184

Strata:   strata                                Number of strata   =        66

PSU:      <observations>                        Number of PSUs     =      2184

                                                Population size    = 2159.0837

------------------------------------------------------------------------------

 

Survey proportions estimation

 

  +------------------------------------+

  | eo    Obs   Est. Prop.   Std. Err. |

  |------------------------------------|

  |  0    412     0.324695    0.018071 |

  |  1   1772     0.675305    0.018071 |

  +------------------------------------+

 

. /*--------------------------------------------------------------

> now weighted table of proportions woth EOP by size of workplace

> ------------------------------------------------------------*/

. svytab eo nempsize, column

 

pweight:  est_wt                                Number of obs      =      2184

Strata:   strata                                Number of strata   =        66

PSU:      <observations>                        Number of PSUs     =      2184

                                                Population size    = 2159.0837

 

-------------------------------------------------------------------------

equal     |

opps      |

policy    |

recoded   |                           nemp size                         

to 0 1    |     1      2      3      4      5      6      7      8  Total

----------+--------------------------------------------------------------

        0 | .3627   .343  .2934  .1847  .1294  .1126  .0196  .0227  .3247

        1 | .6373   .657  .7066  .8153  .8706  .8874  .9804  .9773  .6753

          |

    Total |     1      1      1      1      1      1      1      1      1

-------------------------------------------------------------------------

  Key:  column proportions

 

  Pearson:

    Uncorrected   chi2(7)         =   44.5838

    Design-based  F(2.33, 4945.51)=    6.6138     P = 0.0007

 


. /*--------------------------------------------------------------

> now unweighted linear models to get effect of factors on EOP

> ------------------------------------------------------------*/

. svyset [pweight=const]

pweight is const

strata is strata

 

. svyregress female eo

 

Survey linear regression

 

pweight:  const                                   Number of obs    =      2169

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2169

                                                  Population size  =      2169

                                                  F(   1,   2103)  =     57.87

                                                  Prob > F         =    0.0000

                                                  R-squared        =    0.0232

 

------------------------------------------------------------------------------

      female |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |   11.12066   1.461883     7.61   0.000     8.253773    13.98755

       _cons |   40.65796   1.278403    31.80   0.000     38.15089    43.16503

------------------------------------------------------------------------------

 

. svyregress disab eo

 

Survey linear regression

 

pweight:  const                                   Number of obs    =      2074

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2074

                                                  Population size  =      2074

                                                  F(   1,   2008)  =      4.29

                                                  Prob > F         =    0.0385

                                                  R-squared        =    0.0010

 

------------------------------------------------------------------------------

       disab |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |   .2120406   .1023986     2.07   0.039     .0112221    .4128592

       _cons |   .7256245   .0757176     9.58   0.000     .5771312    .8741178

------------------------------------------------------------------------------

 


. svyregress ethnic eo

 

Survey linear regression

 

pweight:  const                                   Number of obs    =      2063

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2063

                                                  Population size  =      2063

                                                  F(   1,   1997)  =     17.52

                                                  Prob > F         =    0.0000

                                                  R-squared        =    0.0062

 

------------------------------------------------------------------------------

      ethnic |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |   2.104745   .5027954     4.19   0.000     1.118686    3.090803

       _cons |   3.190257   .4276565     7.46   0.000     2.351557    4.028956

------------------------------------------------------------------------------

 

. /*--------------------------------------------------------------

> now weighted linear models

> ------------------------------------------------------------*/

. svyset [pweight=est_wt]

pweight is est_wt

strata is strata

 

. svyregress female eo

 

Survey linear regression

 

pweight:  est_wt                                  Number of obs    =      2169

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2169

                                                  Population size  = 2153.8422

                                                  F(   1,   2103)  =     37.86

                                                  Prob > F         =    0.0000

                                                  R-squared        =    0.0704

 

------------------------------------------------------------------------------

      female |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |   17.63143   2.865355     6.15   0.000      12.0122    23.25065

       _cons |   42.40965   2.474206    17.14   0.000     37.55751     47.2618

------------------------------------------------------------------------------

 


. svyregress disab eo

 

Survey linear regression

 

pweight:  est_wt                                  Number of obs    =      2074

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2074

                                                  Population size  = 2131.5835

                                                  F(   1,   2008)  =      0.22

                                                  Prob > F         =    0.6424

                                                  R-squared        =    0.0004

 

------------------------------------------------------------------------------

       disab |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |   .1026639   .2210432     0.46   0.642    -.3308341    .5361618

       _cons |   .7534789   .1829337     4.12   0.000     .3947191    1.112239

------------------------------------------------------------------------------

 

. svyregress ethnic eo

 

Survey linear regression

 

pweight:  est_wt                                  Number of obs    =      2063

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2063

                                                  Population size  = 2126.2916

                                                  F(   1,   1997)  =     14.14

                                                  Prob > F         =    0.0002

                                                  R-squared        =    0.0166

 

------------------------------------------------------------------------------

      ethnic |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

          eo |    2.74197     .72911     3.76   0.000     1.312074    4.171866

       _cons |   2.373978   .4754587     4.99   0.000     1.441531    3.306425

------------------------------------------------------------------------------

 


. /*--------------------------------------------------------------

> now unweighted multivariate logistic models

> ------------------------------------------------------------*/

. svyset [pweight=const]

pweight is const

strata is strata

 

. svylogit eo female disab ethnic

 

Survey logistic regression

 

pweight:  const                                   Number of obs    =      2024

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2024

                                                  Population size  =      2024

                                                  F(   3,   1956)  =     21.89

                                                  Prob > F         =    0.0000

 

------------------------------------------------------------------------------

          eo |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

      female |   .0139578   .0019384     7.20   0.000     .0101562    .0177593

       disab |    .032551   .0316652     1.03   0.304      -.02955    .0946519

      ethnic |   .0245636   .0097939     2.51   0.012      .005356    .0437713

       _cons |   .6657324   .1027319     6.48   0.000     .4642571    .8672078

------------------------------------------------------------------------------

 

. /*--------------------------------------------------------------

> now weighted multivariate logistic models

> ------------------------------------------------------------*/

. svyset [pweight=est_wt]

pweight is est_wt

strata is strata

 

. svylogit eo female disab ethnic

 

Survey logistic regression

 

pweight:  est_wt                                  Number of obs    =      2024

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2024

                                                  Population size  = 2119.4079

                                                  F(   3,   1956)  =     13.83

                                                  Prob > F         =    0.0000

 

------------------------------------------------------------------------------

          eo |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

      female |   .0190382   .0032781     5.81   0.000     .0126093    .0254671

       disab |  -.0047271   .0358489    -0.13   0.895    -.0750331    .0655789

      ethnic |   .0372057   .0143067     2.60   0.009     .0091477    .0652637

       _cons |  -.3738791   .1798482    -2.08   0.038     -.726593   -.0211651

------------------------------------------------------------------------------

 


. /*--------------------------------------------------------------

> now unweighted multivariate logistic model with NEMPSIZE

> need to use xi: to code up dummy variables then run analyses

> ------------------------------------------------------------*/

. svyset [pweight=const]

pweight is const

strata is strata

 

. xi: svylogit eo female disab ethnic i.nempsize

i.nempsize        _Inempsize_1-8      (naturally coded; _Inempsize_1 omitted)

note: _Inempsize_7 != 0 predicts success perfectly

      _Inempsize_7 dropped and 55 obs not used

 

note: _Inempsize_8 != 0 predicts success perfectly

      _Inempsize_8 dropped and 29 obs not used

 

 

Survey logistic regression

 

pweight:  const                                   Number of obs    =      1940

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      1940

                                                  Population size  =      1940

                                                  F(   8,   1867)  =     19.28

                                                  Prob > F         =    0.0000

 

------------------------------------------------------------------------------

          eo |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

      female |   .0176531   .0020094     8.79   0.000     .0137121     .021594

       disab |    .019558    .021002     0.93   0.352    -.0216319    .0607478

      ethnic |   .0170366   .0088342     1.93   0.054    -.0002892    .0343625

_Inempsize_2 |   .1417863    .179564     0.79   0.430    -.2103801    .4939528

_Inempsize_3 |    .585323   .1878167     3.12   0.002      .216971    .9536749

_Inempsize_4 |   1.155253   .2091719     5.52   0.000     .7450186    1.565487

_Inempsize_5 |   1.668426   .2202926     7.57   0.000     1.236381     2.10047

_Inempsize_6 |   1.415234   .2846374     4.97   0.000     .8569947    1.973474

       _cons |  -.2367999   .1762974    -1.34   0.179    -.5825597    .1089599

------------------------------------------------------------------------------

 


. /*--------------------------------------------------------------

> same thing weighted

> ------------------------------------------------------------*/

. svyset [pweight=est_wt]

pweight is est_wt

strata is strata

 

. xi: svylogit eo female disab ethnic i.nempsize

i.nempsize        _Inempsize_1-8      (naturally coded; _Inempsize_1 omitted)

note: _Inempsize_7 != 0 predicts success perfectly

      _Inempsize_7 dropped and 55 obs not used

 

note: _Inempsize_8 != 0 predicts success perfectly

      _Inempsize_8 dropped and 29 obs not used

 

 

Survey logistic regression

 

pweight:  est_wt                                  Number of obs    =      1940

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      1940

                                                  Population size  = 2111.6086

                                                  F(   8,   1867)  =     12.51

                                                  Prob > F         =    0.0000

 

------------------------------------------------------------------------------

          eo |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

      female |   .0209044   .0033645     6.21   0.000     .0143058    .0275031

       disab |  -.0116614     .03635    -0.32   0.748    -.0829521    .0596293

      ethnic |     .03552   .0139514     2.55   0.011      .008158    .0628819

_Inempsize_2 |   .1070193   .2177569     0.49   0.623    -.3200522    .5340909

_Inempsize_3 |   .5146863   .2121884     2.43   0.015      .098536    .9308367

_Inempsize_4 |   1.161438   .2323457     5.00   0.000     .7057545    1.617121

_Inempsize_5 |   1.671919   .2585829     6.47   0.000     1.164779     2.17906

_Inempsize_6 |   1.709645   .3174224     5.39   0.000     1.087106    2.332184

       _cons |  -.6780242   .2313491    -2.93   0.003    -1.131753   -.2242953

------------------------------------------------------------------------------

 


. /*--------------------------------------------------------------

> now mean of eo and by size group allowing for finite population

> correction

> Stata requires two things to get the finite population correct

> 1. A variable with either the sampling farction or the number of PSUs in the

    stratum

> 2. Weights that add to the population size

> ------------------------------------------------------------*/

. svyset [pweight=est_wt], strata(strata) clear(fpc)

pweight is est_wt

strata is strata

 

. svymean eo ,deff deft

 

Survey mean estimation

 

pweight:  est_wt                                  Number of obs    =      2184

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2184

                                                  Population size  = 2159.0837

 

------------------------------------------------------------------------------

    Mean |   Estimate    Std. Err.       Deff        Deft

---------+--------------------------------------------------------------------

      eo |    .675305    .0180714    3.251329    1.803144

------------------------------------------------------------------------------

 

. gen gweight=199952/2191

 

. svyset [pweight=gweight] ,fpc(sampfrac) strata(strata)

pweight is gweight

strata is strata

fpc is sampfrac

 

. svymean eo, deff deft

 

Survey mean estimation

 

pweight:  gweight                                 Number of obs    =      2184

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2184

FPC:      sampfrac                                Population size  = 199313.18

 

------------------------------------------------------------------------------

    Mean |   Estimate    Std. Err.       Deff        Deft

---------+--------------------------------------------------------------------

      eo |   .8113553    .0076138    .8359598    .9092853

------------------------------------------------------------------------------

Finite population correction (FPC) assumes simple random sampling without

replacement of PSUs within each stratum with no subsampling within PSUs.

Weights must represent population totals for deff to be correct when

using an FPC.  Note: deft is invariant to the scale of weights.

 

/*--------------------------------------------------------------------

bit that follows illustrates the different definitions of the design effect for subgroups

----------------------------------------------------------------------------*/


. svymean eo,  deff deft by(nempsize)

 

Survey mean estimation

 

pweight:  gweight                                 Number of obs    =      2184

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2184

FPC:      sampfrac                                Population size  = 199313.18

 

------------------------------------------------------------------------------

Mean   Subpop. |   Estimate    Std. Err.       Deff        Deft

---------------+--------------------------------------------------------------

eo             |

   nempsize==1 |   .6911197     .027551    .9307145    .9594353

   nempsize==2 |   .7171717    .0218021    .9378447    .9631034

   nempsize==3 |    .774359    .0202909    .9287394    .9584167

   nempsize==4 |   .8501292    .0175549    .9460063     .967285

   nempsize==5 |   .8903509    .0140018     .925454      .95672

   nempsize==6 |   .8852459    .0216589    .8540405     .919066

   nempsize==7 |   .9722222    .0173717    .8130946    .8967636

   nempsize==8 |   .9756098     .022264     .863143    .9239507

------------------------------------------------------------------------------

Finite population correction (FPC) assumes simple random sampling without

replacement of PSUs within each stratum with no subsampling within PSUs.

Weights must represent population totals for deff to be correct when

using an FPC.  Note: deft is invariant to the scale of weights.

 

. svymean eo,  deff deft by(nempsize)srssubpop

 

Survey mean estimation

 

pweight:  gweight                                 Number of obs    =      2184

Strata:   strata                                  Number of strata =        66

PSU:      <observations>                          Number of PSUs   =      2184

FPC:      sampfrac                                Population size  = 199313.18

 

------------------------------------------------------------------------------

Mean   Subpop. |   Estimate    Std. Err.       Deff        Deft

---------------+--------------------------------------------------------------

eo             |

   nempsize==1 |   .6911197     .027551    .9275457    .9578006

   nempsize==2 |   .7171717    .0218021     .935905    .9621069

   nempsize==3 |    .774359    .0202909    .9267824    .9574064

   nempsize==4 |   .8501292    .0175549     .943994    .9662557

   nempsize==5 |   .8903509    .0140018    .9238475    .9558893

   nempsize==6 |   .8852459    .0216589    .8497627    .9167613

   nempsize==7 |   .9722222    .0173717    .8021689    .8907183

   nempsize==8 |   .9756098     .022264    .8424765    .9128225

------------------------------------------------------------------------------

Finite population correction (FPC) assumes simple random sampling without

replacement of PSUs within each stratum with no subsampling within PSUs.

Weights must represent population totals for deff to be correct when

using an FPC.  Note: deft is invariant to the scale of weights.

 

.

.

.

end of do-file

 

.