Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: roll rates
Austin Nichols <firstname.lastname@example.org>
Re: st: roll rates
Sat, 23 Apr 2011 08:48:05 -0400
Nick Cox <email@example.com>, Argyn Kuketayev
-xttrans- does not seem to respect gaps in time within panel, where
someone estimating transition probabilities would want to, but -tab-
works fine if you define the appropriate lag variable, and -svy:tab-
works better, if you have weighted and/or clustered data, or you want
to test something.
la var lmsp "last month's state"
note lmsp: not last month, but actually year(s)
bys idcode (year): g flmsp=msp[_n-1]
la var flmsp "last observation's state"
ta flmsp msp, nofr row
* note equivalence above--not period-to-period transitions:
ta lmsp msp, nofr row
svy:ta lmsp msp, row
* usually transition matrix has cols sum to 1:
svy:ta msp lmsp, col
* the above tests equality of cell proportions...
* to test equality of transition rates use se or ci options:
svy:ta msp lmsp, col se
On Fri, Apr 22, 2011 at 7:58 PM, Nick Cox <firstname.lastname@example.org> wrote:
> . h xttrans
> On Sat, Apr 23, 2011 at 12:25 AM, Argyn Kuketayev
> <email@example.com> wrote:
>> i wonder if Stata has a package for pool roll rate analysis.
>> the roll rates are probabilities of transitions between asset's
>> states, such as credit grades. let's say, we have N assets, each can
>> be in one of the states S. some of these states are end-states, i.e.
>> once an asset gets into this state, it exits the pool.
>> so we can observe monthly asset states, and transitions between them.
>> the assumptions is that all assets have the same state transition
>> probabilities, and that these probabilities remain constant over time
>> (stationary). i need to estimate the probabilities of transitions
>> between states. one can think of a matrix with rows corresponding to
>> an asset state this month, and the columns are states in next month.
>> so sum of columns in each row is 100%. each cell is a probability of
>> transition from row state to column state.
>> what would be the most straightforward way to estimate the transition
>> probability matrix (roll rates) in Stata?
* For searches and help try: