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
Codes of unit root tests with multiple structural breakHi, I am looking for the Stata code of the Lee & Strazicich unit root test from the following pa…
insufficient observations r(2001) issueHello, I am trying to run a regression using a panel data, using something like: "xtreg wages i.hig…
select the first or the last groupDear all, How can I write code more efficiently to select the first group or the last group membersh…
how to reshape?Dear All, How can I reshape the following data into a standard long format panel data? Code: // htt…
Add vertical reference lines in horizontal barsI am using -graph hbar- to create horizontal bars on means by groups. Does anyone know how to add ve…
Subscribe to:
Post Comments (Atom)
0 Response to Contrast tables
Post a Comment