Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Counting occurences & correlation matrix


From   Claude Francoeur <[email protected]>
To   [email protected]
Subject   st: Counting occurences & correlation matrix
Date   Tue, 26 Dec 2006 16:57:53 -0500

Hello,

1- Counting occurences

I want to count the number of times the variable pw=1 is used in the 
following regression :

. xtprobit pw boardcomp compensation shrights disclosure tech mv endet cot 
volat march conc, pa i(i)

My dataset contains 781 observations, but only 581 were used in the reg.

I did:
. count if pw==1
   47

This is not the count that I need. There are actually 47 pw=1 in the 
original dataset, but how many are there in the e(sample)?


2- Generate a correlation matrix

I did :

 . matrix accum R = pw boardcomp compensation shrights disclosure tech mv 
endet cot volat march conc, nocons dev
(obs=581)

.  matrix R = corr(R)

Now, how do I export the matrix to Excel?

Thanks,

Claude



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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