| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re:counting occurrences & correlation matrix; comparing means and medians
From |
Kit Baum <[email protected]> |
To |
[email protected] |
Subject |
st: Re:counting occurrences & correlation matrix; comparing means and medians |
Date |
Wed, 27 Dec 2006 11:40:55 -0500 |
Answering two of your queries:
1)
xtprobit...
summ pw if e(sample)
2)
mat accum...
mat R = corr(R)
Then use svmat to create new variables, and outsheet to write out the
nonmissing observations of those variables to a tab-delimited text file.
3)
To compare means and medians:
xtprobit...
gen byte want = e(sample)
ttest boardcomp if want, by(pw)
ranksum boardcomp if want, by(pw)
ttest compensation if want, by(pw)
ranksum compensation if want, by(pw)
etc.
For the dichotomous variables, replace ttest with the appropriate chi-
squared test command.
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
On Dec 27, 2006, at 2:33 AM, statalist-digest wrote:
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)?
*
* 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/