Announcement

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

  • Seasonality

    I am dealing with monthly data on electricity production for two countries, and I need to deseasonalise it. So far I have created a variable for each month and I have regressed the variable on the month ( i am doing it for each country). After I use the predict function....is it correct ??
    This is what I am doing :

    regress hydro Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec if countrynum == 2
    predict hydroG if countrynum == 2, resid

  • #2
    We would normally take a month variable (1 to 12) and use factor variable notation: regress hydroG i.month if countrynum==2
    The factor variable notation helps particularly if you want to use the margins command after the regression (and if you have interactions).

    I don't think your approach works well. It forces the assumption that the hygro is the same in every year. It also throws away a ton of variation in hydro. Folks might include those dummies in the main equation rather than using them to predict the variable.

    There are several different methods for correcting for within-year patterns in data. You need to look at the literature to find them. I don't know which have been implemented in Stata.

    If you enter seasonal in the command line, it will bring up several relevant entries.

    Comment

    Working...
    X