kittycat
kittycat

Reputation: 21

estpost with factor variable notation

I want to make a table that displays all levels of my variables. For that I use the ibn notation. However, it seems that factor variable notation is not compatible with estpost and esttab. Is there a way to export summary statistics with factor variable notation to excel/word?

estpost sum ibn.male ibn.edu_lvl ibn.age_cat

Error: factor variables and time series operators not allowed.

All of my variables are not categorical on their own, but encoded, so I think the issue is the ibn prefix. Is it possible to have it somehow exported to excel?

UPD.: xi, noomit: estpost sum i.varname displayed summary statistics by levels, however it displayed the values of variables, e.g. (male == 1, male ==0) instead of labels of values (male, female)

Upvotes: 0

Views: 879

Answers (1)

Wouter
Wouter

Reputation: 3261

estpost summarize expects a varlist as an input (see help estpost), and ibn.male, ibn.edu_lvl and ibn.age_cat are not variables, which is the cause of your error. You could calculate summary statistics by the levels of a variable, but estpost summarize doesn't support a by() option. estpost tabstat does, so you could use this instead.

Upvotes: 3

Related Questions