Statalist The Stata Listserver


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

st: RE: RE: RE: Sums and means within a table


From   "Carter Rees" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: Sums and means within a table
Date   Thu, 18 Jan 2007 06:18:46 -0500

Todd,

I used the term children as a generic place holder for whatever variable you
are trying to summarize.  The variable hid was used for your household
identifier, again my variable was a generic term.  Insert your variables
accordingly.

I am not sure why you would timeout on your connection.  Click on the error
message for more information on your particular problem.  Both of the
following ways of finding -fsum- worked on my machine.


ssc install fsum 

findit fsum 

Carter


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Todd Swarthout
Sent: Thursday, January 18, 2007 5:17 AM
To: [email protected]
Subject: st: RE: RE: Sums and means within a table

Thanks...but I dont have a variable 'children'...

I have 'idno' which is the ID No. for each household.
I have 'Q1_1r�parti' which is the number of children 0-4 years per
household.

In addition, I tried to download the fsum command but I get the return:

connection timed out -- see help r(2) for troubleshooting
http://fmwww.bc.edu/repec/bocode/f/ either
  1)  is not a valid URL, or
  2)  could not be contacted, or
  3)  is not a Stata download site (has no stata.toc file).

Ive never been able to dowload any new command or other such files. Is it
just a matter of increasing the waiting time?

Any thoughts?

Im working on STATA 8

Cheers

Todd

-----Message d'origine-----
De : [email protected]
[mailto:[email protected]] De la part de Carter Rees
Envoy� : jeudi 18 janvier 2007 10:59
� : [email protected]
Objet : st: RE: Sums and means within a table

The -fsum- command by Fred Wolfe is something that I have found very useful.


ssc install fsum

Bysort hid: fsum children, s(mean sum)

Carter


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Todd Swarthout
Sent: Thursday, January 18, 2007 4:44 AM
To: [email protected]
Subject: st: Sums and means within a table

Hello. I have the following table:

tab Q1_1r�parti
Q1_1r�parti |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        133       44.63       44.63
          1 |         85       28.52       73.15
          2 |         58       19.46       92.62
          3 |         17        5.70       98.32
          4 |          3        1.01       99.33
          5 |          2        0.67      100.00
------------+-----------------------------------
      Total |        298      100.00

This is the number of children in a household under 5 yrs of age. For
example, there are 133 households with 0 chilfren <5 yrs. Im looking for a
command that will allow me to sum the total number of children in all 298
households and then to find the average number per household. 

A rather simple command I suspect

Thanks

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


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

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


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