Sales person performance prediction I am trying to predict/forecast salesperson performance weekly, monthly, quarterly, and yearly based on the products that they sold over 3 years. As part of this effort, I grouped their number of units sold by the state, location, stores, product types, and sale dates.

By using this information I grouped their id and month of sales and number of units sold. Example data is shown below.

For ARIMA modeling, does this format work well enough to predict/forecast salesperson performance weekly, monthly, quartely, and yearly?

Id      Month   Units
65381   201703  467.0
65381   201710  3.0
65381   201712  6.0
65381   201803  20.0
65381   201805  2.0
65381   201807  20.0
65381   201812  16.0
65381   201904  2.0
Here is a simple way of fitting a linear model to each salesperson by week, month and quarter. You'll need to extract the week, month and quarter from the date using the lubridate package.

library(lubridate)
library(tidyverse)

#create fake data
n_var &lt;- 50
id &lt;- sample(x=seq(from=1,to=4),size=n_var,replace=TRUE)
dte &lt;- sample(seq(as.Date('2018/01/01'), as.Date('2019/01/01'), by="day"), size=n_var)
sales &lt;- runif(min=0,max=25,n=n_var)

sales_data &lt;- data.frame(id,dte,sales) %&gt;% 
  mutate(
    weeknumber=week(dte),
    month=month(dte),
    qtr=quarter(dte)

  )

#fit an OLS model
ols_model &lt;- sales_data %&gt;% 
  group_by(id) %&gt;% 
  summarise(
    week_model=list(lm(sales~weeknumber)),
    month_model=list(lm(sales~month)),
    qtr_model=list(lm(sales~qtr))
    )

#extract coefficients
ols_model$week_model[[1]]$coefficients
ols_model$month_model[[1]]$coefficients
ols_model$qtr_model[[1]]$coefficients

ols_model$week_model[[2]]$coefficients
ols_model$month_model[[2]]$coefficients
ols_model$qtr_model[[3]]$coefficients

#simple version on one id
df &lt;- sales_data %&gt;% 
  filter(id==1)

mod &lt;- lm(sales~qtr,data=df)
mod$coefficients