Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Calculate a chi-square statistic reflecting the homogeneity of a Markov chain's transition matrix over several time periods
ResourceFunction["ChiSquareMarkovChainStatistics"][poolmat,permats,classcts] tests the homogeneity of a Markov chain's transition matrix poolmat across all time periods, where permats is the list of transition matrices for each period and classcts is the number of observations. |
| "States" | number of states |
| "Periods" | number of periods |
| "DegreesOfFreedom" | degrees of freedom |
| "ChiSquareStatistics" | χ2 statistics |
| "PValue" | p-value |
Return χ2 statistic and associated values for a Markov chain with 5 states over 3 time periods:

| In[1]:= |
| Out[1]= |
This work is licensed under a Creative Commons Attribution 4.0 International License