Announcement

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

  • Display point estimates for multiple regressions of covariates in one column with outreg2.

    I am trying to create a balance table that compares differences between groups for multiple covariates. The headers of the columns should be similar to following:
    Covariate N Mean Estimates SE

    In the first two columns I display the frequency and the mean of the covariates:
    Code:
    outreg2 using table, tex replace sum(log) eqkeep(N mean) keep(`covariatesl')
    . So far so good.

    For column 3, I get the estimates and SE by:
    Code:
    for each covariate in `covariate'{
    reg covariate treatmentA
    outreg2 using table, append stats(coef se)
    }
    For column 3 and 4 I tried to use the outreg2 function again, however, for each covariate one separate column is added. However, my goal is to have one column that contains all the estimates and one column for the SE.

    1) Do you use outreg2 in that case or is it better to use another command? If outreg2, what did I do wrong/forget?
    2) Does the command need to be inside the loop?
    3) What command to use to remove the displayed column numbers (1), (2), (3), (4) that are automatically displayed when using outreg2.
    4) How can I add an additional shared title over columns 3 and 4 ("Panel: Treatment A")?

    Last edited by Penelope Smart; 03 Jun 2022, 17:34.

  • #2
    outreg2 is from SSC as you are asked to explain (FAQ Advice #12). The command is a dead end in terms of what you want as its -append- option is really a "merge" option. Try estout from SSC. Search the forum, there are examples.

    Comment

    Working...
    X