Announcement

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

  • Outreg2: type mismatch error

    Hello,

    I ran this code:

    reg ln_ipo_trust_amt_mn und_goldstar inv_sent $year, vce(rob)
    est store m1

    reg ln_ipo_trust_amt_mn und_goldstar inv_sent $spac $year, vce(rob)
    est store m2

    Then ran the following code to export the output:

    outreg2 [m1 m2] using "Results/reg_result_v2", excel replace ///
    dec(3) label ///
    ctitle("Model 1" "Model 2") ///
    alpha(0.01, 0.05, 0.10) symbol("**", "*", "+") ///
    keep(ln_ipo_trust_amt_mn und_goldstar inv_sent) ///
    addtext(Incorp. Location FE, "YES", SPAC-HQ FE, "YES", Year FE, "YES")

    But I get the error message:

    type mismatch
    r(109);

    est dir shows the two regressions in memory.

    I am working with stata 18 and I am not sure what the problem is. The syntax looks good.

    Please help me if you have an idea.

  • #2
    outreg2 is from SSC (FAQ Advice #12). Eliminate the quotation marks within -symbol()-.

    Code:
    ... symbol(**, *, +) ...
    Otherwise, you can look at where some code fails using

    Code:
    set trace on

    Comment


    • #3
      Thank you for the update. That was the problem.

      Comment

      Working...
      X