# Differencing weekend fluctuations with R?

Suppose a time-serie like this on the left-top corner with weekend and daily fluctuations. This time-series need differencing due to the rising ACF (bottom-left) and portmanteau tests' p -values too small, the weekend must be differenced away. Now I want to differentiate away the weekend-fluctuation in R, how to do that? This puzzle is from the lab here (sorry not in English), data here.

(translation: aika/vrk = time/day, kulutus=consumption)

My ideas (silent discussion here):

A) Friday-Monday -average for the weekend fluctuating values

B) create some sort of PID -controller and differentiate with that info

C) ?

Possible tools in R

1. nls()-lm()-diff() -problem?

2. diffinv()?

Some References

1. Load Forecasting -paper by Eugene A. Feinberg: www.almozg.narod.ru/bible/lf.pdf
• This is a typical load forecasting problem. The seasonal terms are hour-of-the-day, day-of-the-week, week-of-the-year, holidays, economic activity, temperature, etc. Notice the general rise in load in the top/left graph as temperature droops in the top/right graph. Do a Google search for "forecasting electrical loads" and you'll get all sorts of information. Also, search this site for other answers on electrical or power modeling/forecasting. – bill_080 May 7 '12 at 19:45