Any plan to visit Southampton soon? Maybe then I can have a chance to be talked through some of the clever stuff you don’t stop doing. I’m getting closer to conduct my sensitivity analysis so expect more bugs from this end.
Check you later,
Rich
________________________________ De : Guy Abel À : rkapend@yahoo.fr Envoyé le : Mardi 15 janvier 2013 16h26 Objet : [New post] tsbugs Package
WordPress.com gjabel posted: “My tsbugs package has gone up on CRAN. The functions are aimed to automate the writing of time series models to run in WinBUGS or OpenBUGS. I created these functions a while back when I was doing some work on model averaging for time series models. I foun”
I think that the likelihood for the forecast period (98-107) already has been made by this part:
#likelihood
for(t in 3:107){
y[t] ~ dnorm(y.mean[t], isigma2)
}
Then the y values for the forecast period (98-107) are copied into a new variable y.new just to make it ieasier to plot the forecast separately using fan(ynew.pn).
I think our code for the forecasts are broadly equivalent. Both of our stochastic y.new[t] is generated from the same time dependent mean and variance as my y[t]. However, in the BUGS model I have only set up random nodes for future values once (in the first for loop of the BUGS script, where WinBUGS or OpenBUGS will see the NA’s in the data as missing) and then relabeled them in the forecast chunk of the BUGS code. This works, as using the ar.bugs function the data is modified to add on the right amount of NA’s at the end of the series so BUGS treats them as random nodes (in the top loop). You can see the data (that is used in the data argument on the R2OpenBUGS bugs command) by entering ar2$data into the R console. If I did not modify the data, then I would need a new loop for forecasted values (like the one you propose). Hope this makes sense?
This is very useful package and less time consuming. I am interested in non-normal time series models like Poisson. Is there any plan to extend this package to handle such data.
Thanks
Awesome package! Is there an extension to the package to perform multivariate SV modeling? i.e., similar to the method described in Meyer & Yu (2006). Thank you!
Not at the moment. I have the code to run the models, but I have not incorporated them into the package. Just slapped all the package files up on github if you want to contribute… https://github.com/gjabel/tsbugs. The multivariate models are going to be in fn_tsbugs4.R
Speechless! Anyway, well done mate.
Happy new year Guy!
Any plan to visit Southampton soon? Maybe then I can have a chance to be talked through some of the clever stuff you don’t stop doing. I’m getting closer to conduct my sensitivity analysis so expect more bugs from this end.
Check you later,
Rich
________________________________ De : Guy Abel À : rkapend@yahoo.fr Envoyé le : Mardi 15 janvier 2013 16h26 Objet : [New post] tsbugs Package
WordPress.com gjabel posted: “My tsbugs package has gone up on CRAN. The functions are aimed to automate the writing of time series models to run in WinBUGS or OpenBUGS. I created these functions a while back when I was doing some work on model averaging for time series models. I foun”
Hi Rich, Yep, coming over next week. I will come by for a chat. Guy
I expected that the code for prediction to be:
#forecasts
for(t in 98:107){
y.new[t] ~ dnorm(y.mean[t], isigma2)
}
and not the outcome code:
#forecasts
for(t in 98:107){
y.new[t] <- y[t]
}
Is this a bug or I missed something?
Thanks, great tool!
Pablo
I think that the likelihood for the forecast period (98-107) already has been made by this part:
#likelihood
for(t in 3:107){
y[t] ~ dnorm(y.mean[t], isigma2)
}
Then the y values for the forecast period (98-107) are copied into a new variable y.new just to make it ieasier to plot the forecast separately using fan(ynew.pn).
Thanks Pablo.
I think our code for the forecasts are broadly equivalent. Both of our stochastic y.new[t] is generated from the same time dependent mean and variance as my y[t]. However, in the BUGS model I have only set up random nodes for future values once (in the first for loop of the BUGS script, where WinBUGS or OpenBUGS will see the NA’s in the data as missing) and then relabeled them in the forecast chunk of the BUGS code. This works, as using the ar.bugs function the data is modified to add on the right amount of NA’s at the end of the series so BUGS treats them as random nodes (in the top loop). You can see the data (that is used in the data argument on the R2OpenBUGS bugs command) by entering ar2$data into the R console. If I did not modify the data, then I would need a new loop for forecasted values (like the one you propose). Hope this makes sense?
Thanks!
Basically you are following the forecasting style of arima() function in R.
Thanks a lot for making this package! This certainly lowers the threshold for using MCMC modelling for a lot of users.
This is very useful package and less time consuming. I am interested in non-normal time series models like Poisson. Is there any plan to extend this package to handle such data.
Thanks
Thanks Mudassar. Not at the moment, although I have been meaning to move development to my github to allow others to contribute.
Awesome package! Is there an extension to the package to perform multivariate SV modeling? i.e., similar to the method described in Meyer & Yu (2006). Thank you!
Not at the moment. I have the code to run the models, but I have not incorporated them into the package. Just slapped all the package files up on github if you want to contribute… https://github.com/gjabel/tsbugs. The multivariate models are going to be in fn_tsbugs4.R