s-news
[Top] [All Lists]

How to Sum the Lengths of Plotted Lines in a Time Series Plot ?

To: "S-News List (E-mail)" <s-news@wubios.wustl.edu>
Subject: How to Sum the Lengths of Plotted Lines in a Time Series Plot ?
From: "Andrew White" <andrew_white@hmsa.com>
Date: Tue, 19 Aug 2003 13:17:53 -1000
Thread-index: AcNmqB3cZ4jeLGv8SXGWsi5n8TV3RA==
Thread-topic: How to Sum the Lengths of Plotted Lines in a Time Series Plot ?
I am interested in estimating the "complexity" of any time series trend line in 
terms of its "cumulative trend-line distance". 

I need help in how to calculate the "cumulative distance" or sum of lengths of 
individual lines connecting each data point to its next data point - like 
tracing the (jagged) time series plot line with your finger and measuring the 
total length traced.

Consider a regular time series plotted using ts.plot()

The index of complexity I am toying with would use as a reference the Minimum 
Length where each data point would have the same value across all time periods 
(observation points): a straight horizontal line. The Maximal Length would then 
be where maximal data value variability occurs between every adjacent data 
point in the series (sorta like a massive earthquake). Intermediate lengths 
would represent intermediate forms of time series data variability. 

Obviously I need to "stabilize" the data ranges being references and eliminate 
influences of scale. That comes later ..

But I am stuck initially with just how to use S-Plus commands to sum the 
sequential series of plotted time series plot lengths between adjacent points 
from the starting point to the ending point.

Anyone have a method and can suggest some S-Plus standard functions to 
accomplish this?
Many thanks in advance.

Andy White
Andrew N. White, Ph.D. - Manager Research Unit
Financial Reporting & Medical Economics Dept.
Hawaii Medical Service Association



<Prev in Thread] Current Thread [Next in Thread>