Dear all,
I want to estimate the percentage difference in expenditures for different outcomes of a factor variable F (relative to the base category):
percentage difference (F=f) = (expenditures(F=f) - expenditures(F=base))/expenditures(F=base)
To do so I estimate the following log-linear model
Note that X is a continuous regressor and F is the factor variable I am interested in (ranging from 1 to 7). I realize that for factor variables, like dummies, I cannot simply interpret the estimated coefficients b_hat as percentage changes. Instead I want to compute (see Kennedy (1981)):
( exp(b_hat - 0.5*Var_hat(b_hat)) - 1) * 100
My question: Is there a way to estimate this percentage effect in Stata and also obtain standard errors for this estimate? I tried using versions of the margins command but so far have not succeeded in obtaining the correct effects. These are the versions I have tried:
Both of these commands seem to simply return the estimated coefficients and standard errors from the estimated regression.
Thank you very much already for any help!
Best wishes,
Kathrin
citation:
Kennedy, P. E. (1981). Estimation with correctly interpreted dummy variables in semilogarithmic equations. American Economic Review, 71, 801.
I want to estimate the percentage difference in expenditures for different outcomes of a factor variable F (relative to the base category):
percentage difference (F=f) = (expenditures(F=f) - expenditures(F=base))/expenditures(F=base)
To do so I estimate the following log-linear model
Code:
reg log_expenditures X ib4.F, vce(cluster id)
( exp(b_hat - 0.5*Var_hat(b_hat)) - 1) * 100
My question: Is there a way to estimate this percentage effect in Stata and also obtain standard errors for this estimate? I tried using versions of the margins command but so far have not succeeded in obtaining the correct effects. These are the versions I have tried:
Code:
margins, eydx(F) expression(exp(xb())) margins, eydx(F) expression(exp(predict(xb)))
Thank you very much already for any help!
Best wishes,
Kathrin
citation:
Kennedy, P. E. (1981). Estimation with correctly interpreted dummy variables in semilogarithmic equations. American Economic Review, 71, 801.