我们如何使用似然比或卡方检验马尔可夫链的平稳性和同质性?

时间:2017-12-30 18:05:32

标签: chain chi-squared markov

我在Markov_chain包中找到了R函数,我将该代码应用于我的数据集,以使用卡方检验来研究马尔可夫链的平稳性,有序性和同质性,但是当我执行代码时,我得到了一个警告:Chi-squared近似可能不正确。尽管如此,测试马尔可夫属性的R函数运行良好。

verifyMarkovProperty(z, verbose = TRUE)

Testing Markov property on given data sequence
Chi-square statistic is: 224.1998  degrees of freedom are: 125  and corresponding p-value is: 1.263105e-07 

这没有警告就行了

    assessOrder(z, verbose = TRUE)

 The assessOrder test statistic is:  NaN  the Chi-Square d.f. are:  80  the p-value is:  NaN 
Warning messages:
1: In chisq.test(mat) : Chi-squared approximation may be incorrect
2: In chisq.test(mat) : Chi-squared approximation may be incorrect
3: In chisq.test(mat) : Chi-squared approximation may be incorrect
4: In chisq.test(mat) : Chi-squared approximation may be incorrect
5: In chisq.test(mat) : Chi-squared approximation may be incorrect

这个警告形式R代码自己或在哪里

 assessStationarity(z, 1, verbose = TRUE)

    The assessStationarity test statistic is:  17.10439  the Chi-Square d.f. are:  0  the p-value is:  0 
Warning messages:
1: In chisq.test(mat) : Chi-squared approximation may be incorrect
2: In chisq.test(mat) : Chi-squared approximation may be incorrect
3: In chisq.test(mat) : Chi-squared approximation may be incorrect
4: In chisq.test(mat) : Chi-squared approximation may be incorrect
5: In chisq.test(mat) : Chi-squared approximation may be incorrect

相同的警告信息

有人能帮助我知道这是什么问题吗?我们如何使用似然比检验来检验R中马尔可夫链的平稳性,有序性和同质性?感谢您的帮助

0 个答案:

没有答案