I have 2010-2017 annual sales and total assets data for 100 different companies from pharmaceutical, dyes, chemicals industries. I have following questions:

  1. kindly help with the best way to fill the missing values (for example some companies do not have data for 2009 and 2016, some companies do not have data for 2011 etc)
  2. how can i use time series modeling in R to fit a model for how (i) this year's sales depend on previous years' sales data for all industries and differences across industries and (ii) this year's total assets depend on past year's data for all industries and differences across industries
  3. lastly to fit a model sales at time t being dependent variable and sales of previous years+total assets of this and previous years as independent variables
  4. can we use normal sales and total assets values or normalize it through some ways

sample dataThanks, IP


1 Answer 1


This is a very broad question. It is typically better to split something like this into smaller questions that stand on their own.

  1. You can fit a model to the periods before the missing data point and forecast into the missing time period. Or do the same "backwards" from after the data point. Or take the average of the observation before and after the missing data point, which is linear interpolation. Or include multiple periods before and after, possibly weighted.

  2. I recommend an ARIMA model. Depending on what you want, a hierarchical model may be helpful. Hyndman & Athanasopoulos, Forecasting: Principles and Practice is a very good textbook.

  3. You could try regressing your data on previous explanatory variables, then running an ARIMA on residuals ("regression with ARIMA errors"). The auto.arima() function in the forecast package does this. "The ARIMAX model muddle" by Hyndman is useful reading.

  4. You can normalize or not. Try both, with a holdout data set, and see which one works better.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.