Statistical Methods
Convert differences into rates on an irregular observation grid
Define the task
Start with one ordered series, a time unit and a measurement unit. Preserve the original coordinates. A lag of one means one row back and can represent different elapsed times in different parts of the series. Split the series at known resets and determine whether a missing scheduled reading creates a gap you can bridge.
Carry out the check
Difference the measurements and the times using the same pairs. Divide each measurement change by its elapsed time. Reject zero or negative elapsed times until the order and duplicates have been resolved. Use net change divided by total elapsed time when the question concerns the average rate over the whole observed interval. An unweighted mean of interval slopes gives each interval equal importance.
Worked hypothetical example
Hypothetical readings of 2, 6 and 12 units at hours 0, 1 and 4 give interval rates of 4 and 2 units per hour. The elapsed-time-weighted rate is 10/4 or 2.5 units per hour. The simple mean of the two slopes is 3. Both omit fluctuations between readings. State which quantity your report uses.
Method checked 10 November 2026 against R documentation: Lagged Differences.