PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, October 6, 2022

[FIXED] How should I get the forecasted values in R using Arima Model?

 October 06, 2022     analytics, arima, forecasting, r, statistics     No comments   

Issue

I am new to R so doesn't know how exactly the forecasting works in R using Arima Model. I have a dataset is like: 92 Aug-17 9533 93 Sep-17 8718 94 Oct-17 2035 95 Nov-17 2539 96 Dec-17 1333 97 Jan-18 2444 98 Feb-18 9371 99 Mar-18 9697 100 Apr-18 3989 101 May-18 4061 102 Jun-18 2797 103 Jul-18 2949

I want see the forecasted values for next 12 months by using arima model in R. So how should I achieve this.

Thanks in Advance. this is a dataset


Solution

Suppose you have fitted your ARIMA model in fit

so you can use the following method for predicting values. Here n is the number of values you want to predict. In your case, n will be 12.

pred = predict(fit,n.ahead = 1*n)

If you are taking log of values during ARIMA modeling so you use the following method for actual output.

values = 2.718^pred$pred


Answered By - girijesh96
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing