Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are asking a lot of <code>auto.arima()</code> to find a model using only two months of data. At least help it out a little by suggesting a seasonal difference. Further, don't use <code>predict</code>. The <code>forecast</code> function is much nicer. </p> <p>For reasons why <code>forecast()</code> is "nicer", see the <a href="http://www.jstatsoft.org/v27/i03/paper" rel="nofollow noreferrer">Journal of Statistical Software of July 2008</a>, in particular section 4.4:</p> <blockquote> <p>The forecast() function is generic and has S3 methods for a wide range of time series models. It computes point forecasts and prediction intervals from the time series model. Methods exist for models fitted using ets(), auto.arima(), Arima(), arima(), ar(), HoltWinters() and StructTS(). </p> <p>There is also a method for a ts object. If a time series object is passed as the first argument to forecast(), the function will produce forecasts based on the exponential smoothing algorithm of Section 2. </p> <p>In most cases, there is an existing predict() function which is intended to do much the same thing. Unfortunately, the resulting objects from the predict() function contain different information in each case and so it is not possible to build generic functions (such as plot() and summary()) for the results. So, instead, forecast() acts as a wrapper to predict(), and packages the information obtained in a common format (the forecast class). We also define a default predict() method which is used when no existing predict() function exists, and calls the relevant forecast() function. Thus, predict() methods parallel forecast() methods, but the latter provide consistent output that is more usable.</p> </blockquote> <p>Try the following.</p> <pre><code>fit &lt;- auto.arima(sensor,D=1) LH.pred &lt;- forecast(fit,h=30) plot(LH.pred) grid() </code></pre> <p><img src="https://i.stack.imgur.com/7Z92d.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload