Closed LisaKatharina closed 8 years ago
My first would be to declare the variable as a factor.
Dear Christopher, thanks for this hint! I tried it but when I include the variable into the stargazer command, it just drops it instead of treating it like a dummy... This was what I used to transform the variable:
Data$east_factor <- factor(ifelse(as.numeric(Data$east)==1, 1, 0))
Maybe we should step back a bit: what goal are you trying to achieve? Is it a table with the variables in rows and descriptive stats (like mean, median, SD, etc) in columns? If so, I would put the nominal factor variables in a different table with frequencies of the categories.
That is exactly what I wanted to achieve: A summary table with variables in rows with descriptive stats. Alright, I will exclude the nominal variable from the table then and put it into a different one. Thanks for your help!!
Sounds good.
Dear all,
has anyone of you figured out how to get a stargazer summary table where there is no mean or sd calculated for dummy variables (as they are not meaningful)? Help would be much appreciated!
Best, Lisa