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
How to count the individual digits in a string numberHi, I have survey data. Both the variables a7 and a8 are survey variables having multiple options c…
Are the missing values being coded as zero?Hi all, I have data on certain variables for four rounds. Following are the number of observations …
Diagnostic test in the case of longitudinal dataDear Altruist, I hope you are doing fine and in good health. I am using longitudinal data to check t…
Questions about two-wayHi I need to customize my graph that is plotted by twoway scatter as follows: 1-drawing a diagonal l…
Rangerun SpeedHi everyone, I've been using the user-written command Rangerun to accelerate the execution of my cod…
Subscribe to:
Post Comments (Atom)
0 Response to Contrast tables
Post a Comment