1
$\begingroup$

I'm trying to evaluate a model for a time series, given many time series (plural). For example, i'm using the forecast package and in particular the ets function to forecast based on a time series.

My data was not continuously gathered, so I have around 50 sessions of 1-2 hours each, where each session was recorded on a different day.

How do I evaluate the parameters of a time-series model using multiple experiment sessions data? concatenating the time series is obviously not a good idea because the last samples of session k-1 have no affect on the first samples at session k.

This is a special case of an irregular time series, but I don't think it should be treated as one.

Here is an example code:

# original time series, one per recording session:
ts1 <- ts(rnorm(n = 10, mean = 1, sd = 1),start = as.POSIXct(1433679895,origin="1970-01-01"),frequency = 1)
ts2 <- ts(rnorm(n = 10, mean = 1.7, sd = 1.8),start = as.POSIXct(1433766295,origin="1970-01-01"),frequency = 1)
ts3 <- ts(rnorm(n = 10, mean = 1.5, sd = 1.3),start = as.POSIXct(1433852695,origin="1970-01-01"),frequency = 1)

# concatenate all time series to an its (irregular time series) object,     just as a way to represent the combined ts
library(its)
dates <- as.POSIXct(c(time(ts1),time(ts2),time(ts3)),origin="1970-01-01")
ts.all <- its(x = c(ts1,ts2,ts3), dates)

library(forecast)
ets.model <- ets(ts.all,model='ZNN',alpha = 0.3)

So the model assumes that this is a regular time series, even though it is not. Is there a way to iteratively evaluate the parameters of the model given multiple sessions of data?

This is actually a general question regarding time series analysis in chunks. This problem can happen with any analysis and any package.

$\endgroup$

0

Your Answer

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