Simulation of Random Walk Model with 8 X 8 Transition Matrix and 8 X 8 Error Matrix

MARKOV TRANSITION MATRIX--Rows are true state on trial n; cols are true state on trial n + 1
Standard Model Violation Model Type in transition probabilities, then click the "prepare" button:
ERRORS for True and Error Model
e1 = e2 = e3 =
ERROR TRANSITION MATRIX-- rows are true state; cols are observed response
When errors are ready, click "prepare errors": No. trials=
DATA for True States
DATA2 for Error-filled Responses

Markov Model with Response Errors

This program was written by Birnbaum and Wan (2020) to simulate models, such as described in Birnbaum (2013, Appendix B). That paper dealt with tests of transitivity with three choices. However, it can be used for other applications of a Markov process on 8 states. All of the code is included in this file. A simulator that satisfies iid is also available at this link.

Instructions for Using the Program

The first row and first column contain labels of the true states. The entry in row i and column j represents the transition probability from state i on Trial n to State j on Trial n + 1. The last column contains the sum of the transition probabilities. After the "prepare" button is pressed, these values should be equal (within computer precision) to 1. The default labels represents a case of three item choice task, presented twice within each block.

In the current version of the program, one of the 8 states is chosen randomly as the starting value.

Quick Start to Simulate a MARTER model with the Default Values

1. Push the button "prepare" under the Markov transition matrix. (last column should be 1s).

2. Scroll down to the Errors Matrix, and push the button "calculate errors by TE".

3. Push the button "prepare errors". (last column should be 1s).

4. Push the button "simulate trials".

The true states (true preference patterns) will appear in the first box, and the error filled data will be in the second box below the true states. They are selected and focused, so you can use Control & C to copy them to another program, such as Excel.

(The default values are set up to run an intransitive model (see Birnbaum and Wan, 2020) in which three true preference patterns are possible: 111, 221, and 222, but all response patterns are possible due to error. From the 111 true state, one can transition only to 221 or stay in the 111 state; from the 221 state it is possible to transition to 111 or 222 (or remain in 221), and from the 222 state one can either stay in 222 or transition to 221. From all other states, there is a transition to one of these three states. )

The MARKOV transition Matrix

1. You can leave the transition matrix as given, or enter your own transition probabilities, but the values in each row must sum to 1. After you have completed the transition matrix, push the button labeled, prepare. This will read in the probabilities of transmission and find their cumulative sums, displaying the row sums in the last column. The transition probabilities must sum to 1, and if they do not sum to 1, then you should reload the page and re-enter probabilities that do in fact sum to 1. You should reload the program if you need to start over.

2. In standard mode, the default, there is no transition between replications. That is, replications are true replications in which the same state underlies both response patterns. The button Violation model, if clicked, will cause another Markov transition to occur within the two replications of a block (i.e., within a line of output data). This button allows one to explore consequences of this type of violation of the model. (In standard mode, the button labeled, simulate trials, will create many simulated trials with two replications (e.g., you might request 10,000 successive Markov transitions), and put them in the data window. In violation mode, this button would create 20,000 simulations of the Markov process, since an additional transition occurs within the block.)

3. The starting values in the error matrix is 0 error, so the results in the two data textareas would be the same; i.e., the true states are the same as the "error-filled" states, because probabilities of errors are all zero. (When you click "calculate errors by TE model" the default values of errors for Choices 1, 2, and 3 will be used to calculate errors. You can also enter another pattern of errors. The entry represents the probability given the true pattern of the row that the column response pattern will be observed. See below).
When the simulations are complete, the data are already selected, and the focus already is on the data window. To copy these data to another application, such as Excel, simply use CONTROL & C, and then CONTROL & V to copy and paste into the application. In Excel, it might be necessary to use the Text to Columns feature.

Instructions for Markov Process combined with Error

The matrix of errors contains the state labels in the first row and column, the same as for the Markov transition matrix. The entry in Row i and Column j contains the probability of showing the Observed response of Column j given the True State was that of Row i. This error matrix is assumed to be the same on all trials.

To use the Error feature, complete step 1 above, and do the following:

1. Either click the Calculate errors by TE button, having entered error probabilities for Items 1, 2, and 3, respectively. (This TE feature assumes that the rows and columns are labeled with integers of 1 and 2, as in the default starting set up), OR enter values in the 8 X 8 matrix, using the 64 error conditional probabilities you want. The sum of the entries in each row should be 1.

2. Now push the prepare errors button. The row sums should be 1; if not, start the program again and enter errors that do, in fact, sum to 1 in each row. Then push the row sums button again.

3. Finally, push simulate trials to run the number of simulations requested. The first data matrix contains the TRUE states (true preference patterns), and the second data matrix contains the OBSERVED responses, which contain error.
When the simulations are complete, the data are already selected, and the focus already is on the data window. To copy these data to another application, such as Excel, simply use CONTROL & C, and then CONTROL & V to copy and paste into the application. In Excel, it might be necessary to use the Text to Columns feature.

References

Birnbaum, M. H. (2013). True-and-error models violate independence and yet they are testable. Judgment and Decision Making, 8, 717-737. (See especially Appendix B).

Birnbaum, M. H., & Bahra, J. P. (2012a). Separating response variability from structural inconsistency to test models of risky decision making, Judgment and Decision Making, 7, 402-426.

Birnbaum, M. H., & Bahra, J. P. (2012b). Testing transitivity of preferences in individuals using linked designs. Judgment and Decision Making, 7, 524-567.

Birnbaum, M. H., & Diecidue, E. (2015). Testing a class of models that includes majority rule and regret theories: Transitivity, recycling, and restricted branch independence. Decision, 2, 145-190.

Birnbaum, M. H., Navarro-Martinez, D., Ungemach, C., Stewart, N. & Quispe-Torreblanca, E. G. (2016). Risky decision making: Testing for violations of transitivity predicted by an editing mechanism. Judgment and Decision Making, 11, 75-91.

Birnbaum, M. H., & Wan, L. (2020). MARTER: Markov True and Error model of drifting parameters. Judgment and Decision Making, 15(1), 47-73.

This program was written by Michael Birnbaum and Lucy Wan; Michael wrote the Markov process, and Lucy added the TE error transition feature and other improvements.

Revised 3-25-19 Instructions updated 11-3-21.