Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Iulian Ihnatov <iulian.ihnatov@uaic.ro> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Data manipulation - time between value changes of a categorical variable |
Date | Sun, 25 Sep 2011 23:12:52 +0300 |
Dear Statalister,In have a panel dataset of 200 countries/10 years, and the "regime" variable (categorical - 8 values).
The questions are:1. by country: calculate the lenght (years) of each regime before the switch; 2. tabulate (and, if possible, plot - 3D?) the frequency for each lenght and regime.
The second task is reacheable with the tabulate, table or, better, tabout commands (not sure about the graph).
Would you be so kind to give me some idea of how to solve the first task? Regards, Iulian Ihnatov -Stata 10-
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature