简体   繁体   中英

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"
  regime 2 = "estimate = 0.90" 
Second Running -> regime 1 = "estimate = 0.90"
  regime 2 = "estimate = 0.05" 

Please help me..

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM