Announcement

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

  • "Year is not regularly spaced" r(198)

    Hi All,

    I am analysing unbalanced panel data with firm fundamental information by year over the period 1987 - 2023. Naturally firms IPO at later dates or cease trading at various stages over this period.

    I am running the following code;

    logit DivPayer idiosyncratic_volatility M2B Asset_Growth Profitability SIZE

    estimates store logit_model
    estimates table logit_model, eform
    xtset gvkey stata_date

    newey DivPayer Legislation_Dummy idiosyncratic_volatility M2B Asset_Growth sqrt_profitability SIZE, lag(2)

    However I get a

    "year is not regularly spaced
    r(198);"

    error when attempting to run the code. Any idea how to resolve this issue?

    Cheers,
    Flynn

  • #2
    As you have panel data, see newey2 from SSC. The documentation explains how the command handles missing data in the case of panel data. Note that newey implements linear regression with Newey and West standard errors, so you still have issues associated with running linear regression on a binary outcome.

    Code:
    ssc describe newey2

    Comment


    • #3
      Thanks Andrew, that seems to work. The only issue now is that my computer strangely crashes when running newey2, (its using 20+ GB of memory to run which seems very high). Cheers

      Comment

      Working...
      X