-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unmarkedFrame
class for continuous-time models (unmarkedFrameContinuous
)
#269
Comments
Thanks, this is great. I'm still thinking it through but here are a few thoughts.
Just trying to poke around the model ease-of-use/flexibility trade-off here. |
I based my proposition on relational database principles, focusing on data integrity with no-duplicates, so I’m not surprise it’s not the most user-friendly, and I absolutely agree that we should find a better trade-off between ease-of-use and flexibility! Regarding
|
Hi! For continuous-time models, we need a new
unmarkedFrame
class. I thought that we could create a subclass ofunmarkedFrame
(e.g.unmarkedFrameContinuous
) as a base, and then add subclasses of this class for specific models. Here are my proposed specifications for this class.What data do we need?
For each detection event, we absolutely need:
The time of the detection
The site id
The deployment id. A deployment = a unique spatial and temporal placement of a sensor with uninterrupted data recording. This information if useful if there are several deployments per site, e.g. the ARUs were only switched on at night (1 night = 1 deployment); the camtrap stopped for a week because its battery died; two camtraps were set up in the same site...
The beginning and the end of the deployment. If they are not known (e.g. the battery died), we can approximate them by the time of the first and last of the first trigger (e.g. first and last photo for a camtrap), all species confounded. If the 1st or the last detection is of the species of interest, this changes the likelihood, so we should keep this information.
Depending on the model, we could also need other informations: the species, the season...
Data provided by the user
In my proposition, here are the data the user should provide to create an
unmarkedFrameContinuous
object. I split them in several dataframes as this seems to be the most logical and safe (relational database-like) and is actually how sensor data are organised in tools I know of (such as the camtrapR R package and the Wildlife Insights exports)obsData
obsData
contains the observation data. I do not call ity
because it does not match the format ofy
in other unmarkedFrame objects. It can also contain covariates that are recorded at the time of the observation, such as the temperature, often measured by camera traps. For example:There is one row per observation, per detection event, described in my example by three mandatory columns: site, deployment and obstime.
Other optional columns could be mandatory for certain types of models:
And columns for detection covariates recorded at the time of the observation. (:question: Although, can we even integrate this information in CT models??)
siteData
site
siteData
contains the site covariates for the ecological submodel.siteData
list all the sites in the study (if there are no detection of the target species in a site, it can be absent from theobsData
dataframe)For example:
deploymentData
site
anddeployment
deploymentData
contains the time of the beginning and of the end of a deployment.begintime
andendtime
are mandatory.obsData
do not include this deployment)For example:
Detection covariates
This is the part I'm the less convinced by, it has lots of flaws but I do not have any better idea now. I also don't think I'm fully comfortable with how to integrate detection covariates in CT models, so I've probably missed important things.
obsCovsContinuous
(facultative)For continuous-time covariates (e.g. temperature, hygrometry) that can be measured at time t.
site
,deployment
, and the time t of the measureFor example:
obsCovsBinned
(facultative)For observation covariates that are not in continuous-time but binned (e.g. rainfall is necessarily measured over an interval of time. Other environmental covariates can have an impact on detection, and if the sampling plan did not include sensors capable of measuring them, they can usually be retrieved from other data suppliers, often by day or by hour.
site
,deployment
, and the time bin (here fully defined bybegintime
andendtime
but this is not ideal and I'm sure it could be simplified)obsCovsBinned
must be a list of two dataframesFor example:
❓ Things I don't like about this format
obsDataContinuous
)So if you have other format ideas on how to integrate detection covariates that are both user friendly and possible to integrate into models, that'll be great!
Compatibility
With the
unmarkedFrame
mother classWe only need to create a
y
matrix. This can be the number of detection per deployment (column) for each site (row). This is not data given by the user but created automatically in the function that creates theunmarkedFrameContinuous
object.With other packages and tools
I think the dataframes
obsData
,siteData
anddeploymentData
are easily compatible with other packages (e.g.camtrapR
) and tools (e.g. Wildlife Insights exports). I don't know of formats that use detection covariates in continuous time.The text was updated successfully, but these errors were encountered: