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..
Asked
Active
Viewed 862 times
2

Community
- 1
- 1

Denny Nurdiansyah
- 21
- 2
-
1Isn't this what one might expect from a package whose middle name is `Switching`? – IRTFM Dec 20 '13 at 16:54
-
yeah.. inconsistent switching – Denny Nurdiansyah Dec 21 '13 at 04:30
-
This is statistics. You were expecting determinacy? – IRTFM Dec 21 '13 at 05:16
1 Answers
0
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.

alittleboy
- 10,616
- 23
- 67
- 107
-
I still get problem.. Sometimes consistent, sometimes inconsistent.. this is my finally syntax: mod.mswm <- msmFit(lm(y~x),k=2,p=1,sw=rep(T,4),control=list(tol=0.0001,maxiterOuter=0,maxiterInner=0,maxiter=10000,parallel=F)) – Denny Nurdiansyah Dec 21 '13 at 04:38