I have a column of numbers [range from 0.2 to 2.3] in a column called cwei in SPSS. I want to use these weights as case weights in expss tab_ logic. My efforts so far work and produce a table but it is unweighted. Where is my error?
tab_cols(total(),Ban2) %>% tab_cells(Gender) %>% tab_stat_cpct() %>% tab_weight(vardata$cwei) %>% tab_pivot()```
You need to weight table before the statistic calculation:
tab_cols(total(),Ban2) %>% tab_cells(Gender) %>% tab_weight(vardata$cwei) %>% tab_stat_cpct() %>% tab_pivot()
1.4m articles
1.4m replys
5 comments
57.0k users