Announcement

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

  • Regression with an independent catvar

    I want to do a regression with a categorial variable as independent var. As far as I understand it is necessary to create dummy variables for the number of values of the catvar -1. I want to see the effect for all values of the catvar. When doing so one gets ommited. Does that mean the effects of the others are in reference to the omitted one? Is it possible to get it in reference of the overall average over all values?

  • #2
    Please give an example of your data using dataex, the code you've used and what Stata gave you back.

    It's extremely difficult to answer your question without any input or additional information.

    Comment


    • #3
      Does that mean the effects of the others are in reference to the omitted one?
      Yes.

      Is it possible to get it in reference of the overall average over all values?
      I don't know if one single regression can do that. But you may obtain what you want using -margins- after the original regression.

      Code:
      regress y i.catvar    //coefficients: compared to the omitted group
      margins, over(gw.catvar)   //coefficients: each group compared to the grand mean

      Comment

      Working...
      X