Get access to the elements of a list in R -


I want to get some special elements in a list that is returned by the prediction function in R.

My data is like this

  Predict point point 80 Hi 80 Lo 95 Hi 95 111 69894.82 62433.7449 77355.89 58484.0929 81305.54 112 69894.82 60130.1979 79659.43 54961.1218 84828.51 113 69894.82 58274.6632 81514.97 52123.3264 87666.30 114 69894.82 56677.0955 83112.53 49680.0575 90109.57 115 69,894.82 55252.8108 84,536.82 47501.8019 92,287.83  

I column "forecast would like to get number"

I have the following code to make your data Used:

  myts some time series data fit & lt; - auto.arima (myts) race & lt; - Forecast (fit, 677)  

Your data Name Race

  -2443.82541262374, -3 9 56.556330211 9, 1335.87883621 9 5, 3804. 02 514 9 78 9 0: which is the result of a list of 10 dput (race) as the following 9, -1364.6312311184, -360.5025178657 9 6, -286.1380180 9 3465, -2804.55786143203, -1201.73015351274, -1085.1353062 9 62 , 8688.02102637354, -5767.08772503892, 72 92.94004476998, -2310.33192585826, -13297676 1485 9 6 9, -4,561.073640 9 5336, 2552.742451461 32 99 0.51706250617, 2447.805 9 7742078, 15 9 6 9 .1761 9 00118, -12,064.2548110 9, -4186.6647008144 9, -6,343.9 5400053521, 3822.10 9 52,263,371), Ktispi = C "(" method "," model "," level "," mean "," lower "," x "," x name ", c. (1, 110, 1, class =" ts ")) , "Fitted", "residual"), class = "forecast")  

will do the job.

According to your comment, therefore, prediction is a real prediction and it does not always just mean.

  Using the data set taken from the library, consider the following example (forecast) birth and lieutenant; - Scan ("http://robjhyndman.com/tsdldata/data/nybirths.dat") Events at birth & lt; - ts (birth, fre quency = 12, start = c (1946,1)) fit & lt; - auto.arima (birthstimeseries) race & lt; - Forecast (fit, 12) plot (race)  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -