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:

Array

After running a regression: regress mpg i.rep78, its results are as belows:
Array

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