Statalist


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

st: Table of relative frequencies


From   kokootchke <[email protected]>
To   statalist <[email protected]>
Subject   st: Table of relative frequencies
Date   Wed, 12 Nov 2008 09:02:40 -0500

Hi all. 

I have a data set that contains bonds issued by a given country at different points in time, with information about each bond. For instance, one observation would look like:

country issuedate year issuer maturity yield currency amount
Mexico  09May98   1998 BXN    10       8.34  USD      250

I need to create lots of tables with summary statistics such as:

table country, c(m yield)

However, one type of table I don't know how to create quickly is one with relative frequencies (and I'm always angry with the -table- command because it doesn't seem to allow for tables of relative frequencies, unlike -tab-... but I don't like -tab-!). What I want is a table that gives me the percentage of bonds (observations) within a given country that have maturities greater than, say, 3 years. So, I wish there was a command that looked like:

table country, c(relfreq), if maturity>= 3

and produce a table like:

Argentina   26.7%
Brazil      37.8%
Mexico      49.3%
Zimbabwe    17.5%
...

I know that 

table country if maturity>= 3

will give me the # of bonds (absolute frequency) that meet the condition (maturity>= 3)... but I want this number in percentage terms. 

Is there any easy way of doing this?

Thanks a lot!!

ag


_________________________________________________________________
Windows Live Hotmail now works up to 70% faster.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
*
*   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