Hi all,
New Statalist user here with a simple question (I'm a long time Stata user who is trying to learn to use tables). I am trying to create a table with contrast estimates after running a regression model. MWE below:
clear all
sysuse auto.dta
reg price i.foreign##i.rep78 mpg
collect get, tag(model[]): margins r.foreign , at(rep78=(1(1)5)) asobserved
collect levelsof model
collect style header result, level(hide)
collect layout (colname#result[_r_b]) (model)
The problem: I want to replace the row headers (e.g., (Foreign vs Domestic) @ _at=1, (Foreign vs Domestic) @ _at=2, ...) with custom strings of my choosing such as "Row 1", "Row 2", etc.
Is there a simple way of doing this?
Any help would be welcome.
Thanks!
Matthew
Related Posts with Contrast tables
Finding observations that are strictly dominated: how do I eliminate multiple loopsI have a dataset that looks as follows. For each state, I know which individuals are accepted (acc =…
Adding a line for observations in the -collect- systemHello, I am sure this must be trivial, but I have had no luck with it so far. I am trying the new -…
Concatenating string variables with missing valuesHi all! I've tried to follow the instructions from another post on this forum to concatenate variab…
Icd 10Dear all, I wonder if anyone has any experience working with ICD 10 codes. I have 1 mill records o…
Merging multiple observations per time in panel data.Dear all, I have a panel datatset of 74 countries with multiple daily observations. I have also fou…
Subscribe to:
Post Comments (Atom)
0 Response to Contrast tables
Post a Comment