Bookmark and Share

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: Tabulation of a variable against itself lagged


From   Robson Glasscock <[email protected]>
To   [email protected]
Subject   Re: st: Tabulation of a variable against itself lagged
Date   Sat, 17 Sep 2011 17:48:38 -0400

Can you generate a new variable equal to the lag and then tabulate?

best,
Robson Glasscock

On Sat, Sep 17, 2011 at 3:53 PM, Iulian Ihnatov <[email protected]> wrote:
> Dear Statalist user,
>
> After a day of research on forums, FAQ etc. I can't find a solution for my
> problem, so I ask for your help.
> I have a cross-section - 190 countries/ 12 years - of the categorical
> variable "regime" (takes 8 values).
> I need to tabulate this variable against itself but lagged one year. The
> table should look like this:
>
>                                                    2009
>  2010 |         1          2          3          4          5          6
>      7          8
> ----------------------------------------------------------------------------------------------
>         1 |        37
>         2 |                    8
>         3 |                              43
>            1
>         4 |                                          6
>            1
>         5 |                                                     5
>         6 |                                                                6
>                          1
>         7 |                               1
>            24           1
>         8 |         1                    1
>           1           48
>
> It seams simple, but I just can't figure out how to do it, so any idea would
> be highly appreciated.
>
> --
> Regards,
> Iulian Ihnatov
>
>
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index