Hi,
I have a matrix as below:
A SuccessB FailureC SuccessA SuccessB SuccessC Success
I want to count how many time B appeared after A or A appeared after A or C appeared after B (for example: i-1 should be A, and i should B: so it counted as AB). The resultant combinations are as shown below: So, again I want to count how many time A appeared after A, B appeared after A, B appeared after B, C appeared after B (or C,or A,or D)etc.
AA AB ACBA BB BCCA CB CC
My out put should be: Out_sucess (only succeefull combinations):
0 1 00 0 21 0 0
Out_Fail(Failed combinations):
0 1 0 0 0 0 0 0 0
Kindly help how do I get these out puts
Best Answer