Announcement

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

  • Question for controlling the variables reported in a regression table

    My question is a two parter
    -I am attempting the below regression using twelve controls. Is it possible to represent these twelve variables into a vector, let's say "X". I tried to generate a new variable using these and it did not work.
    eststo: quietly reg occscore malmort1890 pre1890 lebergott99 docs1898 spend imr1890 hookworm lnchgterm lnchgptratio aadlit91 aurb90 ablack91 unemp_1930

    -For my second part. When using estout, is it possible to control what variables go into the table? For instance if I did the entire above regression and only wanted two variables reported.

  • #2
    - The way to do that is to store your variables in a local macro. Example:
    Code:
    sysuse auto, clear
    local controls "mpg headroom trunk length"
    reg price weight `controls'
    - Yes, have a look at help estout, specifically the drop, keep and indicate options.
    (Estout is from the Stata Journal)

    Comment


    • #3
      Perfect, thanks for the response.

      Comment

      Working...
      X