Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: roll rates


From   Argyn Kuketayev <akuketayev@mail.primaticsfinancial.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: roll rates
Date   Sun, 24 Apr 2011 13:46:51 -0400

thanks, -xttrans- seems to be what I was looking for.
i read that -fillin- command can help woth gaps.



On Sat, Apr 23, 2011 at 8:48 AM, Austin Nichols <austinnichols@gmail.com> wrote:
> Nick Cox <njcoxstata@gmail.com>, Argyn Kuketayev
> <akuketayev@mail.primaticsfinancial.com>:
>
> -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.
>
> clear
> webuse nlswork
> g lmsp=l.msp
> 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"
> xttrans msp
> ta flmsp msp, nofr row
> * note equivalence above--not period-to-period transitions:
> ta lmsp msp, nofr row
> svyset, srs
> svy:ta lmsp msp, row
> * usually transition matrix has cols sum to 1:
> svy:ta msp lmsp, col
> test _b[p12]=_b[p21]
> test _b[p11]=_b[p22]
> * the above tests equality of cell proportions...
> * to test equality of transition rates use se or ci options:
> svy:ta msp lmsp, col se
> test _b[p12]=_b[p21]
> test _b[p11]=_b[p22]
>
>
> On Fri, Apr 22, 2011 at 7:58 PM, Nick Cox <njcoxstata@gmail.com> wrote:
>> . h xttrans
>>
>> On Sat, Apr 23, 2011 at 12:25 AM, Argyn Kuketayev
>> <akuketayev@mail.primaticsfinancial.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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Argyn Kuketayev

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index