Statalist


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

RE: st: question about tabstat and table


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: question about tabstat and table
Date   Thu, 26 Mar 2009 10:51:23 -0700

If soap usage is a single variable, won't Stata interpret it as two variables "soap" and "usage"?  Maybe consider soap_usage as a variable name

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Alan Neustadtl
Sent: Thursday, March 26, 2009 5:22 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: question about tabstat and table

See -help table- fo rmore informaiton.  The example below might help as well:

/*************************************/
sysuse auto, clear
table rep78 foreign, c(mean mpg)
/*************************************/

Best,
Alan


On Thu, Mar 26, 2009 at 8:13 AM, Victor M. Enciso M.
<v.enciso-mora@postgrad.manchester.ac.uk> wrote:
> Dear all,
>
> I have three vars: soap usage, language and study
> language and study can only take two values.
>
> If I want to get the mean of soap usage by language or study I can use
> tabstat
>
> tabstat soap usage, by(study)
>
> or if I want a two way table of study and language:
>
> table study language
>
> What I want, and don't know how to get is a two way table of study and
> language but instead of having the counts as result I want the mean of soap
> usage.
>
> Obviously, stata doesn't accept
>
> tabstat soap usage, by(study language)
>
> So, any suggestions?
>
> thank you.
>
>
>
> --
> Víctor M. Enciso M.
> School of Mathematics
> The University of Manchester
> C24 Ferranti Building
> PO BOX 88
> M60 1QD
> Manchester, UK
> Ext: 55820
>
>
> *
> *   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/
>

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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index