r - Plotting the overlay using an exponential smoothing of a time-series using `lines()` -


/ * I do not want to use R in the HoltWinters function, and I have used Holtwinters function But I really do not want to apply or copy the entire R code. Mainly I want to write a code, as a result we get the answer given by Holtwinters * *

I have the following code so far, but I'm not sure which function I should use 1 An exponential lubricating data (nhtemp) required for New Hampshire from 9 to 12, 1971 and the lines ()

  Plot overlay .ts (nhtemp) lines (nhtemp, col = "red") # plot.ts (nhtemp) to the same plot Gives it in the form !!   

I'm not sure how to overlay an exponential solubility of PS by using nhtemp lines () I do not want to try an forecast or statistics such as an external package, but I was trying the following for some experiments: I followed the instructions given in the following picture Tried but I found this error: Enter image details here

  & gt; Line (nhtemp $ fitted) Error in # lines (nhtemp $ fitted): Error in evaluating argument 'X' in choosing a method for function 'line': $ nhtemp $ fits error $: $ operator nuclear vector Is invalid for & gt; HoltWinters (nhtemp) # Error in the error (ts (x [1L: wind], start = start (x), frequency = f), seasonal: # time series does not have 2 or less duration   

Since your data set is not seasonal ( frequency = 1 ), you should be fit Should specify gamma = F , non-seasonal holt-winters. In the lines (nhtemp $ Fitted) (in your code), in any sense, as you do not have the fair value in the original data.

Therefore, to reproduce the example in the book, you have to move forward (which is basically just an exponential lubricant)

  plot (nhtemp) line (Holtwinters (NHTMPP, Gamma = F) $ Feet [, 2], col = "red")   

 Enter image details here

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -