Statalist


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

Re: st: correlation with panel data


From   "Johan Hellstrom" <[email protected]>
To   [email protected]
Subject   Re: st: correlation with panel data
Date   Sat, 4 Jul 2009 14:34:00 +0200 (CEST)

Ricardo,

Probably not the most elegant solution, but one way of doing this is by
reshaping your data:

sort city_ID t
preserve
by city_ID: gen ID=_n
reshape wide price, i(ID) j(city_ID)
pwcorr price*
restore

Best,
Johan Hellstrom




*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index