Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 SPSS 中名为 cwei 的列中有一列数字 [范围从 0.2 到 2.3]。我想将这些权重用作 expss tab_ 逻辑中的案例权重。到目前为止,我的努力工作并产生了一张桌子,但它没有加权。我的错误在哪里?
tab_cols(total(),Ban2) %>% tab_cells(Gender) %>% tab_stat_cpct() %>% tab_weight(vardata$cwei) %>% tab_pivot()```
您需要在统计计算之前对表进行加权:
tab_cols(total(),Ban2) %>% tab_cells(Gender) %>% tab_weight(vardata$cwei) %>% tab_stat_cpct() %>% tab_pivot()