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: How to reduce correlation between variables


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   Re: st: How to reduce correlation between variables
Date   Tue, 7 Aug 2012 03:09:14 +0900

Ebru Ozturk wrote over three posts:

Is there a possible way to reduce the correlation between two variables?

----------------------------------------

But it didnt change anything. They are still correlated. I used the command
below:
 
orthog x1 x2 x3, gen(x1* x2* x3*)

----------------------------------------

They are still correlated. Sample size is 285 firms and I cannot increase it. Is
there other way to sole this problem?

--------------------------------------------------------------------------------

Maarten gave you the answer.  You apparently have trouble following his advice:
for example, you couldn't have used the command that you show, because it causes
an error.  Look more carefully at Maarten's example again, look at the help file
for the command, and try again.  If you still have trouble, then show us the
actual commands and output (copy and paste them from the Results window as I do
below; don't paraphrase them as you unsuccessfully attempted to do above).

Joseph Coveney

. 
. drawnorm x1 x2 x3, ///
>         corr(1 0.999 0.999 \ 0.999 1 0.999 \ 0.999 0.999 1) ///
>         seed(`=date("2012-08-07", "YMD")') n(285) clear
(obs 285)

. 
. correlate x?
(obs=285)

             |       x1       x2       x3
-------------+---------------------------
          x1 |   1.0000
          x2 |   0.9989   1.0000
          x3 |   0.9989   0.9990   1.0000


. 
. capture noisily orthog x1 x2 x3, generate(x1* x2* x3*)
error in generate()
x1 already defined

. 
. orthog x1 x2 x3, generate(y1 y2 y3)

. 
. correlate y?
(obs=285)

             |       y1       y2       y3
-------------+---------------------------
          y1 |   1.0000
          y2 |   0.0000   1.0000
          y3 |   0.0000   0.0000   1.0000


. 
. exit

end of do-file


.


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