1
$\begingroup$

I've got two time-series, S (stress in a railway track) and T (temperature). The time-series are several months long. The relationship is linear, however, it can change subtly or 'jump' at some points, due to work done on the rails.

Currently, I'm doing linear regression on a per-day basis, and then temperature-correcting S based on that days models. However, changes in the relationship do happen within each day, so this is not perfect.

I guess I'm trying to figure out how to best fit multiple linear models between S/T over time. How would I go about doing that? I've just started out with R, though I'm also good with Python.

$\endgroup$
  • $\begingroup$ So, in R parlance you're doing something like lm (S ~ T, data=X) where X is the data for one day? And the relationship between S and T changes at irregular intervals because of repair work and also changes throughout each day? The changes that take place during the day are due to what? (That is, the temperature changes during the day, but what else affects it? Precipitation, who-knows-what, rail traffic?) If you know what causes the changes within each day, you may be able to add that to your model. Knowing some more details would help shape an answer. $\endgroup$ – Wayne Mar 2 '12 at 13:24
1
$\begingroup$

It appears that you have two distinct questions. The first concerns modelling/detecting the presence/timing of unspecified deterministic events. This is handled by extending your model to include empirically identified Pulses, Level Shifts , Seasonal Pulses and or Local Time Trends. The second part of your question evokes the need for a composite model that has both intra-day and inter-day structure. This is handled by constructing a daily model and then incorporating the daily series as a predictor for the hourly data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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