Quarterly Timeseries in R

I have built a time series model in R for Quarterly data.

Data:
year Qtr1 Qtr2 Qtr3 Qtr4
2017 21000 22000 17000 19000
2018 20000 22000 18000 19000
2019 32000 30000 28000 26000
2020 25000 23000 24000 27000
2021 40000 12000

For year 2021 we have Qtr 1 and Qtr 2 data with totals. Qtr 1 is full quarter data whereas Qtr2 is 30 days of Q2 data.
Using this 30 days data I need to predict the entire Q2 results. What will be end value of that Q2.

I tried Holt winters

t_data<-ts(mydata1_subset$total,frequency = 4,start = c(2016,1),end = c(2021,2))	
t_data_timeseries_hw <- hw(t_data,seasonal="additive",
                           initial = c("optimal", "simple"), level = .95)

The result prediction am getting is from Q3 , Q4 etc..,But I need to get the prediction from Q2 and goes like Q3,Q4... is their a way to achieve this, any help would be greatly appreciated

Hello!

You need to exclude 2021Q2 from there input data. Should be c(2021,1)

1 Like

Thanks, Yes that should be done when we need to predict 2021Q2. But my question is we need to include few days of 2021Q2 to predict entire Q2,
Example:
we have data till Feb 30 of 2021, using that data we need to predict 2021Q2, i.e.., use Feb data to predict FEB,MAR,Apr(Q2)

Hi ksasi2k3,

If the data you have looks like the one showed in your first example, you will not be able to predict the entire quarter based on its beginning. This is a matter of granularity, you only have data for an entire quarter and that does not show you how the beginning of the quarter influences the end of the quarter.

E.g. Based on the data that you have, if you have a 30% increase in sales for the first month of Q1, how does that influence the 2^{nd} or 3^{rd} month?

You can't find you from the data you have. You can only predict the whole Q2.

@vlad_aluas Thank you! Couldn't have said it better myself.

Hi Vlad_aluas, thank you very much for the reply. Yes I understand the fact that 1st month data will not be sufficient to predict, but based on historical and current quarter actuals we can predict how Q2 will end. So I want to know whether their is any possibility in R to predict end of quarter using historical + available actuals of current quarter.
I am sure we can use daily data for current quarter .. example: if we have 1 month of data for current quarter ,we use that along with historical data to predict end of quarter. But I want to know any possibilities of doing the same in Quarterly predictions.

Any idea or workaround for above issue with Quarterly predictions

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.