ctmm-initiative / ctmm

Continuous-Time Movement Modeling. Functions for identifying, fitting, and applying continuous-space, continuous-time stochastic movement models to animal tracking data.
http://biology.umd.edu/movement.html
47 stars 10 forks source link

should we filter single record in data? #9

Closed xhdong-umd closed 7 years ago

xhdong-umd commented 7 years ago

In testing with Movebank data, I found this data cause some errors

1760349 Kruger Buffalo, VHF Herd Tracking, South Africa

Turned out some individual only have 1 record, like the 144 th individual. When there is only record, the diff function I used to calculate sampling time interval will return NULL and caused problems.

I can add code to filter this kind of problem, but I'm wondering if we should just remove this kind of records in as.telemetry step. Because this special case could cause more problems in other places, and I don't think this kind of data have much information needed.

chfleming commented 7 years ago

For now, nothing can be done with 1 location. But in the future, with a hierarchical model on the buffalo population, 1 location on 1 individual can be fed into a population distribution estimate. In some species, where autocorrelation timescales are long, 1 independent data point is actually quite valuable.

For the time being I think this should be filtered out of the Shiny app. For ctmm, I think as.telemetry should not fail but other functions (beyond plot) don't have to work on single individuals.

xhdong-umd commented 7 years ago

OK. If accepting 1 location in app doesn't require too many changes I'll just fix it. Otherwise I'll filter it out for now.

Update: fixed in app.