'R Package 'MSwM' has inconsistent result
mod.mswm <- msmFit(lm(y~x),k=2,p=1,sw=rep(T,4),control=list(maxiter=700,parallel=F)) summary(mod.mswm)
I have a inconsistent result in this r packages..
First Running -> regime 1 = "estimate = 0.05"Second Running -> regime 1 = "estimate = 0.90"regime 2 = "estimate = 0.90"regime 2 = "estimate = 0.05"Please help me..
Solution 1:[1]
First, I suggest taking a look at the R codes for that function msmFit and pay special attention to whether any random number generators are used and whether there is set.seed before it. The inconsistent results, from my experience of other packages, are probably due to this reason.
Second, I see there seems to be a "switch" between the two results for the two regimes in terms of the estimates -- that is (to me) a very interesting observation and I am not sure if there is any underlying hidden relationships.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | alittleboy |
