i m working on a log log model.
first run a regression of log wage on education, log experience, female, married, large-firm.
use the corrected prediction to calculate the marginal effect of an additional year of experience for an unmarried male at a small firm at the average education and experience.
do i do this right?
gen lnhrearn=ln(hrearn)
gen lnexper=ln(exper)
scalar avexper=r(mean)
scalar lnavexper=ln(avexper)
scalar aveducrecode=r(mean)
scalar sig2b=e(rss)/e(df_r)
di "corrected factor="exp(sig2b/2)
scalar predlnhrearn1=_b[_cons]+_b[educrecode]*aveducrecode+_b[married]*0+_b[female]*0+_b[largfirm]*0+_b[lnexper]*lnavexper
scalar sig2b=e(rss)/e(df_r)
scalar yhatd=exp(predlnhrearn1)*exp(sig2b/2)
disp _b[lnexper]*(yhatd/avexper)
i ask because i got different stata outcome with hand calculation.
Related Posts with log-log model
melogit Confidence Interval missing?Hi all, I'm running a multilevel mixed-effects logistic regression, with random intercepts per my c…
Transform time series into panel dataDear Statalist experts, I have the following time series of the US population by city and state in 2…
Saving Colors from a Custom SchemeI am working on creating a custom color/graph scheme for my workplace. Everything has worked well ex…
Exports at current or constant USD prices in gravity modelDear all. I am working in a gravity model with a large number of observations (133 exporters and 13…
Hybrid long-wide. Help with transforming datasetHi, I recently got a dataset of 600 patients admitted to the ICU. It contains info regarding sex, a…
Subscribe to:
Post Comments (Atom)
0 Response to log-log model
Post a Comment