View source: R/identbhvs_mixdist.R
identbhvs_mixdist | R Documentation |
Identify movement behaviours(states) by a clustering and mixture distribution process. A k-means clustering scheme has been applied to estimate the optimal number of movement behaviours, and log-normal distributions have been considered to classify the speed values. This function apply the procedure described in Palencia et al. 2021 - Innovations in movement and behavioural ecology from camera traps: day range as model parameter. Methods in Ecology and Evolution. Please, explore the presence of outliers in your data before running this function. You can use habitual procedures to identify outliers, such as visualization (boxplot), interquartile range and/or statistical tests (z scores). 'identify_outliers' function from 'rstatix' R package could be also useful.
identbhvs_mixdist(dat)
dat |
A numeric vector of speed data in m/s |
A data frame in which the first column includes the speeds, and the second column includes the movement behaviour in which each speed has been classified. A density plot with the speed clustering is obtained by default.
Pablo Palencia
Palencia, P., Fernandez-Lopez, J., Vicente, J., & Acevedo, P. (2021). Innovations in movement and behavioural ecology from camera traps: day range as model parameter. Methods in Ecology and Evolution, doi:10.1111/2041-210X.13609
'meanspeed' function, 'identbhvs' function
dat2<-c(rnorm(80, 2, 0.8), rnorm(80, 0.2, 0.1), rnorm(30, 1, 0.1))
identbhvs_mixdist(dat2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.