Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: serrbar Command


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: serrbar Command
Date   Tue, 22 Jun 2004 11:28:12 -0400

You need to check out the syntax in -help serrbar-.  It accepts 3 (and only
3) variables in the varlist.  It expects something like a collapsed dataset
where each obs is a mean and std.

collapse (mean) mymean=myvar (sd) mysd=myvar, by(mycatvar)
serrbar mymean mysd mycatvar

You need not and should not create separate variables for each group's mean
and sd you want graphed, that's not the approach taken or syntax allowed.
You may need to try to create a combined catgeorical variable if you have
more than one categorical variable that you want in a single plot.

Michael Blasnik
michael.blasnik@verizon.net

----- Original Message ----- 
From: "Syed O Masood" <syedmasood2@yahoo.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, June 22, 2004 10:56 AM
Subject: st: serrbar Command


> Hi,
>
> I have tried to use the serrbar command after
> generating means. It is giving me following error
> message
>
> . serrbar  mean26 sd26 mean35 sd35 gender
> too many variables specified
> r(103);
>
> Second in order to generate mean from a continuous
> variable for two different categorical variable there
> is no easy way first I have to generate 9 different
> variables then 9 means and standard deviations, then
> try to plot mean sd using serrbar command and it is
> giving me an error message. Is there a command to
> generate serrbar graph like we use for boxplot.

>
> =====
> Syed O Masood, MBBS, MPH
> Email: smasood@jhu.edu
>
> Pager: (410) 850-8147
> Fax: (410) 368-3525


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