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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: how to do a weighted transition matrix


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: how to do a weighted transition matrix
Date   Fri, 29 Apr 2011 18:54:45 +0100

Thanks for the detail. From what you tell us, I gather that the
weighted matrix of transition frequencies  is just the actual matrix
multiplied by the constant. The transition probabilities are
unaffected by a multiplicative constant.

Nick

On Fri, Apr 29, 2011 at 5:37 PM, Hey Sky <heyskywalker@yahoo.com> wrote:
> Dear Nick
>
> thanks for your reply.
>
> my research topic is about the transition probability from one state to another,
> e.g., white/blue collar job and self-employment within an unbalanced panel. all
> the three states are mutural exclusive dummy variables. the weight is a constant
> number but not integer. it adjust the percentage of different people groups,
> e.g., there is too many refugee in the survey but less other immigrants so that
> the stats bureau uses the weight to adjust it back to represent the  real world.
>
>
> the following created data are almost the same with the actural one, though I am
> not sure about the value of the weight. I checked it once long time ago and
> vaguely remember it is just a constant number (I cannot check not due to the
> data is not at hand). I used xttrans to get the transition matrix but I have
> been required to use weights otherwise I cannot take the results to the public.
>
>
> hope I make my question clear and thanks for any suggetsions.
>
> clear
> input id time w b s weight
> 1 1 1 0 0 1.8
> 1 2 1 0 0 1.8
> 1 3 0 1 0 1.8
> 2 1 0 1 0 1.8
> 2 2 0 1 0 1.8
> 2 3 0 0 1 1.8
> 3 1 0 0 1 1.8
> 3 2 0 1 0 1.8
> 3 3 . . .  1.8
> 4 1 0 0 1 1.8
> 4 2 0 1 0 1.8
> 4 3 1 0 0 1.8
> end
>
>
> Nan
> from Montreal
>
>
>
>
> ----- Original Message ----
> From: Nick Cox <njcoxstata@gmail.com>
> To: statalist@hsphsun2.harvard.edu
> Sent: Fri, April 29, 2011 12:06:46 PM
> Subject: Re: st: how to do a weighted transition matrix
>
> More explanation would help. Where do the weights come from? Do they
> weight the transitions? The earlier state? The later state? Are they
> integers or not? What is your data structure? Which variables hold
> which information? Do you expect a precise answer to a vague question?
>
> At its easiest, this sounds like a transition matrix multiplied
> elementwise by a weights matrix, so save the matrices independently
> and do the multiplication in Mata.
>
> Nick
>
> On Fri, Apr 29, 2011 at 4:57 PM, > Nan from Montreal, a.k.a. Hey Sky
> <heyskywalker@yahoo.com> wrote:
>
>> I have to do a weighted transition matrix but it is not an option for the
>> command xttrans.
>>
>> I have searched the archives but did not find any discussion about
>> this question.
>> did anyone experience this before and any (other) method to deal with it?
>
> *
> *  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/
>
>
> *
> *   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/
>

*
*   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