I'm trying to do a simple STL Decomposition but the function accuses that is not an univariate series. It does not make sense to me. I searched for answers elsewhere, but none helped me solve this problem. Can you help me?
Time series and stl in R: Error only univariate series are allowed
stl() decomposition won't accept univariate ts object?
pdtv <- ts(Prod, start=c(2006,9), freq=12)
pdtv
Jan Feb Mar Apr May Jun
2006
2007 2.957986 3.076377 3.032362 3.002684 2.998301 2.998301
2008 3.037797 3.058511 3.024955 3.003206 3.024000 3.024000
2009 2.465526 2.511370 2.460660 2.352522 2.337496 2.337496
2010 3.044934 3.092652 3.126031 3.126108 3.152243 3.152243
2011 3.066405 3.096732 3.259540 3.305672 3.364590 3.373816
2012 2.661912 2.450209 2.441621 2.447879 2.442005 2.442005
2013 3.274132 3.262601 3.305515 3.334852 3.338704 3.348022
2014 3.338500 2.932178 2.931838 2.929874 2.929874 2.950362
2015 3.253992 3.276724 3.266712 3.293284 3.293284 3.292635
2016 3.405285 3.305412 3.159213 3.140374 3.140374 3.116621
2017 3.462615 3.512385 3.592744 3.651052 3.719270 3.734618
2018 3.489051 3.494139 3.478237 3.469897
Jul Aug Sep Oct Nov Dec
2006 2.380385 2.380385 2.379928 2.379928
2007 2.963497 2.963497 2.963497 2.963497 2.963497 2.963497
2008 2.991359 2.991359 2.991359 2.991359 2.991359 2.991359
2009 2.340137 2.340137 2.340137 2.340137 2.340137 2.340137
2010 3.139452 3.139452 3.139452 3.139452 3.139452 3.139452
2011 3.373816 3.373816 3.373816 3.373816 3.373816 3.373816
2012 2.442005 2.452547 2.452547 2.452547 2.452547 2.452547
2013 3.348022 3.348022 3.348022 3.348022 3.348022 3.348022
2014 2.950362 2.950362 2.950362 2.950362 2.950362 2.950362
2015 3.292635 3.292635 3.292635 3.292635 3.292635 3.292635
2016 3.116621 3.116621 3.116621 3.116621 3.116621 3.087348
2017 3.735368 3.735368 3.759308 3.759308 3.759308 3.759308
2018
pdtv.stl = stl(pdtv)
Error in stl(pdtv) : only univariate series are allowed