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 at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: correlation, panel data


From   Carl Filler <CFiller@brownschool.wustl.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: correlation, panel data
Date   Wed, 13 Oct 2010 15:10:58 +0000

I've found the following workaround effective when lacking installation rights:

In your jump drive create a folder named "ado", then open Stata and type the following (replace M: with your jump drive): 

.sysdir set PERSONAL M:\ado
.net set ado PERSONAL

Hit enter. Now you can install whatever program you want.

Hopefully that helps,

Carl

_________________________________________
Carl Filler, MSW
Program Manager
MFH Model Practice Building Dissemination Team
Prevention Research Center in St. Louis
660 S. Euclid
Campus Box 8109
St. Louis, MO 63110
Phone: 314.362.9649

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Biljana Dlab
Sent: Wednesday, October 13, 2010 10:03 AM
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: correlation, panel data

I do not have rights to install something on the computer.

Is there some other solution to this?

I have panel data (sorted by firm and financial years).

Now I am trying to compute correlation between variables r_d and cf - I would like to have this correlation in a separate column in spread-sheet and that the correlation coefficient is written for all firm-year observations

With other words this is what I would like to get:

Firm year corr(between r_d&cf)
A	99	0.2
A	00	0.2
A	01	0.2
A	02	0.2
B	99	0.4
B	00	0.4
B	01	0.4


I tried like this:
.by gvkey_n: corr cf r_d  - but then I get whole listing in front of me of the correlation and not the column in the spread-sheet

If I try:
. by gvkey_n: egen d_corr = corr(cf r_d) unrecognized command:  _gcorr r(199);

Trying:
. ssc install egenmore
checking egenmore consistency and verifying not already installed...
file C:\DOCUME~1\dlab\LOCALS~1\Temp\ST_0100000g.tmp already exists could not copy http://fmwww.bc.edu/repec/bocode/_/_grall.ado
(no action taken)
r(602);

Do you know the function how to get correlation in the column?


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: 13 October 2010 16:50
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: correlation, panel data

--- On Wed, 13/10/10, Biljana Dlab wrote:
> If I try:
> . by gvkey_n: egen d_corr = corr(cf r_d)
> unrecognized command:  _gcorr
> r(199);
> 
> Trying:
> . ssc install egenmore
> checking egenmore consistency and verifying not already
> installed...
> file C:\DOCUME~1\dlab\LOCALS~1\Temp\ST_0100000g.tmp already
> exists
> could not copy http://fmwww.bc.edu/repec/bocode/_/_grall.ado
> (no action taken)
> r(602);

So, you haven't installed -egenmore-, so -egen var = corr()- is
resulting in an error message, as it should. You are also having
trouble installing -egenmore-. I would just try closing down Stata,
restart Stata, and retry to install -egenmore-.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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