Reputation:
Since I am a Stata beginner, I don't know how to import my data, but I just wanted some help to understand my mistake.
I would like to create a table where the first column displays the mean characteritics of California, the second column the mean characteritics of all other states (unweighted by their population), and the last column reports the p-value of the differences in means. The variable California is a dummy variable where 1 equals to California and 0 equals to 38 others states.
Here is the result :
estpost ttest cigsale lnincome beer age15to24 retprice, by(California)
esttab using ta.rtf, cell("mu_1 mu_2 p") label ///
title(Mean characteristics of California and 38 control states) ///
collabels(none) unstack noobs nonumber mtitles("California" "2" "P value") ///
addnote("All variables are averaged from 1980 to 1988. Beer consumption is averaged from 1984 to 1988. GDP per capita is measured in 1997 dollars, retail prices are measured in cents, beer consumption is measured in gallons, and cigarette sales are measured in packs")
The problem is that when I put mtitles ("California" "Average of 38 control states" "P value"), it only works for the column California as you can see in the picture. The two other columns do not have the titles "Average of 38 control states" and "P value". I have tried many commands but there is only a title for the California column.
Could you please help me figure out what is going on?
Upvotes: 0
Views: 809
Reputation: 3261
This is one model with three columns, so instead of mtitles
you can use collabels
.
collabels("California" "2" "P value")
Upvotes: 3