HMM for one-dimensional data with negative step lengths #106
-
I am interested in using momentuHMM to model one-dimensional movement patterns. For now, I am starting off with just a simple HMM. I have do not have angles in my data, just step lengths. My data is formatted as a change in depth from time t to time t +1 (both negative and positive values) in 5 minute intervals. I want to model the movement path with three known states: ascending (+), descending (-), and constant (no change, 0). Below is an example of the output from momentuhmm:prepData ##prep the data
Animal1 -- 7160 observations Data summaries:
Min. :-2.1e+02
#parameters and probability distributions fit <- momentuHMM::fitHMM(data = HMM_prep, I am fitting step length as a "norm" distribution. I am curious how to run this model when there are only step lengths and some contain negative values. Are you able to select negative values for initial starting parameters for mean and sd? I get this error message when trying to set initial parameters for each state: Check the parameter bounds for step (the initial parameters should be strictly between the bounds of their parameter space) Let me know if I need to provide more information. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I suppose you could try and model these using a normal distribution, in which case However, one potential problem with the normal distribution is that this would not necessarily or effectively forbid "Diving" from being positive, "Constant" from being negative or positive (unless of course That said, if all you really care about is "Diving", "Constant", and "Ascending" (with little concern for the actual changes in depth), then you could instead assign each vertical step to one of these three categories and fit these categorical data using the Assuming normality is appropriate, here is some code to simulate depths as a random walk with three states and then fit a 3-state model for the vertical steps. Hopefully you can play around with this and get a better sense for how appropriate this approach may be for your data.
|
Beta Was this translation helpful? Give feedback.
I suppose you could try and model these using a normal distribution, in which case
mean
can be any real value (positive or negative) andsd
must be positive. As long as these conditions are met, you should not be getting an error message; thus, in addition to checking thatsd
is positive, you might want to check the order of yourstepPar
initial values, which should bec(mean_1, mean_2, mean_3, sd_1, sd_2, sd_3)
.However, one potential problem with the normal distribution is that this would not necessarily or effectively forbid "Diving" from being positive, "Constant" from being negative or positive (unless of course
mean_2
is fixed to zero andsd_2
is fixed to an extremely small positive…