time series - ets() error in R -
i have time serie , when applying ets error dont know generated. timeserie not big or has no such big values.
do spot wrong?
> ts jan feb mar apr may jun jul aug sep oct nov dec 2005 22.84 21.58 21.93 25.25 28.69 30.63 34.47 28.72 36.49 34.77 40.65 2006 36.73 31.55 38.07 34.77 36.91 39.16 36.07 35.37 39.34 35.62 27.58 33.37 2007 37.11 33.32 34.09 34.64 21.05 41.60 36.52 37.63 42.66 38.17 39.26 39.95 2008 35.33 38.63 38.04 36.90 33.56 35.14 33.82 36.18 29.30 25.65 20.71 21.63 2009 17.12 19.02 22.48 24.42 16.94 19.75 24.56 22.55 16.68 17.86 20.83 18.41 2010 14.74 16.49 19.75 22.88 24.11 27.02 27.46 26.47 26.81 26.59 23.56 18.88 > fit = ets (ts) error in `-.default`(y, e$e) : non-numeric argument binary operator in addition: warning message: in ets(ts) : large numbers may cause numerical problems. try scaling data first >
thanks.
update traceback:
traceback: 7: nextmethod(.generic) 6: ops.ts(y, e$e) 5: etsmodel(y, errortype[i], trendtype[j], seasontype[k], damped[l], alpha, beta, gamma, phi, lower = lower, upper = upper, opt.crit = opt.crit, nmse = nmse, bounds = bounds) 4: ets(ts) 3: eval(expr, envir, enclos) 2: eval(i, envir) 1: sys.source(file = "1.r", envir = .raenv)
it appears ts variable wrong format.
mode(ts) // should "numerical" not "character"
after casting as.numeric worked.
Comments
Post a Comment