For each day, I observe my variable,
y(t), for a period of 12 hours. In order to understand the data and make predictions, I want to put together these data and make a long timeseries data. Now, if I fit an
AR(1) model to the data, or even do kalman filtering on data as explained later,it would mean that my first reading on a day depends on the last reading of the previous day, which is meaningless in my context.
Question how can I stop the last value of previous day to influence the first observation of new day?
What I've done:
So I have put
NA s of the same length of each observation data (12) in between any two days to preserve the seasonality. But I have trouble understanding the consequences of this:
- upon seeing these NA's, will
arima()ignore the NA's, practically doing the same thing I'm trying to avoid?
- will it try to interpolate the values, which again means constructing the same series?
Now if it is represented in state-space format, the system would just update the state equation (interpolating 'NA's?). But after updating it for 12 times before reaching the next non-missing value, would the state vector be a reasonable value?
All the computations are done in R.
EDIT, clarification: Assume for each day, I'm collecting data from 1 pm to 12 am. Ideally, for each day, what I want to get at is a model of type $y(t) = \phi y(t-1) + \beta y(t-12) + v(t)$. now If I have a continuous timeseries, then $y(13) = \phi y(12) + ...$ where $y(12)$ is the last value from previous day. Now, in my context, it is meaningless for data on 1pm to depend on 12 am value of last day, but it's reasonable for 3pm data to be dependent on 2 or 1pm, or on 3pm data from previous day(s).
Also assume that for the first 2 hours of each day, I don't need to forecast them.