Analysing time series with seasonal effects at multiple frequencies - r

I am trying to find my way around in the different R time series packages.
My data series consists of hourly prices for around 7 years. The rows are the days, and every row has 24 hourly values.
I know that there are daily effects, weekly effects and longer seasonal effects. I want to run forecasting models like ARIMA. However most models (and ts objects) only allow a single frequency for seasonal effects. This is for example the different hourly averages per month.
Which models can I use, and what form should I store my data in to use them?

Related

Forecasting Daily "Count" Data in r

I am trying to fit a time series model on daily data for 2 years. Data is related to daily count of something. I have 731 records (as it includes leap year as well).
I have been using ARIMA Model in r but the forecast are very off. Is there any specific algorithm that takes care of daily data?
Also the forecast can not be in fraction as its the count data. It is always integer.
Any help is appreciated!

Forecasting panel data and time series

I have a panel data set of lets say 1000 observations, so i=1,2,...,1000 . The data set runs in daily basis for a month, so t=1,2,...,31.
I want to estimate individual specific in R:
y_i10=αi+βi∗yi9+γi∗yi8+...+δi∗yi1+ϵit
and then produce density forecasts for the next 21 days, that is produce density forecasts for yi11,yi12 etc
My questions are:
Can I do this with plm package ? I am aware how to estimate with plm package but I do not know how to produce the forecasts.
Would it be easier (and correct) if I consider each observation as a separate time series, and use arima(9,0,0) for each one of them, and then get the density forecasts ? If so, how can I get the density forecasts ?
In (2.) , how can I include individual specific effects that are constant over time ?
Thanks a lot

Auto-ARIMA function in R giving odd results

I have a day level dataset for 3 years,
I ran auto.arima() in R on it for simple time series forecasting and it gave me a (2,1,2) model.
When I used this model to predict the variable for the next 1 year the plot became constant after a few days, which can't be correct
As I have a daily data for 3 years, and a frequency of 364 days, is ARIMA incapable of handling daily data with large frequencies?
Any help will be appreciated
This sounds like you are trying to forecast too far into the future.
The forecast for tomorrow is going to be accurate, but the forecast for the next day and the day after that are not going to be influenced much by the past data and they will therefore settle around some constant when trying to forecast too far into the future. "Too far into the future" probably means two or more time points.
Lets say you have data up until time point T+100, which you used to estimate your ARIMA(2,1,2) model. You can "forecast" the value for time T+1 by pretending you only have data until point T and use your ARIMA(2,1,2) model to forecast T+1. Then move ahead by one period in your data and pretend you only have data until time T+1 and "forecast" T+2. This way you can assess the forecasting accuracy of your ARIMA(2,1,2) model, for example by calculating the Mean Squared Error (MSE) of the "forecasts".

forecasting time series by updating in R

I'm working on time series with a monthly demand for 5 years in R. Currently, I'm using naive method to forecast 12 months (h=12)and it does work very well I want to forecast only for one month (h=1) (always with naive method) and then include this predicted value to time series and repeat this process 12 times. For example:
get forecast for January 2013
include this predicted value to time series
apply naive method for the new series
My time series is not stationary and has a trend and seasonality.
What I'm looking to do is to forecast using Naive but step by step (month by month) with updating my time series each step. How can I do that?
Surely you will get the same answer. The naive method uses the most recent observation as the forecast. So your first forecast will be equal to the last observation. Your second forecast will be equal to the first forecast, and so is also equal to the last observation. And so on.
In any case, what you describe is precisely how almost all time series forecasts work. It is called the recursive method of forecasting, where predicted values take the place of observations as you forecast further ahead. In the forecast package for R, all purely time series forecasts are created this way.

R: Generate a Seasonal ARIMA time-series model using parameters of existing data

I have a count time series data which I'm able to use to determine the parameters of the underlying stochastic process. For example say I have a SARIMA (p,d,q)(P,D,Q)[S] seasonal ARIMA model.
How do I use this to generate a new count time series data set?
Being even more specific: a SARIMA(1,0,1)(1,0,0)[12] - how can I generate a time series for a 10 year period for each month? (i.e., 120 points to estimate the number of 'counts'.)
Use simulate.Arima() from the forecast package. It handles seasonal ARIMA models whereas arima.sim() does not.
However, ARIMA models are not suitable for count time series as they assume the process is defined on the whole real line.

Resources