syntax for transition probability for blocks.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

syntax for transition probability for blocks.

luciano basso
Dear All,

I'm trying to get a syntax to analyze the probability of certain transitions occur.
The data is
ordinal - 0 to 5 - 150 subjects, performing 4 to 120 trials, each subject has
a specific number of trials divided into 6 blocks.

Example,

subj trail block response

19    1    1    0
19    2    1    0
19    3    1    0
19    4    2    0
19    5    2    2
19    6    2    4
19    7    3    1
19    8    3    2
19    9    3    2
19    10    4    1
19    11    4    3
19    12    4    3
19    13    5    2
19    14    5    5
19    15    5    5
19    16    6    2
19    17    6    5
23    1    1    0
23    2    1    0
23    3    1    0
23    4    1    1
23    5    1    0
23    6    1    0
23    7    1    0
23    8    1    0
23    9    1    0
23    10    1    0
23    11    2    0
23    12    2    0
23    13    2    0
23    14    2    0
23    15    2    0
23    16    2    0
23    17    2    1
23    18    2    1
23    19    2    0
23    20    2    0
23    21    3    0
23    22    3    0
23    23    3    1
23    24    3    0
23    25    3    0
23    26    3    0
23    27    3    0
23    28    3    0
23    29    3    1
23    30    3    1
23    31    4    1
23    32    4    0
23    33    4    0
23    34    4    0
23    35    4    0
23    36    4    0
23    37    4    1
23    38    4    0
23    39    4    0
23    40    4    1
23    41    5    0
23    42    5    0
23    43    5    1
23    44    5    0
23    45    5    0
23    46    5    0
23    47    5    1
23    48    5    1
23    49    5    0
23    50    5    1
23    51    6    1
23    52    6    1
23    53    6    0
23    54    6    0
23    55    6    0
23    56    6    0
23    57    6    0
23    58    6    1
23    59    6    0
23    60    6    0
23    61    6    5


How likely is turning 1 in 2? from 2 to 3? of 3 to 4? and so on. That within each block and then in general, for each subject.

For example, for the subject 19, the first block, the transition probability is 0 because there is only one type of behavior. In the second block, there are both likely to 0 to turn 2, turn 2 and 4. in block 3, the probability is 1 turn 2, and 2 will be 2 .... ok .... but I would get it in probability.


thanks,

Luciano





Reply | Threaded
Open this post in threaded view
|

Re: syntax for transition probability for blocks.

Hector Maletta

Luciano,

When you say that in one particular individual (say, individual 19) you think the “probability” of a transition is zero because that subject did not change its behavior within a given block (block 1). Other subjects did have a change (out of several trials) and the “probability” in that instance would be positive. But in fact those are not “probabilities”, but relative frequencies for certain individuals, over a small number of instances (e.g. 3 trials in block 1 for individual 19). But probabilities are properties of a collection of cases, not of individual instances (after all, the entire field of Statistics rests on the so-called Law of Large Numbers!!).

 

The idea of “transition probabilities” require many subjects undergoing the same process, in which they start at a given “state” and may or may not  pass to another “state”. The object of analysis, then, is the population of subjects in a given block (or for all blocks taken together). If there are only 5 possible responses, you have a 5 x 5 table, where rows represent (say) initial state and columns represent final state in a given transition (which may be the first, second, third…. trial of the block). For the sake of easier explanation, suppose for a moment there are not 5 states but only 2, call them A and B. This gives you a 2 x 2 table. The NW cell contains all the people starting at state A and remaining at the same state; the NE cell shows how many people started at A and finished at B. The SW cell indicates how many started at B and finished at A, and the SE cell contains all people starting and remaining in state B. So you have four possible “trajectories”: AA, AB, BA and BB. The probability of passing from A to B is AB/(AA+AB), and likewise for the other cells. Having more options (five in your case) only enlarges the table, from four to 25 cells. By the way, if you intend to consider all the transitions, it might happen that many of them are empty or have a very scant number of cases, which would give you too few cases to make any significant estimate of the probability. You may want to simplify the scales, from 5 values to only 2 or 3, as convenient. Next time you’d better get more cases.

 

You may do this for each block (e.g. the first block of all individuals taken together) or for the grand total (all individuals in all blocks taken together). This “Markov” table gives you all the probabilities you need. From there you have to have some theory to compare the outcome with. One of the most classic is chi square, which answers the question: Are the numbers in the cells very different of what you should expect to happen by chance? How sure you can be of the response? But chi square is too crude: you may have one cell or two that differ enormously from chance, but may be swamped by the others that are similar to chance, giving an overall non significant chi square. However, supposing the table is actually unlikely to have arisen by chance, you may try to explain the transitions by correlating the trajectories (AA, AB, BA and BB in the simplest case) with possible factors affecting individuals and causing them to “stay” or “change”, such as sex, education, age, or whatever. Normally, Markov models assume “no memory” (the probability of passing from A to B is unaffected by the previous history of the individuals: previous stayers have the same probability than previous changers. But this assumption may be lifted to allow for different probabilities for transitions between period t and period t+1, according to the state of each individual in period t-1 (one period memory). More complicated models may accept longer “memory” and thus a kind of “learning” process whereby the behavior of an individual depends on her previous history of trials.

 

The whole issue of Markov chains merits more detailed study, and you may want to look at some references about the matter.

 

Hope this quick comment helps.

 

Auguri.

 

Hector


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of luciano basso
Sent: 11 February 2010 22:20
To: [hidden email]
Subject: syntax for transition probability for blocks.

 

Dear All,

I'm trying to get a syntax to analyze the probability of certain transitions occur.
The data is
ordinal - 0 to 5 - 150 subjects, performing 4 to 120 trials, each subject has a specific number of trials divided into 6 blocks.

Example,

subj trail block response
19    1    1    0
19    2    1    0
19    3    1    0
19    4    2    0
19    5    2    2
19    6    2    4
19    7    3    1
19    8    3    2
19    9    3    2
19    10    4    1
19    11    4    3
19    12    4    3
19    13    5    2
19    14    5    5
19    15    5    5
19    16    6    2
19    17    6    5
23    1    1    0
23    2    1    0
23    3    1    0
23    4    1    1
23    5    1    0
23    6    1    0
23    7    1    0
23    8    1    0
23    9    1    0
23    10    1    0
23    11    2    0
23    12    2    0
23    13    2    0
23    14    2    0
23    15    2    0
23    16    2    0
23    17    2    1
23    18    2    1
23    19    2    0
23    20    2    0
23    21    3    0
23    22    3    0
23    23    3    1
23    24    3    0
23    25    3    0
23    26    3    0
23    27    3    0
23    28    3    0
23    29    3    1
23    30    3    1
23    31    4    1
23    32    4    0
23    33    4    0
23    34    4    0
23    35    4    0
23    36    4    0
23    37    4    1
23    38    4    0
23    39    4    0
23    40    4    1
23    41    5    0
23    42    5    0
23    43    5    1
23    44    5    0
23    45    5    0
23    46    5    0
23    47    5    1
23    48    5    1
23    49    5    0
23    50    5    1
23    51    6    1
23    52    6    1
23    53    6    0
23    54    6    0
23    55    6    0
23    56    6    0
23    57    6    0
23    58    6    1
23    59    6    0
23    60    6    0
23    61    6    5


How likely is turning 1 in 2? from 2 to 3? of 3 to 4? and so on. That within each block and then in general, for each subject.

For example, for the subject 19, the first block, the transition probability is 0 because there is only one type of behavior. In the second block, there are both likely to 0 to turn 2, turn 2 and 4.
in block 3, the probability is 1 turn 2, and 2 will be 2 .... ok .... but I would get it in probability.


thanks,

Luciano




Reply | Threaded
Open this post in threaded view
|

Re: syntax for transition probability for blocks.

Art Kendall
In reply to this post by luciano basso
It seems that your data will be very sparse. Please elaborate on what blocks are.  What defines/distinguishes trials? What is the relation of trials to blocks?  Why are there different numbers of trials?

What is the meaning of the levels of the response bariable?


Art Kendall
Social Research Consultants

On 2/11/2010 8:19 PM, luciano basso wrote:
Dear All,

I'm trying to get a syntax to analyze the probability of certain transitions occur.
The data is
ordinal - 0 to 5 - 150 subjects, performing 4 to 120 trials, each subject has
a specific number of trials divided into 6 blocks.

Example,

subj trail block response

19    1    1    0
19    2    1    0
19    3    1    0
19    4    2    0
19    5    2    2
19    6    2    4
19    7    3    1
19    8    3    2
19    9    3    2
19    10    4    1
19    11    4    3
19    12    4    3
19    13    5    2
19    14    5    5
19    15    5    5
19    16    6    2
19    17    6    5
23    1    1    0
23    2    1    0
23    3    1    0
23    4    1    1
23    5    1    0
23    6    1    0
23    7    1    0
23    8    1    0
23    9    1    0
23    10    1    0
23    11    2    0
23    12    2    0
23    13    2    0
23    14    2    0
23    15    2    0
23    16    2    0
23    17    2    1
23    18    2    1
23    19    2    0
23    20    2    0
23    21    3    0
23    22    3    0
23    23    3    1
23    24    3    0
23    25    3    0
23    26    3    0
23    27    3    0
23    28    3    0
23    29    3    1
23    30    3    1
23    31    4    1
23    32    4    0
23    33    4    0
23    34    4    0
23    35    4    0
23    36    4    0
23    37    4    1
23    38    4    0
23    39    4    0
23    40    4    1
23    41    5    0
23    42    5    0
23    43    5    1
23    44    5    0
23    45    5    0
23    46    5    0
23    47    5    1
23    48    5    1
23    49    5    0
23    50    5    1
23    51    6    1
23    52    6    1
23    53    6    0
23    54    6    0
23    55    6    0
23    56    6    0
23    57    6    0
23    58    6    1
23    59    6    0
23    60    6    0
23    61    6    5


How likely is turning 1 in 2? from 2 to 3? of 3 to 4? and so on. That within each block and then in general, for each subject.

For example, for the subject 19, the first block, the transition probability is 0 because there is only one type of behavior. In the second block, there are both likely to 0 to turn 2, turn 2 and 4. in block 3, the probability is 1 turn 2, and 2 will be 2 .... ok .... but I would get it in probability.


thanks,

Luciano





===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants