0
$\begingroup$

I'm new to forecasting and time series though I'm working on a dataset with the aim to calculate future trends of electric vehicles ownership. Based on this data:

# A tibble: 11 × 4
    year     AT      BE      DE
   <int>  <dbl>   <dbl>   <dbl>
 1  2010 0.0341 0.00979 0.00414
 2  2011 0.177  0.0487  0.0534 
 3  2012 0.127  0.115   2.26   
 4  2013 0.205  0.102   0.206  
 5  2014 0.423  0.240   0.285  
 6  2015 0.544  0.269   0.389  
 7  2016 1.16   0.377   0.346  
 8  2017 1.54   0.494   0.734  
 9  2018 1.98   0.659   1.07   
10  2019 2.81   1.60    1.78   
11  2020 5.47   3.46    6.86    

Where AT, BE, DE are country codes for Austria, Belgium and Denmark. I want to forecast a trend from 2020-2035 on the ownership for these vehicles. The values represent the total percentage of electric cars relative to all registered vehicles in that country for the years 2010-2020.

I have computed the following:

1. elec <- ts(data[, -1], start=2010, end=2020)
2. elec_ft <- forecast(elec)

I find that the Point Forecast column does not change in value and remains the same. Why does this occur and how can I get forecasted predictions?

#Note The repeating values occur when I multiply the values by 100 as they are in the table below. When I do not do this, I get trendy forecasts for Belgium and Denmark but not for Austria.

Reproducible code:

structure(list(year = c(2010, 2011, 2012, 2013, 2014, 2015, 2016, 
2017, 2018, 2019, 2020), AT = c(0.0341191917407185, 0.177356295024186, 
0.127228737604882, 0.204599086207762, 0.42276111521808, 0.543739212810963, 
1.16198904826841, 1.53940747121226, 1.98389862357307, 2.81032012338881, 
5.47327860613168), BE = c(0.00979351995429691, 0.0487309151700553, 
0.114773516317445, 0.102218821729151, 0.240434141236, 0.269493566735431, 
0.377480566775425, 0.493710525499866, 0.659186638148145, 1.59745743473326, 
3.46300304401671), DE = c(0.0041416240526035, 0.0533995678931518, 
2.26046458794798, 0.20565270250581, 0.284837134480026, 0.389384919074261, 
0.345819796962729, 0.734310566915347, 1.06911161030285, 1.78033474340805, 
6.85903263419716)), row.names = c(NA, -11L), class = c("tbl_df", 
"tbl", "data.frame"))
$\endgroup$
9
  • $\begingroup$ Your code does not run, because you are applying forecast() to elec, which is a time series matrix and not a model (or multiple ones). Can you please edit it to include which forecasting model you fitted? $\endgroup$ Dec 14, 2021 at 12:20
  • $\begingroup$ @StephanKolassa Thank you for taking the time with my question. The code runs perfectly fine for me, although after looking at similar issues to mine. The explanation shifts towards the lack of seasonality in my data, as the trend already shows a majority increase for Austria. However, I was hoping that forecast would still create a predicted trend even for those values increasing. How should I model this most efficiently? $\endgroup$
    – me.limes
    Dec 14, 2021 at 12:28
  • $\begingroup$ This won’t work. It doesn’t account for explosion of electric car production that is to come $\endgroup$
    – Aksakal
    Dec 14, 2021 at 12:30
  • $\begingroup$ Please open a new R console and try to make your code run. It does not. Just look at your two lines of code: elec is a ts object, but forecast needs a fitted model. Please edit your code, then I will try to help. $\endgroup$ Dec 14, 2021 at 12:31
  • $\begingroup$ @StephanKolassa I have tried this as I believe this is what you mean by model; forecast(ets(ts(data[, 2], start = 2010, end=2020))) which gives a univariate modelling for a single code. But the issue still remains with the repeated values for Point Forecast $\endgroup$
    – me.limes
    Dec 14, 2021 at 12:41

1 Answer 1

3
$\begingroup$

Plotting your time series, we see that they are trended:

plot(elec)

elec

(Incidentally, that bump in DE in 2012 does not make sense. Could it be that your data are percentages of new registrations, not of all registered cars?)

Unfortunately, the trends are not clear enough, and have only started very recently. Thus ets() simply does not pick up on these trends, and instead picks single exponential smoothing - which has a flat line forecast.

You can force multiplicative trends through the model parameter:

forecasts <- apply(elec,2,function(xx)(forecast(ets(xx,model="ZMZ"))))

However, note that this will very quickly give you percentages that exceed 100%. So perhaps an additive trend makes more sense:

forecasts <- apply(elec,2,function(xx)(forecast(ets(xx,model="ZAZ"))))

This looks slightly more reasonable. But the question still really is whether exponential smoothing or any time series model is appropriate for data such as these, which are driven heavily by political influence. It's probably more useful to include statements by the major parties as to what they plan on doing to push electric cars. (A time series model is still a great idea as a benchmark, of course.) Alternatively, contagion-type models (like the Bass) might be useful - after all there are platform effects: more electric infrastructure will only happen with more electric cars on the road (or with political support), and this in turn will make more people consider buying electrical cars.

Alternatively, perhaps you want to start your time series later. Electric cars were still extremely niche in 2010, and almost as much in 2015. So it arguably is not very useful to include the early data in the forecast.

Finally, once you approach saturation points, you may want to take a look at models for , which can model percentage market shares.

$\endgroup$
6
  • $\begingroup$ These are all very interesting points! I agree that an increase in electrical cars is dependent on supply and demand, as well as for political reasons (reducing carbon emissions, neoliberalism and so forth.) I don't want to bother you too much on this - what exactly are contagion-type models? and thank you for the direction into compositional data as I'm usually working on market data. Thanks again for displaying to me how to draw inferences from the data, I will have to use this approach and look more into the models for ets. $\endgroup$
    – me.limes
    Dec 14, 2021 at 14:09
  • 1
    $\begingroup$ You could bolster this data with data about all vehicle ownership. $\endgroup$
    – bdeonovic
    Dec 14, 2021 at 14:15
  • 1
    $\begingroup$ On the Bass model see here. It's based on modeling technology adopters in different ways, with later adopters being more likely to adopt a new technology if they see more early adopters around them. The main question is whether you can reliably estimate the parameters with only 11 years of data, so perhaps you could do some kind of pooling. On compositional data, I personally like Synder et al. (2017). $\endgroup$ Dec 14, 2021 at 14:19
  • $\begingroup$ @bdeonovic could you please expand a little on this? I'm currently using the number of registered vehicles, is this any different? $\endgroup$
    – me.limes
    Dec 14, 2021 at 14:44
  • $\begingroup$ @me.limes sorry I didn't read the post closely enough, I don't think my comment adds anything new $\endgroup$
    – bdeonovic
    Dec 14, 2021 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.