code to prevent label switching among imputation fits #184
-
Hi everyone! Examining my individual model fits, I found that labels switched among imputations. To avoid this problem I have seen that I can use DM, workbounds and userBounds but I am not sure if I completely understood how they work. I would like to force the step length of ARS to be smaller than Transit's step length and both being shorter than 10 km and the angle concentration value (Von Mises distribution) of ARS being smaller than Transit' angle concentration value. Is the following script correct? nbStates <- 2 stateNames <- c("ARS","Transit") dist = list(step = "gamma", angle = "vm") stepDM <- matrix(c(1,0,0,0, angleDM <- matrix(c(1,0, stepworkBounds <- matrix(c(-Inf,Inf, angleworkBounds <- matrix(c(-Inf,Inf, stepBounds <- matrix(c(0,10, angleBounds<-matrix(c(0,Inf, DM <- list (step = stepDM, angle = angleDM) Thank you very much in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Apologies for the delay, I've been in the field and on vacation for much of the past three months. The best way to confirm the code is achieving what you want is to write out the actual equations and verify the fitted model output is indeed enforcing the desired constraints (but note this can be tricky when attempting to use both |
Beta Was this translation helpful? Give feedback.
Apologies for the delay, I've been in the field and on vacation for much of the past three months. The best way to confirm the code is achieving what you want is to write out the actual equations and verify the fitted model output is indeed enforcing the desired constraints (but note this can be tricky when attempting to use both
workBounds
anduserBounds
at the same time). See #57 and #180, as well as the many examples in the vignette.