Subscribe Bookmark RSS Feed

Sine function fitting


I have an excel spreadsheet that I loaded into JMP. I wish to fit the XY data to check seasonal effect via a Sine function fitting. I'm not sure how I can do this. Any suggestions?


Community Trekker


Jun 23, 2011

Quote from From Bowerman and O'Connell, "Forecasting and Time Series: an Applied Approach", 1993, 3rd edition, page 324:

"...the authors feel that dummy variable regression (and other methods presented later) are usually superior to trigonometric models for modeling seasonal variation. This is because dummy variable models (and other techniques) use a different parameter to model the effect of each different season in a year".

The "other methods" they refer to are formal time series model, like ARIMA. JMP has the capability to fit time series models, but they can be quite complicated. I'd try the dummy variable method first, then venture into ARIMA models if you need more complexity.



Community Trekker


Jun 23, 2011

If you wish to try the sine function approach (e.g. don't have regularly spaced data for time series), and you want to forego the other advice about dummy variables...

Given a date "date_col" in each row

Make two columns
Sine((Day Of Year(:date_col) / 365) * (2 * Pi()))
90 degrees offset Sine
Sine((Day Of Year(:date_col) / 365+ 91 / 365) * (2 * Pi()))

Add these to fit model, evaluate significance.
If significance is found, use the coefficients and simplify down to a single function by setting the phase offset

Whichever method is selected, if you suspect seasonality- be sure to review residuals by day of year