Thank you! I'll contact them.<div><br></div><div>Clearly I have more reading to do.</div><div><br></div><div>Aren<br><br><div class="gmail_quote">On Sun, Jan 9, 2011 at 10:10 PM, Ben Madin <span dir="ltr"><<a href="mailto:lists@remoteinformation.com.au">lists@remoteinformation.com.au</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">Aren,<div><br></div><div>You might have more luck on the R-sig-geo list. This looks like a mix of network analysis and point processes - </div>

<div><br></div><div>check out pgRouting, or look for routing algorithms</div><div>check out the sp package and then spatstat, network etc.</div><div><br></div><div>An approach (by no means the right or even a good one) is to think of it as a graph or MCMC problem, and consider the relationship between the events as probabilities that can be affected by distance. You are of course trying to create a complex spatio-temporal model like everyone, so there is a fair bit of literature out there. It probably pays to look at relevant articles in your field. </div>

<div><br></div><div>Once you have this clearer, I think you should be able to work out how to get the data into R - but it could either be as a data frame using spatial SQL to return attributes, or using readOGR if you need spatial objects in R</div>

<div><br></div><div>cheers</div><div><br></div><div>Ben</div><div><br></div><div> </div><div><br></div><div><br><div><div><div></div><div class="h5"><div>On 10/01/2011, at 2:50 PM, Aren Cambre wrote:</div><br></div></div>

<blockquote type="cite"><div><div></div><div class="h5">I have three datasets:<div><ol><li>Routes</li><li>Event type A that occurs along the routes (points)</li><li>Event type B that occurs along the routes (points)</li>
</ol>
<div>Both event types have several attributes, including a date/timestamp, sub-classes of each event type, and other meaningful attributes.</div>

<div><br></div><div>I'm trying to use statistical methods to check for certain relationships between event types A and B. They may influence each other (A may affect B and B may affect A). I also want to see if there's a relationship between subtypes. E.g., do events A.X or A.Y have a stronger impact on event type B?</div>



</div><div><br></div><div>I'd like to make heat density maps to help interpret the data, but I have two conceptual problems.</div><div><br></div><div><b>First problem is how to make the map.</b> The programmatically easy but slow way is to create a greedy algorithm to traverse every route. During traversal, create a point at each increment of distance X. An attribute of that point may be the number of qualifying events no more than distance Y from that point.</div>



<div><br></div><div>I may need to limit to events along the route I am traversing. E.g., if traversing route M looking for event type B, and I come across route N, the heat map for route M probably should not include events of type B along route N event if they are within Y distance from my current point.</div>



<div><br></div><div><b>Second problem is how to deal with all the permutations. </b>I could muck through the simple algorithm and make spiffy point maps, and with a little graphical wizardry, I could make the maps pretty. However, I need to do analysis over different time periods. E.g., does the relative intensity of week I's event type As along route M affect the occurrence of event type B on week I+1? How about event type A.X? A.Y? Do they have different effects over the same time period? I have between 3 and 9 years of event types A and B...</div>



<div><br></div><div>All the permutations (not simply combinations) of factors can really explode the complexity of this project.</div><div><br></div><div>To prevent wheel reinventing, are there already well-tread solutions to this problem? I've done some Google searches and am not coming up with much, so I guess I may not be using the correct lingo?</div>



<div><br></div><div>I know that I need to incorporate R into this at some point; my objective now is to get the data to a point where I <i>could</i> use R to analyze it.</div><div><br></div><div>Aren</div></div></div>
_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>

</blockquote></div><br></div></div><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div>