Model creation using batch time series data

I have data that looks similar to the below example. I have time series data separated by batch. I would like the predict the "result" for each batch based on the other a number of variables, in the simple example below pH and glucose. If I pivot wider with the independent variables to get a value per predictor per day I get a ridiculously wide dataset with not very many batches. Therefore I was wondering if I can treat the data as time series to predict my target "result".

batch_data <- tribble(
  ~batch, ~day, ~ph, ~glucose, ~result,
  "A", 1, 6, 2, NA,
  "A", 2, 7, 1, NA,
  "A", 3, 8, 1, 5,
  "B", 1, 5, 4, NA,
  "B", 2, 5, 3, NA,
  "B", 3, 7, 2, 2,
  "C", 1, 4, 7, NA,
  "C", 2, 6, 5, NA,
  "C", 3, 8, 4, 8
)

With a large dataset of this shape, anything is possible. From simple testing to advanced time series analysis. If you struggle to determine the correct statistical method, I suggest looking at your model assumptions. For example, if the model assumes a normally distributed variable, plot the histogram and check if it looks like one, or do a hypothesis test of normality.

So the short answer is: Yes, you can treat the data as a time series. You have a date variable after all (assuming that you got multiple results per batch - not only one as shown in the example).

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.