我们调查了特定行业的所有 10,000 名专业人士。该行业受到高度监管,因此我们为感兴趣的人群中的每个人提供联系信息。我们试图联系 100% 的人口。我们现在有一个包含 2,000 条回复的数据集,因为 20% 的人口同意完成调查。在进行这项调查时,根本没有抽样概率,也没有聚类。
按居住州划分时,响应率存在很大差异。由于状态变化在这个行业中很重要,我们计划计算这个最终数据集的权重,以便我们运行的任何统计数据都可以推广到整体人口,而不是 20% 的回应者。我相信权重应该被视为分层后的权重,但我不确定。
我不认为这是一个非常复杂的数据集来分析,但我不确定它是否是某种特殊情况——它不涉及任何采样,但同时它不是整个宇宙.
我将不胜感激任何编码技巧(使用任何统计语言)来推荐对这种结构的数据最有意义的调查分析设置。
如果我不得不猜测,这是我将使用的 R 代码:
# 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 在 stata 中有一个分层后教程,这让我觉得像这样创建 svyset 线可能更聪明——
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 )
谢谢!!