I'm trying to identify patterns among various "paths" like the following: http://i.imgur.com/bQPI3.png If I plot these, I can observe intuitively two different patterns: a front loaded (1 and 3) and a backloaded (2,4) progress path: http://i.imgur.com/L5qwZ.png I have thousands of observations like the above table, and I want to use R to identify clusters of these paths. I looked at spatstat, but it seems more relevant to points than paths. Thanks, bp [[alternative HTML version deleted]]
On Jan 5, 2011, at 5:24 PM, Benjamin Polidore wrote:> I'm trying to identify patterns among various "paths" like the > following: > > http://i.imgur.com/bQPI3.png > > If I plot these, I can observe intuitively two different patterns: a > front > loaded (1 and 3) and a backloaded (2,4) progress path: > > http://i.imgur.com/L5qwZ.png > > I have thousands of observations like the above table, and I want to > use R > to identify clusters of these paths. I looked at spatstat, but it > seems > more relevant to points than paths.You need some sort of distance measure. Perhaps get signed maximum deviation from a diagonal progress = (1:13)/13, Or you could classify by how wavy they were with max(dev.positive) - min(dev.negative) Or for a two-D measure, you could divide the bin x Percentage space into boxes and see which ones get entered. progress1 and progress 2 might enter mostly the digoanl boxes while progress 3 and 4 would be in the lower-right-hand corner. If you gave the boxes associated measures you could transform a trajectory back to the max(measure) paradigm. Alas, as I think about the possibilities I am reminded that the set of possible functions on the interval [0, 1] is infinite. But perhaps some sort of functional data analysis approach can put the pieces of my dashed hopes back together. Come to think of it, there _is_ an fda package: http://www.psych.mcgill.ca/misc/fda/ -- David Winsemius, MD West Hartford, CT
On Wed, 5 Jan 2011, Benjamin Polidore wrote:> I'm trying to identify patterns among various "paths" like the following: > > http://i.imgur.com/bQPI3.png > > If I plot these, I can observe intuitively two different patterns: a front > loaded (1 and 3) and a backloaded (2,4) progress path: > > http://i.imgur.com/L5qwZ.png > > I have thousands of observations like the above table, and I want to use R > to identify clusters of these paths. I looked at spatstat, but it seems > more relevant to points than paths.Hmmm. Is this what you are after? http://en.wikipedia.org/wiki/Functional_data_analysis It is a hefty topic. There is a substantial literature on characterizing curves. Just Google Functional Data Analysis for a start and look at the 'fda' and 'MFDA' packages. HTH, Chuck> > Thanks, > bp > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >Charles C. Berry Dept of Family/Preventive Medicine cberry at tajo.ucsd.edu UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901