Announcement

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

  • Esttab: Show multiple Regressions in one column/ Delete empty cells

    Hi all,

    for my master thesis I try to display 70 logit regression outcomes in one table. Please note that for each regression I only want to display the main independent variable (i.e. I drop all other control variables etc. in esttab). I have 7 different outcomes and for each outcome I have 10 specifications, each with a different independent variable. Ideally I would like to have a 10rows*7collums table, showing only the "beta1" coefficients of each regression. However, I only manage to get a 10rows*70columns table with the 70 different coefficients (displayed as 7 diagonals for each outcome) and 630 empty cells.

    The relevant code looks like this:


    ...

    Code:
    foreach var of global subjects {
        foreach independent in ue_rate n_ue_rate n_ue_rate_change p50 p75 p90 recession gdpgrowthrate DEUREC svrat {
        eststo : qui logit `var' `independent' par_uni_educ female migration grade i.state i.year, vce(cluster year)
    }
    }
    
    noisily : esttab, se compress no type  ///
    keep (ue_rate n_ue_rate n_ue_rate_change p50 p75 p90 recession gdpgrowthrate DEUREC svrat)
    
    esttab using "latex\tables\majorshares_comparison_logit.tex", se compress no type ///
    keep (ue_rate n_ue_rate n_ue_rate_change p50 p75 p90 recession gdpgrowthrate DEUREC svrat) replace
    ...


    What I would like to do is either delete all empty cells or 'compress' all coefficients in one column for each outcome.

    I already tried https://www.stata.com/statalist/arch.../msg00636.html but I'm not sure if it works for multivariate regressions ( i get a factor variable error).

    Maybe there is an easier way, e.g. merging the tables via outreg?



    Any help is very much appreciated!

    Thank you
    Andi

  • #2
    If anyone has the same problem, I found a solution: https://stackoverflow.com/questions/...r-esttab-stata.
    Another solution is to use a visual representation using the coefplot command.

    Comment

    Working...
    X