Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted

## Sine function fitting

Hi,

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?

Thx
2 REPLIES 2
Highlighted
Level III

## Re: Sine function fitting

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.

Regards,

Mark
Highlighted
Level III

## Re: Sine function fitting

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
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
Article Labels

There are no labels assigned to this post.