How do I "remove" the effect of a predictor which is highly correlated in a time series? I apologize in advance for any errors in terminology. Please let me know if you require further information.
I have time-series data in which a probe measures the concentration of oxygen in solution, over time. The probe also measures the temperature of the solution at each time point.
In this case, oxygen is being produced by a particular chemical reaction. It is also possible for us to probe a "null" experimental control by not inducing the reaction in the solution.
The problem is that the oxygen sensitivity of the probe also depends on the temperature of the solution, and during the experiment, temperature also changed with time.
What I have found is that the oxygen concentration is highly correlated with the change in temperature, but I what I would like is instead to find the "true" change in oxygen concentration, independent of the effects of temperature. How would I go about this?
EDIT: There appears to be a strong linear relationship between temperature and oxygen concentration.
I have considered doing a two-sample t-test between a reactionless control solution and a solution with the reaction. Assuming that both treatments are kept at the same temperature the entire time, would this method be appropriate for determining whether there is a statistically significant difference in oxygen concentration due to the reaction?
 A: This is really more of a question of experimental design and performance than of statistics. There at least needs to be a calibration of the oxygen-sensor output over a range of temperatures. If the manufacturer did not provide one then one must be determined experimentally; that would probably be best practice even if the manufacturer had been more forthcoming with a calibration.
For example, with the original Clark electrodes:

the [oxygen-dependent] reaction [leading to the sensor output] is diffusion-limited and depends only on the permeability properties of the membrane (which is ideally well characterized, the electrode being calibrated against known standard solutions) and by the oxygen gas concentration, which is the measured quantity.

So at the least the effect of temperature on the membrane oxygen permeability needs to be taken into account. In my (long-ago) experience such electrodes were used in very carefully temperature-controlled conditions and needed to be re-calibrated whenever the membrane covering the electrode was replaced.
Furthermore, the chemical reaction rate will presumably also be changing as the temperature changes. So even if you got accurate data with respect to the oxygen concentration, it would be hard to interpret in terms of the underlying oxygen-producing chemical reaction you were monitoring.
Statistical analysis can't overcome all deficiencies in experimental design.
A: You may want to consider doing a form of PCA on the correlated time series called SSA, as described in this Q&A:
Can PCA be applied for time series data?
This should remove any correlation between temperature and oxygen, and then allow you to model just changes in concentration of oxygen that are not explained by the correlation between temperature and oxygen.
There is a SSA package for R, but I haven't used it (yet):
https://cran.r-project.org/web/packages/Rssa/Rssa.pdf
And here is a good intro to SSA:
http://environnement.ens.fr/IMG/file/DavidPDF/SSA_beginners_guide_v9.pdf
