{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


statasu - Stata Survey...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Stata Survey Statistics [stata_survey_stats_commands] See UCLA/ATS, Stat 130 Class Notes, “Survey Sampling” for an introduction with , which is the principal source of the following notes. Commands changed in Stata-8. Stata survey-statistics format commands . svydescribe . svyset, clear . svyset [pw=weightvar], stata(stratvar) psu(psuvar) [last term is name of variable] . svydes § See Stata instructions for the command sampsi . § svy commands with “if” give the wrong CI; use subpop or by instead of “if” (the same applies to boostrapping) § do not use LR-test with svystats, or otherwise with pweight. Instead use either svytest (if # clusters <~100) or test (which in this instance gives a Wald test) § Finite population correction (fpc) : computes adjusted N for se estimates (N – n/N); used only in simple random sampling without replacement. That is, it accounts for the reduction in variance that occurs when sampling without replacement from a finite population, as compared to sampling with replacement. Use fpc() option for cases of simple random sampling or stratified random sampling without replacement of psu’s within each stratum with no subsampling within psu’s. Including fpc() reduces the variance estimate, but minimally if N-psu’s is large relative to sampled-n- psu’s . To use, set fpc() to Nh, the var representing the total number of psu’s per stratum in the population (e.g., hid in datafile comprised of individual household members). Caution: you must know the total population-parameter of the pertinent var (e.g., total pop-N in each stratum or cluster) in order to use fpc, so thus we will rarely if ever use fpc § Recall that that unequal nonresponse rates across strata &/or clusters must be adjusted for
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 How to set survey-stats in Stata for various samples simple random sample random sample of one hospital from a population (hospno) of 25 hospitals; enumeration unit (i.e. population) is #births (N=773) in the sampled hospital during the previous year; in sum, what Stata needs for a simple random sample is (1) weighting var & (2) total enumeration units of population (N) from which sample is drawn . svyset [pw=weight1], fpc(birth) momsag.dta; sampling weight=N/n birth=total N [psu <obs>is hospno (total #hospitals), which=25; in this case psu is the enumeration unit, but this is not so in all cases] . svymean momsag compare with: su momsag . svytotal momsag compare with: sumsum momsag egen rsum=sum(momsag) random sample of 40 workers from total enumeration units (i.e. population, N: popsize) of 1200 workers; includes (1) weighting var & (2) total enumeration units of population (N) from which sample is drawn . svyset [pw=wt1], fpc(popsize) workers.dta; sampling weight=N/n popsize=total N . svymean fvc, by(exposure) simple random sample with subdomains summary: what is required for simple random sampling is just two parameters, the total #enumeration units(N) from which the sample is drawn & the weighting var
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 7

statasu - Stata Survey...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online