The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Weighting data » Survey design in R (Getting warining that Sample size greater than population size)
Survey design in R [message #29599] Mon, 08 July 2024 10:18 Go to previous message
RobertB is currently offline  RobertB
Messages: 4
Registered: June 2024
Member
Hello all,

Has anyone encountered the warning below when creating tabulations/statistical summaries of an outcome across various socio-economic characteristic. This is after accounting for survey design. The function used for statistical summary is tbl_svysummary() from the gtsummary package.

Warning: There were 48 warnings in `mutate()`.
The first warning was:
ℹ In argument: `df_stats = pmap(...)`.
Caused by warning in `svymean.survey.design2()`:
! Sample size greater than population size: are weights correctly scaled?
ℹ Run dplyr::last_dplyr_warnings() to see the 47 remaining warnings.

code used for survey design
svydesign(id=mydata$hv021,data=mydata, strata=mydata$hv023, 
                     weight=mydata$wt,nest=T)
options(survey.lonely.psu="adjust")

Notably when i run similar analysis in stata I do not get the error and despite the warning the proportions produced in R are similar to those
produced in stata.

Should i be concerned about the warning in R or ignore?

Thanks in advance.

Best wishes,
RobertB

 
Read Message
Read Message
Previous Topic: Weighting for calendar module
Next Topic: Mali 2012/13 - Multilevel Modeling Weights
Goto Forum:
  


Current Time: Thu Nov 7 16:38:15 Coordinated Universal Time 2024