I am trying to get a crosstab with percentages from this file using Hmisc . But why does summary() drop the category ("OTHER") from the OCCUPATION variable?
library(Hmisc) summary(ID ~ OCCUPATION, data=df, method="reverse")
Conclusion: Descriptive Statistics by ID
+--------------------------+--------+--------+ | |HUSBAND |SELF | | |(N=28) |(N=72) | +--------------------------+--------+--------+ |OCCUPATION : SELF EMPLOYED|93% (26)|31% (22)| +--------------------------+--------+--------+
Compare this to simple table()
OCCUPATION ID OTHERS SELF EMPLOYED HUSBAND 2 26 SELF 50 22
source share