Using mixtures and missing covariates values #51
-
Hello, I am working with data from GPS tags deployed on harbour seals. I am trying to fit a model with environmental covariates and mixtures to capture inter-individual heterogeneity in the responses. Following the example with pilot whales in the vignettes. As I am focussing my analysis on foraging trips at sea, I have removed sections of the data during which seals are hauled-out or doing short coastal trips. Therefore, I had to use my trip_ID as my ID column when preparing the data (prepData()), to avoid the error of not continuous data for each individual. However, now that I am running the models with mixtures, I would like to account for the seal individual (seal_ID) variability and not of each individual trip (trip_ID). So, I have tried to switch the columns and set as my ID the seal_ID. The model is actually running and estimating stationary probability distributions, but when it comes to estimate the most probable state sequence using the viterbi() function this error is generated:
Is there any way to obtain the state sequence even with the gaps in the time series? Do you have any suggestions on how to overcome this error? On another matter, I am trying to use as covariates temperature data that were collected by the tags. As there are various gaps in the data, so far, I have discarded trips with missing temperature readings, but that is decreasing a lot my sample size. I was wondering if there is any way to fit the model with missing values in the covariate columns. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It's difficult to determine what's going on here based on the detail provided. But it sounds like you manually changed the Before deciding whether or not to pursue individual-level random effects, I might suggest you check out this preprint. Instead of mixtures, an alternative option would be to use 'seal_ID' as a covariate on the state transition probabilities (e.g. And sorry, there is no way to fit a model with missing values in the covariate columns. |
Beta Was this translation helpful? Give feedback.
-
Dear Brett, I have read your preprint and as per the conclusions you come to in the paper I don't think mixtures are appropriate for what I am trying to achieve. At the end of page 32 you discuss the possibility of implementing the Burnham & White approach in momentuHMM, and I was wondering if you have wrote any examples or instructions on how to code this? Apologise if this is already available and I was not able to find it. Many thanks again for your help. |
Beta Was this translation helpful? Give feedback.
-
The approach of Burnham and White (2002) can be implemented using the
|
Beta Was this translation helpful? Give feedback.
It's difficult to determine what's going on here based on the detail provided. But it sounds like you manually changed the
ID
column from 'trip_ID' to 'seal_ID' in themomentuHMMData
object (returned byprepData
) before fitting withfitHMM
, which will produce nonsense results as it will treat the trips for each individual as if they were from a single contiguous track. I suspect this is causing the error in theviterbi
function, but I cannot diagnose this without a minimal reproducible example.Before deciding whether or not to pursue individual-level random effects, I might suggest you check out this preprint. Instead of mixtures, an alternative option would be to use 'seal_ID' as a cova…