Needs an 'interleaved' dataframe (see interleave function). Pre-test item should be followed by corresponding post-item item etc. Don't knows must be coded as NA. Function handles items without don't know responses. The function is used internally. It calls transmat.
pre_test: Required. data.frame carrying responses to pre-test questions.
pst_test: Required. data.frame carrying responses to post-test questions.
subgroup: a Boolean vector identifying the subset. Default is NULL.
force9: Optional. There are cases where DK data doesn't have DK. But we need the entire matrix. By default it is FALSE.
Returns
matrix with rows = total number of items + 1 (last row contains aggregate distribution across items) number of columns = 4 when no don't know, and 9 when there is a don't know option
Details
multi_transmat: transition matrix of all the items