Announcement

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

  • Harmonic regression for seasonality analysis

    Hi,
    I have collected data on water quality parameters (total coliform, faecal coliform, pH, TDS, and NO3) and temperature and rainfall for 2 months interval in a year. I want to see the seasonal effect ( of temperature and rainfall) on water quality parameters. In this case, harmonic regression is widely used to see the seasonality but in stata I did not find specific harmonic regression command.
    Q. 1. How to run (command) harmonic regression/trigonometric regression in stata with my existing data structure?
    Q. 2. Are these two regressions give the same results?
    Thanx.
    Last edited by MEHEBUB RAHAMAN; 22 Apr 2020, 16:05.

  • #2
    From my experience with water quality measures (not parameters in the statistical sense!) pH is fine as it arrives but bacteria counts, TDS (total dissolved solids for all those readers who think that Statalist is just for economists) and NO3 (school chemistry should make that clear) are often better treated on logarithmic scales.

    It is for StataCorp to say why they do not offer a specific command in this territory but from my perspective you don't need one as once appropriate sines and cosines are generated as predictors you then just call up regress --- or in this context more usefully glm.

    https://www.stata-journal.com/articl...article=st0116 is a riff on that theme.

    That said, I am not especially clear what you intend here. My experience with this technique is that you may use sine and cosine of time of year. Given temperature and rainfall as predictors too there are then several possibilities including

    1. Responses at a station on a river depend in principle on all conditions upstream. In a big basin (catchment, watershed) that is a big deal.

    2. Similarly there can be time lags. The dependence of water quality on rainfall can be especially complicated.

    3. As the effect of temperature and rainfall can vary with time of year -- and each other -- the mix of (a) temperature and rainfall (b) time of year (c) interactions is up for discussion.

    Comment

    Working...
    X