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   Iulian Ihnatov <[email protected]>
To   [email protected]
Subject   Re: st: Tabulation of a variable against itself lagged
Date   Sun, 18 Sep 2011 22:56:57 +0300

I managed to solve the issue. Thank you very much, your help was very valuable.
Here is the code I wrote:

*********************************
insheet using regimuri.csv, delimiter(";")
gen id=_n
reshape long y, i(id) j(year)
encode indicatorname, gen(varnum)
drop id indicatorname
egen id=group(countrycode year)
reshape wide y, i(id) j(varnum)
rename y1 regime
label var regime "Regime"
encode countrycode, gen(wbcode)
xtset wbcode year
order id wbcode year country countrycode regime
gen regime_2=L.regime
label var regime_2 "Regime (previous year)"
by year, sort : tabulate regime regime_2
***********************************

--
Regards,
Iulian Ihnatov


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index