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
Two-way graph for panel dataDear, I want to plot a variable in panel data. Below is an example of my data. Code: year provinc…
Two-way graph for panel dataDear, I want to plot a variable in panel data. Below is an example of my data. Code: year provinc…
Difference between two dates in daysHi all, I have a date of admission (ex. 02mar2018 00:00:00) and date of intervention (ex. 05mar2018…
Eventstudy using either the estudy or eventstudy2 commandHi, I am currently trying to conduct an event study for my master thesis. However, I do have some t…
Validity check for South African identity numbers using the Luhn algorithmTwo files (one ado; one do) attached, which checks a variable containing South African id numbers fo…
Subscribe to:
Post Comments (Atom)
0 Response to log-log model
Post a Comment