Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding generated variables to the regression output for LaTeX

    I estimated the following four fixed effect regressions:
    Code:
    xtreg ln_y_pc_t2 ln_s ln_nc_g_d ln_y_pc_t1, fe vce(robust)
    xtreg ln_y_pc_t2 ln_s ln_nc_g_d ln_y_pc_t1 if oil_states == 0, fe vce(robust)
    xtreg ln_y_pc_t2 ln_s ln_nc_g_d ln_y_pc_t1, fe vce(robust)
    xtreg ln_y_pw_t2 ln_s ln_nw_g_d ln_y_pw_t1, fe vce(robust)
    After each regression I computed the lambda and the alpha (because I work with a adaption of the Solow Model). This I computed as followed (here just the example for the first regression):
    Code:
    gen lambda_pc = -ln(_b[ln_y_pc_t1])
    gen alpha_pc = [_b[ln_s]/(1-exp(-(lambda_pc)))]/[1+(_b[ln_s])/(1-exp(-(lambda_pc)))]
    For export my four regression outputs to LaTeX I used the estout package.
    Code:
    esttab first second third fourth using regression_27.03.23_without_avh.tex, replace  stats(r2_a r2_w r2_o r2_b N_clust N, label(R-sqr. "R-sqr. Within" "R-sqr. Overall" "R-sqr. Between" "Number of Countries" "Observations")) baselevels title("Regression of Equation 11") label star se obslast depvars
    My question is now, it is possible to add the computed lambda and alpha in this command, so I don't need to write it by hand in LaTeX?
Working...
X