1
$\begingroup$

My background is in applied math, not stats, so forgive my nontechnical terms throughout. For a work presentation on Monday I have to prepare a brief example of forecasting time-series data with Bayesian techniques. In the past I did some probability on networks, percolation theory etc. and I've reread a lot of material on random walks on graphs, and Markov theory, and MCMC etc. I think I want to use OpenBUGS or JAGS or something similar (it's supposed to be using MCMC techniques).

I'm stuck on how to model this load data. Essentially I have hourly usage data that peaks at certain times during the day. There are some obvious trends in the data, like peaks during morning or night, but not middle of the day when people aren't home, or at night when everyone's asleep. That's on the day-scale. On the week-scale there are for example, those who have higher usage on the weekends, and maybe they're not home on Monday and Tuesdays so usage is particularly low. There are seasonal scales (so usage averages are lower/higher depending on the month of the year), and all sorts of random variations in the data, like when people are on vacation for example.

I might not manage to capture all of those phenomena. But in general, how should I model this? I mean, there's inherent state in the system, so I feel I might want to model load on Monday as a separate variable to load on Tuesday, etc. assuming the usage is a function of some weekly routine. But then I might be decoupling things that I shouldn't. I don't know how to go about this at all. I don't see where the Markov chain that I might model the system with (since the number of states seems to be small) can be coded into BUGS. I'm pretty lost here.

I was looking for a basic example that I can build on. I don't have time to read an entire book, so I'm kind of just looking to hack together something reasonable based off existing examples. I just need some nice plots and to show that the Bayesian approach can be better than just averaging (or something similar). It would also be nice to understand Bayesian modelling a bit better.

Any pointers would be appreciated.

$\endgroup$
  • 1
    $\begingroup$ Rather than OpenBugs or JAGS, you might consider STAN. It's probably the best open-source Bayesian software out there right now. mc-stan.org There are some worked examples and documentation here ... mc-stan.org/documentation Here are a couple of posts on hierarchical, bayesian time series ... groups.google.com/forum/#!topic/stan-users/izESdGw2Vhw tjo-en.hatenablog.com/entry/2015/08/18/120000 $\endgroup$ – Mike Hunter Nov 28 '15 at 17:41
  • $\begingroup$ @DJohnson, thanks. I'm not at all locked in on my software choice. I'll happily implement in something else, the main thing is getting my head around how to model my scenario. I'll check out your references. $\endgroup$ – bjorne Nov 28 '15 at 17:43
  • 2
    $\begingroup$ There's a basic AR example in this paper and the first two references (which you should be able to see even without access to the article) also relate to Bayesian time series models. You may be able to modify one of the models discussed in one of those papers to your purposes. More generally, Carter and Kohn (1994) describe Gibbs sampling for state space models and that might be particularly helpful for adapting teh specifics of your case. $\endgroup$ – Glen_b Nov 28 '15 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.