NLSY79 Complex Sample Specification for SAS and Stata

advertisement
March 2014
NLSY79 Complex Sample Specification for SAS and Stata
by Martin C. Seay1 and Robert B. Nielsen2
Replicate weight variables within the National Longitudinal Survey of Youth
(1979) are only available in the geocoded data and are not publically released
(U.S. Census Bureau, n.d.). You may find information about the process of gaining
access to these files here: http://www.bls.gov/nls/geocodeapp.htm
SAS:
proc survey____ data=your_datafile;
*your_secondary_command and your variable(s) or model statement;
strata
R02191.46 ;
* this is the variance strata variable;
cluster
R02191.45 ;
* this is the half sample variable;
weight
_yourwgt_;
* person/family/household weight variable;
run;
Change the proc survey____
for other procedures. For example:
proc surveylogistic data=your_datafile;
*(Taylor series method);
model
DEPENDENT (event='1')= INDEPENDENT;
strata
R02191.46 ;
* this is the variance strata variable;
cluster
R02191.45 ;
* this is the half sample variable;
weight
_yourwgt_;
* person/family/household weight variable;
run;
Stata: (using the estimation of a mean value as our example)
Taylor series linearization method using menus
Sampling unit is R02191.45; Strata is R02191.46.
Sampling weight variable is your regular full sample pweight.
Standard error can be specified as linearized (for Taylor) or other.
Within the procedure, specify “survey data estimation” in SE.
Taylor series linearization method using code
First svyset R02191.45 [pweight=_yourwgt_], strata(R02191.46) vce(linearized)
Then svy: mean _yourvariable_
For further information on the complex sampling design of the NLSY please refer
to U.S. Bureau of Labor Statistics (n.d.).
Reference
U.S. Bureau of Labor Statistics. (n.d.) National Longitudinal Survey of Youth
1979. Using and Understanding the Data: Sample Weights and Clustering
Adjustments. Available:
https://www.nlsinfo.org/content/cohorts/nlsy79/using-and-understanding-thedata/sample-weights-clustering-adjustments/page/0/1.
_______________________
1
Assistant Professor, School of Family Studies and Human Services, 318 Justin Hall, Kansas State
University, Manhattan, KS 66506. Email: mseay@ksu.edu
2
Associate Professor, Department of Financial Planning, Housing, and Consumer Economics, University
of Georgia, 205 Consumer Research Center, Athens, GA 30602. Email: rnielsen@uga.edu
Suggested citation:
Seay, M. C., & Nielsen, R. B. (2014). NLSY79 complex sample specification for SAS and Stata. Technical
note, Department of Housing and Consumer Economics, University of Georgia, Athens, GA.
Download