Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Contrast tables

    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

Working...
X