Hi All,

I'm well familiar with the -margins- command and the available resources, but still haven't been able to recreate the margins results based on adding up the coefficients. I've looked into the very helpful https://www3.nd.edu/~rwilliam/stats/Margins01.pdf, which provides example for the APM, MEM and AME but not for APR.

Similarly, the Stata videos by Chuck Huber https://www.youtube.com/watch?v=43uX4D_7uaI also show hand calculations but not for this type.

size: categorical variable

growth: discrete variable

To replicate growth of .1 at size 2 I tried to alter the examples given by the aforementioned resources

but despite numerous variations, to no avail. Does someone know how APR margins are calculated?

Best,

Jeff

*// Stata-MP 14.2 - (user-written commands not possible)*

// Large, "very short" (N>>T) longitudinal data of firm employment and payroll// Large, "very short" (N>>T) longitudinal data of firm employment and payroll

I'm well familiar with the -margins- command and the available resources, but still haven't been able to recreate the margins results based on adding up the coefficients. I've looked into the very helpful https://www3.nd.edu/~rwilliam/stats/Margins01.pdf, which provides example for the APM, MEM and AME but not for APR.

Similarly, the Stata videos by Chuck Huber https://www.youtube.com/watch?v=43uX4D_7uaI also show hand calculations but not for this type.

size: categorical variable

growth: discrete variable

Code:

xtreg payroll c.growth##i.size if growth>0 margins i.size, at(growth=(.1 .5 1))

Code:

_b[growth]*.1+_b[2.size]+_b[2.size#growth]+_b[_cons]

Best,

Jeff

## Comment