Support #1750

Sample size changes after applying sample weight

Added by Claire Wu about 1 year ago. Updated about 1 year ago.

Start date:
% Done:



Dear Support Team,

I am having a problem running linear regression models with adjusted values in Stata. Specifically, I am running two separate linear regression models for the same set of samples. The sample size is 2,508 (there are 1,254 couples, i.e. 1,254 males and 1,254 females).
For the first model at the time point of the main survey wave 8, I use 'h_indinui_xw' as the sample weight and the code to declare the complex sample design is
svyset h_psu [pweight=h_indinui_xw], strata(h_strata)singleunit(scaled); the other model at the time point of wave 3 of the Covid-19 study, where I used 'cc_betaindin_xw' as the sample weight and the code is: svyset psu [pweight=cc_betaindin_xw], strata(strata)singleunit(scaled) .

The problem is that when I produce adjusted descriptive statistics for females and males, the variables at wave 8 appear to be only 1213 females and 1206 males and the total number of observations shown in the wave 8 linear regression model is 2340. however, in the Covid-19 study model, the sample sizes are all consistent with the original, i.e. 1254 females and 1254 males, for a total of 2508.

Could you please tell me if something was done wrong to cause this?

Your help would be much appreciated!



Updated by Claire Wu about 1 year ago

I found out the reason why after applying the sampling weights, the sample size shrank -- It was because that there were 78 (=2508 - 2430)people had zero sampling weights. However, Could anyone please advise me why they have zero weights?

P.S. I have already excluding all the cases with missing values for any variable in the model. Also, the sample are people who have participated in both Main survey wave 8 and Covid-19 survey wave 3.

Thank you so much for your help in advance!



Updated by Understanding Society User Support Team about 1 year ago

  • Status changed from New to In Progress
  • Private changed from Yes to No

Many thanks for your enquiry. The Understanding Society team is looking into it and we will get back to you as soon as we can.

We aim to respond to simple queries within 48 hours and more complex issues within 7 working days.

Best wishes,
Understanding Society User Support Team


Updated by Understanding Society User Support Team about 1 year ago

  • Category set to Weights
  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 90

Dear Claire,

Please check question 13 "Should I worry that some members of my analysis sample have a weight of
zero?" in the weighting FAQs available here:
It explains why weights equal zero for some respondents.

Best wishes,

Also available in: Atom PDF