Announcement

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

  • Type mismatch and outreg2

    Dear All,

    I am trying to obtain the results of a regression by making use of the following commands on Stata 14.0.:

    quietly xtreg dm d.iad d.rmp nber_crisis, fe
    estimates store fixediad0
    outreg2 using nolag.xls, e(sigma_u sigma_e rho N rmse theta r2_o r2_b r2_w) se dec(8)
    quietly xtreg dm d.iad d.rmp nber_crisis, re
    estimates store randomiad0
    outreg2 using nolag.xls, e(sigma_u sigma_e rho N rmse theta r2_o r2_b r2_w) se dec(8)
    hausman fixediad0 randomiad0

    I am able to obtain the results of the first outreg2, but when I run the second outreg2, which is aimed to capture the results of the random effects model, I obtain the following error message:

    type mismatch
    r(109);

    I double checked for typing mistakes, but there seem to be absent.

    I run two similar regressions:

    quietly xtreg dm L.dm d.gdpv L.d.gdpv d.rmp L.d.rmp nber_crisis, fe
    estimates store fixedgdpv
    outreg2 using onelag.xls, e(sigma_u sigma_e rho N rmse theta r2_o r2_b r2_w) se dec(8)
    quietly xtreg dm L.dm d.gdpv L.d.gdpv d.rmp L.d.rmp nber_crisis, re
    estimates store randomgdpv
    outreg2 using onelag.xls, e(sigma_u sigma_e rho N rmse theta r2_o r2_b r2_w) se dec(8)
    hausman fixediad randomgdpv

    but there is no such type of error.

    I am wondering, but I am probably wrong, that the problem has to do with the variables.

    Any suggestion will be strongly appreciated.

    Thank you.

  • #2
    Dear All,

    I solved the problem. By using ereturnlist I noticed that the scalard do not include theta and if I exclude it from the list of the information provided by outreg2 it works.

    When I ran the regressions without quietly I received a warning to check for the existence of theta, which seems to create a problem when I, instead I am using it..

    Comment

    Working...
    X