STL Decomposition Error in R -


i have problem here. have imported data set r studio. when wanted stl decomposition, error came out "only univariate series allowed". how can overcome problem?

this code convert data time series data.

data<-ts(ts,start=c(1970,1),end=c(1980,12),frequency=12)

   jan    feb    mar    apr    may    jun    jul    aug    sep 

1970 324.60 325.57 326.55 327.80 327.80 327.54 326.28 324.63 323.12 1971 326.12 326.61 327.16 327.92 329.14 328.80 327.52 325.62 323.61 1972 326.93 327.83 327.95 329.91 330.22 329.25 328.11 326.39 324.97 1973 328.73 329.69 330.47 331.69 332.65 332.24 331.03 329.36 327.60 1974 329.45 330.89 331.63 332.85 333.28 332.47 331.34 329.53 327.57 1975 330.45 330.97 331.64 332.87 333.61 333.55 331.90 330.05 328.58 1976 331.63 332.46 333.36 334.45 334.82 334.32 333.05 330.87 329.24 1977 332.81 333.23 334.55 335.82 336.44 335.99 334.65 332.41 331.32 1978 334.66 335.07 336.33 337.39 337.65 337.57 336.25 334.39 332.44 1979 335.89 336.44 337.63 338.54 339.06 338.95 337.41 335.71 333.68 1980 337.81 338.16 339.88 340.57 341.19 340.87 339.25 337.19 335.49 oct nov dec 1970 323.11 323.99 325.09 1971 323.80 325.10 326.25 1972 325.32 326.54 327.71 1973 327.29 328.28 328.79 1974 327.57 328.53 329.69 1975 328.31 329.41 330.63 1976 328.87 330.18 331.50 1977 330.73 332.05 333.53 1978 332.25 333.59 334.76 1979 333.69 335.05 336.53 1980 336.63 337.74 338.36

when ran stl decomposition code:

decomp<-stl(data,s.window="periodic")

this error came out:

error in stl(data, s.window = "periodic") : univariate series allowed


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -