[R] 回覆﹕ 回覆﹕ How to get filter probabilities from msmFit() of package MSwM?

王柏元 pywang61 at yahoo.com.tw
Mon Sep 7 03:14:40 CEST 2015


I think I find the way to extract smoothed probabilities from msmFit().

In the MSM.lm-class, we could use  mod.msm at Fit@smoProb to extract the smoothed probabilities, also, we could use  mod.msm at Fit@filtProb to extract the filter probabilities.

Best Regards

  Paul Wang
  pywang61 at yahoo.com.tw

--------------------------------------------
15/9/4 (五),王柏元 <pywang61 at yahoo.com.tw> 寫道:

 主旨: [R] 回覆﹕  How to get filter probabilities from msmFit() of package MSwM?
 收件者: r-help at r-project.org
 日期: 2015年9月4日,五,下午1:47

 By using 
 plotProb(mod.msm,which=2), I could only show the graph of
 smoothed probabilities. May I extract smoothed probabilities
 and filter probabilities from the msmFit()?  thank you very
 much.
 --------------------------------------------
 15/9/4 (五),王柏元 <pywang61 at yahoo.com.tw>
 寫道:

  主旨: [R] How
 to get filter probabilities from msmFit() of package
 MSwM?
  收件者: r-help at r-project.org
  日期: 2015年9月4日,五,上午9:01


  Dear all:
      I am a rookie in using R. I have a
 question:
  How to get filter probabilities
 from msmFit() of package
  MSwM?

  following are my code....

  #Markov Switch Model
  library(MSwM)

 data(example)
  mod<-lm(y~1,example)
  mod.msm<-msmFit(mod,k=2,sw=c(T,T))
  summary(mod.msm)

 plotProb(mod.msm,which=1)

 plotProb(mod.msm,which=2)


   
  王柏元

  Paul Wang
  pywang61 at yahoo.com.tw


 ______________________________________________
  R-help at r-project.org
  mailing list -- To UNSUBSCRIBE and more,
 see
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal,
 self-contained, reproducible
  code.

 ______________________________________________
 R-help at r-project.org
 mailing list -- To UNSUBSCRIBE and more, see
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained,
 reproducible code.



More information about the R-help mailing list