简体   繁体   中英

weekly time series in r, arima

I have a data frame with the following column names.

"week" "demand" "product-id"

The problem is to convert it into a time series object.

week is a number like 3,4,5,6,7,8,9 etc., and demand is in units and product-id is unique.

I want to convert the week column into time series, so as to prepare for modeling.

I want to predict weeks 10 and 11 demand by using an ARIMA model. How do I do that?

myTS <- ts(mydataframe[-1], frequency = 52)

will convert your demand and productId to a timeseries of 52 observations per year. For more elaborate timeseries, check package xts . Also compare this post on weekly data with ts .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM