Thursday, November 17, 2005

Sinusoidal Regression

Today, I was going through my MRP folder to find an ancient cave painting of Grindor when I stumbled across the excel spreadsheet that will calculate sinusoidal linear regression. The formula is as follows:

For a given t and s, find the necessary b1, b2, and b3 so the equation

y = b1 + b2x + b3sin((x - s)/t)

will minimize the square difference between this function and the plotted points.


If anyone is bored enough to play with it, I've placed it here. I doubt this is incredibly useful unless you know the period (2πt) and cycle initial time (s) of your data. This was meant to be an optional forecast module, but the required inputs would be too different than the other formulas. Maybe I could make an algorithm that will find the optimal t and s. The s would not be too hard, because I could iterate through values between 0 and π/2 and find the closest. Finding an accurate period without knowing something else about the data might be an interesting, but probably fruitless adventure.

1 Comments:

At 9:57 PM, November 18, 2005, Blogger Andrew said...

You're a dork

 

Post a Comment

<< Home