Skip to content
Prev 310422 / 398506 Next

Breakpoints and non linear regression

On Fri, 9 Nov 2012, thomas88 wrote:

            
I would probably first try whether the following leads to reasonable fits

Y(t) = A * exp(b * t) * H(t)

i.e., a multiplicative model with an exponential trend and some harmonic 
trend. By taking logs you then get

log Y(t) = log(A) + b * t + log(H(t))
->
log(Y(t)) = a + b * t + h(t)

so that you can fit a model with a linear trend plus harmonic season to 
the log-series. And, of course, the harmonic trend can then be built up up 
sin/cos at different frequencies and you could fit the whole thing as a 
linear model to the log-series.

It's not quite the same model that you propose above but might be an 
approach worth exploring. You could also look at the "bfast" package which 
has a function bfastpp() for setting up trend and harmonic season for a 
time series. And it also allows for iterative fitting of separate trend 
and season breakpoints in the time series.

hth,
Z