【问题标题】:Question about unweighted ANES survey in R关于 R 中未加权 ANES 调查的问题
【发布时间】:2020-11-30 17:08:58
【问题描述】:

这可能更像是一个统计问题。我正在尝试使用 2016 ANES 调查来了解 R 中的未加权频率。我使用anesr 下载了数据,并正在使用lodown 上的Anthony Damico 教科书:http://asdfree.com/american-national-election-study-anes.html

ANES 指南:https://electionstudies.org/wp-content/uploads/2018/12/anes_timeseries_2016_userguidecodebook.pdf

ANES 是一项小组调查,包括选举前和选举后的访谈。

抱歉,我无法发布基础数据。但本质上,我试图理解一个问题。

假设我想获得对 V161195x 的回复的未加权计数,它总结了对非法带到美国的儿童应该如何处理的看法。使用未加权的数据框,我运行:

table(anes_df$V161195x)

Yielding: 
-9   -8    1    2    3    4    5    6 
  47   29  329  332  112  435 1437 1549 

-9 和 -8 被拒绝回答或 N/A。

然后我使用survey 包进行复杂的样本调查设计和更易于阅读的输出。

anes_design <- 
  svydesign( 
    ~V160202, # full sample weight 
    strata = ~V160201, 
    data = anes_df , 
    weights = ~V160102 , # full sample weight 
    nest = TRUE 
  )
  
anes_design <- 
  update( 
    anes_design,
    
    one = 1, # dummy 1 for each record

    undoc_kids =
      factor(V161195x , levels = 1:6 , labels =
                c( 'should sent back - favor a great deal' ,
                   'should sent back - favor a moderate amount' ,
                   'should sent back - favor a little' ,
                   'should allow to stay - favor a little' ,
                   'should allow to stay - favor a moderate amount' ,
                   'should allow to stay - favor a great deal' )
      )     
  )


svyby( ~ one , ~ undoc_kids , anes_design , unwtd.count )

# yields 
should sent back - favor a great deal                   should sent back - favor a great deal    270  0
should sent back - favor a moderate amount         should sent back - favor a moderate amount    292  0
should sent back - favor a little                           should sent back - favor a little    102  0
should allow to stay - favor a little                   should allow to stay - favor a little    361  0
should allow to stay - favor a moderate amount should allow to stay - favor a moderate amount   1216  0
should allow to stay - favor a great deal           should allow to stay - favor a great deal   1348  0


这与第一个表中的输出不匹配,即使它们都未加权。似乎 svyby 函数仅包括在选举前和选举后调查中的观察结果,但问题仅在选举前调查中。

当我使用V160101(仅限预选)而不是V160202 重新运行分析时,输出匹配...那么最好使用哪个?

【问题讨论】:

    标签: r survey


    【解决方案1】:

    由于您使用的是选举后权重变量,对于未参加选举后调查的人来说,该变量缺失(或可能为零),因此您只会获得两个调查中的观察结果。

    【讨论】:

    • 是的,这就是我收集到的。在那种情况下,在进行加权分析时,我必须根据问题使用不同的权重,是吗?例如。密码本列出了一些权重:V160102 表示“仅使用选举后调查或同时使用选举前后调查的完整样本”,V160101 表示“仅使用选举前调查数据的完整样本”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-10
    • 2020-07-18
    • 1970-01-01
    • 2016-12-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多