We surveyed all 10,000 professionals in a particular industry. The industry is highly-regulated, so we have contact information for everyone in our population of interest. We attempted to contact 100% of the population. We now have a data set containing the 2,000 responses, because 20% of our population agreed to complete the survey. When administering this survey, there were no sampling probabilities and no clustering at all.
There is a lot of variation in the response rate when broken out by state of residence. Since state variation is important in this industry, we plan to calculate weights for this final data set so that any statistics that we run will generalize to the overall population rather than the 20% who responded. I believe the weights should be treated as post-stratification weights, but I'm not certain.
I don't imagine this is a terribly complex data set to analyze, but I'm not sure if it's a special case of some sort -- it didn't involve any sampling whatsoever but at the same time it is not the entire universe.
I would appreciate any coding tips (in any statistical language) to recommend the survey analysis setup that makes the most sense for data of this structure.
if I had to guess, here's the R code I would use:
# start with data set `x` and add a column of five, since 20% responded x$wgt <- 5 # give everyone in the data set a weight of five # provide only a column of 5's to the `svydesign` command y <- svydesign( ~1 , data = x , weights = ~ wgt ) # create a table with the intended joint distribution, here with just two example states pop.types <- data.frame( state = c( "state 1" , "state 2" ) , Freq = c( 5000 , 5000 ) ) # create the post-stratified survey design z <- postStratify( y , ~ state , pop.types ) # have fun running statistics and confidence intervals svymean( ~ variable.to.analyze , z ) confint( svymean( ~ variable.to.analyze , z ) )
ucla has a post-stratification tutorial in stata that makes me think it might be smarter to create the svyset line like this--
gen total_pop = 10000 gen pststr_wgt = . replace pststr_wgt = 5000 if state == "state 1":state replace pststr_wgt = 5000 if state == "state 2":state svyset _n , fpc( total_pop ) poststrata( state ) postweight( pststr_wgt )