Announcement

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

  • regression with time trend

    Hi everyone,

    I have pooled cross-sectional dataset for 2009,2011,2012,2014 and 2017. I am trying to regress pooled OLS and want to include time trend.

    Issues are;
    1. the year has gaps.
    2. It is combined cross-sectional dataset and hence
    Code:
    tsset
    resulted in repeated time values in the sample.

    Is there any way to work around it?

    *also, this dataset is not panel so xtset is not appropriate as well.

    Thank you in advance!

  • #2
    I'm not sure I understand your data structure. When you say pooled cross-sectional data I understand that to mean that you have obtained cross-sections in the years you mention, and that means that different people (or firms, or whatever) are found in each of those cross sections. That would imply that there is no dependency structure in the data, so you can just run -regress- or -logit-, etc. on the combined data set without any special preparation. As for including time trend, if you truly mean a trend just add c.time to the list of variables. If what you mean is that you want to adjust for time-specific shocks then add i.time to the list of variables. No need for -tsset- or -xtset-, nor any other special tricks.

    If your data are not as I have described, then please post back with a clarification. Example data, posted using the -dataex- command, would probably be helpful in this context.

    Comment


    • #3
      Fuga:
      as an aside to Clyde's helpful insight, if your data don't have a time-series diemnsion (as it seems from your query), there's no scope in using -tsset- before running -regress- (if your regressand is continuous).
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        Clyde and Carlo,

        It was beautifully explained thank you very much.

        Comment

        Working...
        X