Using Stata for Survey Data Analysis


Using sampling weights in Stata


Download 1.39 Mb.
Pdf ko'rish
bet41/61
Sana08.03.2023
Hajmi1.39 Mb.
#1252470
1   ...   37   38   39   40   41   42   43   44   ...   61
Bog'liq
2009 Usingstataforsurveydataanalysis (1)

Using sampling weights in Stata The calculation of weighted sums and weighted average would be 
very tedious, but fortunately survey software such as SPSS and Stata do this for us. In SPSS, you 
turn on the weights and weights are used in all calculations until you turn it off. Stata is different in 
that you tell Stata which commands should use weights.
Stata allows four kinds of weights: 
1) fweights, or frequency weights, are weights that indicate the number of duplicated 
observations. 


Using Stata for Survey Data Analysis 
 
Minot 
 
Page 37
2) pweights, or sampling weights, are weights that denote the inverse of the probability that the 
observation is included due to the sampling design. 
3) aweights, or analytic weights, are weights that are inversely proportional to the variance of an 
observation;
4) iweights, or importance weights, are weights that indicate the "importance" of the observation 
in some vague sense.
Here we will focus on pweights and fweights. The syntax for using weights is: 
command ... [weight_type=varname] ... 
In the case of the BLSS, we will generally be using the following syntax: 
command … [aw=wt] … 
Here are some examples: 
tab region [aw=weight]
gives the weighted frequencies in each region 
sum hh_size [aw=wt]
gives the weighted mean household size 
tab b21_q1 [aw=wt], sum(pc_t_mo)
gives table of weighted mean expenditure by sex of 
 head of household
tabstat hhsize [aw=weight], by(stratum) gives the weighted average household size for urban 
 
 
 
 
 
and rural households 
Example 17 shows the effect of weights. The first table gives the unweighted percentage of urban and 
rural households in the sample. In the second table, the weights are turned on, showing the estimated 
proportions in the country. Notice that the urban households represent almost 58% of the sample just 
23% of the population. The third table confirms that the rural weights are larger than the urban 
weights.
Type “help weights” in the Stata Command window for more information. 

Download 1.39 Mb.

Do'stlaringiz bilan baham:
1   ...   37   38   39   40   41   42   43   44   ...   61




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling