Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Age-transition probability

    We have data on when student go from one grade to another and want to estimate age-based transition probability from grades using longitudinal data. This is a puzzle to me. It is like markov and we want to use multinomial models. The output ideal is transition matrix shown by age. here is some data

    Code:
    input id state age
    1 1 20
    1 1 21
    1 2 22
    1 3 23
    2 1 26
    2 2 27
    2 2 28
    2 1 29
    3 3 19
    3 4 20
    3 . .
    3 . .
    4 2 22
    4 1 23
    4 3 24
    4 4 25

  • #2
    It isn't entirely clear to me what you are looking for. An overall state-transition probability matrix can be gotten with:

    Code:
    xtset id age
    xttrans state
    You say you want it by age. Does that mean that for each age you want a matrix summarizing transition probabilities from that age to one year older? If so:
    Code:
    levelsof age, local(ages)
    foreach a of local ages {
        local b = `a' + 1
        xttrans state if inlist(age, `a', `b')
    }
    The results of the latter are rather unenlightening in your data, but if you have more observations at each age, then you might get something meaningful out of it.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      It isn't entirely clear to me what you are looking for. An overall state-transition probability matrix can be gotten with:

      Code:
      xtset id age
      xttrans state
      You say you want it by age. Does that mean that for each age you want a matrix summarizing transition probabilities from that age to one year older? If so:
      Code:
      levelsof age, local(ages)
      foreach a of local ages {
      local b = `a' + 1
      xttrans state if inlist(age, `a', `b')
      }
      The results of the latter are rather unenlightening in your data, but if you have more observations at each age, then you might get something meaningful out of it.
      Is this the same as a markov process?

      Comment


      • #4
        A Markov process is any state-transition process where the probability of transition from state i to state j is independent of the history prior to arriving in state i. So it is often referred to as a "memoryless" process. In any Markov process, you can characterize its behavior by a matrix of transition probabilities. The matrix may be time dependent, or it may be a function of other attributes of the entity that is undergoing the state transitions. The ways in which it might depend on time or attributes are quite flexible, and as long as the history of earlier states is not involved in it, anything goes.

        The output of -xttrans- could easily be thought of as a state transition matrix in a Markov process, though actually simluating the process would require some additional machinery.

        Comment


        • #5
          Clyde Schechter I found this thread very helpful.
          Based on the code provided by Clyde, why does the code not work if it is changed to b=`a'+2 in order to identify 2-year age gap?

          Comment


          • #6
            Is it possible to use the output to -xttrans state-, i.e. the local matrix, and plot this in some way? I have looked into transcolorplot (Install comand transcolorplot - Statalist), but this could be just one of may options.

            Comment

            Working...
            X