eststo: reg wage ttl_exp
esttab
----------------------------
(1)
wage
----------------------------
ttl_exp 0.331***
(13.04)
_cons 3.612***
(10.65)
----------------------------
N 2246
----------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
eststo: reg wage ttl_exp age race
esttab
--------------------------------------------
(1) (2)
wage wage
--------------------------------------------
ttl_exp 0.331*** 0.346***
(13.04) (13.49)
age -0.138***
(-3.57)
race -1.389***
(-5.21)
_cons 3.612*** 9.187***
(10.65) (6.05)
--------------------------------------------
N 2246 2220
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
generate interact = ttl_exp*union
eststo: reg wage ttl_exp age race union interact
esttab
------------------------------------------------------------
(1) (2) (3)
wage wage wage
------------------------------------------------------------
ttl_exp 0.331*** 0.346*** 0.342***
(13.04) (13.49) (15.55)
age -0.138*** -0.0609*
(-3.57) (-2.08)
race -1.389*** -1.323***
(-5.21) (-6.66)
union 2.040**
(3.25)
interact -0.0467
(-1.03)
_cons 3.612*** 9.187*** 5.559***
(10.65) (6.05) (4.79)
------------------------------------------------------------
N 2246 2220 1854
------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
generate tenure_sq = tenure^2
eststo: reg wage tenure tenure_sq
esttab
----------------------------------------------------------------------------
(1) (2) (3) (4)
wage wage wage wage
----------------------------------------------------------------------------
ttl_exp 0.331*** 0.346*** 0.342***
(13.04) (13.49) (15.55)
age -0.138*** -0.0609*
(-3.57) (-2.08)
race -1.389*** -1.323***
(-5.21) (-6.66)
union 2.040**
(3.25)
interact -0.0467
(-1.03)
tenure 0.344***
(4.84)
tenure_sq -0.00891*
(-2.34)
_cons 3.612*** 9.187*** 5.559*** 6.327***
(10.65) (6.05) (4.79) (27.14)
----------------------------------------------------------------------------
N 2246 2220 1854 2231
----------------------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
generate ln_tenure = ln(tenure)
eststo: reg wage ln_tenure
esttab
--------------------------------------------------------------------------------------------
(1) (2) (3) (4) (5)
wage wage wage wage wage
--------------------------------------------------------------------------------------------
ttl_exp 0.331*** 0.346*** 0.342***
(13.04) (13.49) (15.55)
age -0.138*** -0.0609*
(-3.57) (-2.08)
race -1.389*** -1.323***
(-5.21) (-6.66)
union 2.040**
(3.25)
interact -0.0467
(-1.03)
tenure 0.344***
(4.84)
tenure_sq -0.00891*
(-2.34)
ln_tenure 0.970***
(9.53)
_cons 3.612*** 9.187*** 5.559*** 6.327*** 6.562***
(10.65) (6.05) (4.79) (27.14) (36.87)
--------------------------------------------------------------------------------------------
N 2246 2220 1854 2231 2180
--------------------------------------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
esttab, se
--------------------------------------------------------------------------------------------
(1) (2) (3) (4) (5)
wage wage wage wage wage
--------------------------------------------------------------------------------------------
ttl_exp 0.331*** 0.346*** 0.342***
(0.0254) (0.0257) (0.0220)
age -0.138*** -0.0609*
(0.0387) (0.0292)
race -1.389*** -1.323***
(0.267) (0.199)
union 2.040**
(0.628)
interact -0.0467
(0.0452)
tenure 0.344***
(0.0709)
tenure_sq -0.00891*
(0.00381)
ln_tenure 0.970***
(0.102)
_cons 3.612*** 9.187*** 5.559*** 6.327*** 6.562***
(0.339) (1.518) (1.159) (0.233) (0.178)
--------------------------------------------------------------------------------------------
N 2246 2220 1854 2231 2180
--------------------------------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
esttab, se mtitle ("Basic" "Controls" "Interaction" "Quadratic" "Linear-Log")
--------------------------------------------------------------------------------------------
(1) (2) (3) (4) (5)
Basic Controls Interaction Quadratic Linear-Log
--------------------------------------------------------------------------------------------
ttl_exp 0.331*** 0.346*** 0.342***
(0.0254) (0.0257) (0.0220)
age -0.138*** -0.0609*
(0.0387) (0.0292)
race -1.389*** -1.323***
(0.267) (0.199)
union 2.040**
(0.628)
interact -0.0467
(0.0452)
tenure 0.344***
(0.0709)
tenure_sq -0.00891*
(0.00381)
ln_tenure 0.970***
(0.102)
_cons 3.612*** 9.187*** 5.559*** 6.327*** 6.562***
(0.339) (1.518) (1.159) (0.233) (0.178)
--------------------------------------------------------------------------------------------
N 2246 2220 1854 2231 2180
--------------------------------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
estimates clear
eststo: reg wage ttl_exp
estadd ysumm
eststo: reg wage ttl_exp age race
estadd ysumm
esttab, se stats(N r2 ymean)
--------------------------------------------
(1) (2)
wage wage
--------------------------------------------
ttl_exp 0.331*** 0.346***
(0.0254) (0.0257)
age -0.138***
(0.0387)
race -1.389***
(0.267)
_cons 3.612*** 9.187***
(0.339) (1.518)
--------------------------------------------
N 2246 2220
r2 0.0705 0.0855
ymean 7.767 7.758
--------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
* We can then change the titles of N, and r2 and ymean
esttab, se stats(N r2 ymean, label("n" "R-Squared" "Pre-mean of Y"))
--------------------------------------------
(1) (2)
wage wage
--------------------------------------------
ttl_exp 0.331*** 0.346***
(0.0254) (0.0257)
age -0.138***
(0.0387)
race -1.389***
(0.267)
_cons 3.612*** 9.187***
(0.339) (1.518)
--------------------------------------------
n 2246 2220
R-Squared 0.0705 0.0855
Pre-mean o~Y 7.767 7.758
--------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
* We can also use the variable labels instead of the variables name
* by adding the options "label" after the comma.
esttab, se label stats(N r2 ymean, label("N" "R-Squared" "Pre-mean of Y"))
----------------------------------------------------
(1) (2)
Hourly wage Hourly wage
----------------------------------------------------
Total work experie~) 0.331*** 0.346***
(0.0254) (0.0257)
Age in current year -0.138***
(0.0387)
Race -1.389***
(0.267)
Constant 3.612*** 9.187***
(0.339) (1.518)
----------------------------------------------------
N 2246 2220
R-Squared 0.0705 0.0855
Pre-mean of Y 7.767 7.758
----------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
* if you wanted a different lable, you can change the label for the variable
* or you can change it in esttab
* For example you want the variable age to be label "Age" and not "Age in current year"
* For this you use the command coeflabels
esttab, se label coeflabels(age "Age") stats(N r2 ymean, label("N" "R-Squared" "Pre-mean of Y"))
----------------------------------------------------
(1) (2)
Hourly wage Hourly wage
----------------------------------------------------
Total work experie~) 0.331*** 0.346***
(0.0254) (0.0257)
Age -0.138***
(0.0387)
Race -1.389***
(0.267)
Constant 3.612*** 9.187***
(0.339) (1.518)
----------------------------------------------------
N 2246 2220
R-Squared 0.0705 0.0855
Pre-mean of Y 7.767 7.758
----------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
* Let's say you only want to keep the coefficients from experience
* and not the other coefficients. For this you use the options "keep"
esttab, keep(ttl_exp) se label coeflabels(ttl_exp "Years of Experience") stats(N r2 ymean, label("N" "R-Squared" "Pre-mean of Y"))
----------------------------------------------------
(1) (2)
Hourly wage Hourly wage
----------------------------------------------------
Years of Experience 0.331*** 0.346***
(0.0254) (0.0257)
----------------------------------------------------
N 2246 2220
R-Squared 0.0705 0.0855
Pre-mean of Y 7.767 7.758
----------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
esttab using "filepath", keep(ttl_exp) se label coeflabels(ttl_exp "Years of Experience") stats(N r2 ymean, label("N" "R-Squared" "Pre-mean of Y"))
esttab using "/Users/laptop/Downloads/test.rtf", replace keep(ttl_exp) se label coeflabels(ttl_exp "Years of Experience") stats(N r2 ymean, label("N" "R-Squared" "Pre-mean of Y"))