Ask the counterfactual. Given the equation
$$(e^{x}-1)\times 100 = 50$$
what is the corresponding value of \(x\) that satisfies the equation? My rusty high-school math skills tell me that I can resolve this as:
$$e^{x}= 1.5$$
and to get \(x\), I need to take the natural logarithm of both sides:
$$x = ln(1.5)\approx 0.405$$
the similar values for 0 and 100 are 0 [or ln(1)] and ln(2).

$$(e^{x}-1)\times 100 = 50$$
what is the corresponding value of \(x\) that satisfies the equation? My rusty high-school math skills tell me that I can resolve this as:
$$e^{x}= 1.5$$
and to get \(x\), I need to take the natural logarithm of both sides:
$$x = ln(1.5)\approx 0.405$$
the similar values for 0 and 100 are 0 [or ln(1)] and ln(2).
Code:
use "https://www.stata-press.com/data/r17/nlsw88.dta", clear
reg wage never_married
est store c1
mat pct= e(b)
forval i=1/`=colsof(pct)'{
mat pct[1, `i']= (exp(pct[1, `i'])-1)*100
}
estadd mat pct= pct: c1
reg wage never_married c.age##c.tenure
est store c2
mat pct= e(b)
forval i=1/`=colsof(pct)'{
mat pct[1, `i']= (exp(pct[1, `i'])-1)*100
}
estadd mat pct= pct: c2
reg wage never_married c.tenure
est store c3
mat pct= e(b)
forval i=1/`=colsof(pct)'{
mat pct[1, `i']= (exp(pct[1, `i'])-1)*100
}
estadd mat pct= pct: c3
reg wage never_married c.grade
est store c4
mat pct= e(b)
forval i=1/`=colsof(pct)'{
mat pct[1, `i']= (exp(pct[1, `i'])-1)*100
}
estadd mat pct= pct: c4
set scheme s1color
gen newvar1= "`=uchar(28)' %"
gen newvar2= "`=uchar(28)' %"
coefplot (c1, label(Wage 1) pstyle(p1)) ///
(c2, label(Wage 2) pstyle(p2)) ///
(c3, label(Wage 3) pstyle(p3)) ///
(c4, label(Wage 4) pstyle(p4)) ///
, aux(pct) ci(95) vertical recast(bar) keep(never_married) barwidth(0.15) fcolor(*.5) ciopts(recast(rcap)) ///
citop xlabel("") xtitle("") ylabel(, format(%4.2f) labsize(small)) ytitle("") ///
title("") graphregion(color(white)) yline(0, lcolor(black) lpattern(dashed)) legend(cols(1) pos(6)) ///
addplot((scatter @b @at, ms(i) mlabel(@aux1) mlabformat(%4.3f) mlabpos(2) mlabcolor(black)) ///
(scatter @b @at if int(@aux)>=100, ms(none) mlabel(newvar1) mlabpos(2) mlabcolor(black)) ///
(scatter @b @at if int(@aux)<100, ms(none) mlabel(newvar2) mlabpos(2) mlabcolor(black))) ///
saving(gr2, replace) title(Wanted) ///
ylab(`=ln(1)' "0" `=ln(1.5)' "50" `=ln(2)' "100")
Comment