Announcement

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

  • Questions on computing the marginal effects of the factor variable

    Dear all,
    I am wondering how to compute the marginal effects of a factor variable if the number of observations in each level have changed. For example, let us use the “auto.dta” as the example, and the current observation in each level of rep78 lists as follows:

    Click image for larger version

Name:	_20221013122059.png
Views:	1
Size:	7.8 KB
ID:	1685234


    After running a regression: regress mpg i.rep78, its results are as belows:
    Click image for larger version

Name:	xx.png
Views:	1
Size:	25.4 KB
ID:	1685235


    Then, I am curious about whether it is possible to compute the marginal effects of each level of rep78 when the number of observations in each level have changed. Let us suppose, the number of observations in level 1-level 5 has changed to the number of observations in level 1-level 5 has changed to 8, 5, 20, 16, 20, respectively.
    C-
    Pengcheng


  • #2
    That depends what will be in those extra observations. Typically, for such an thought experiment those values are chosen such that the coefficients don't change. In that case the answer is trivially: the coefficients don't change.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X