Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: meansdplot with if statement

From   Nick Cox <>
Subject   Re: st: meansdplot with if statement
Date   Thu, 27 Sep 2012 23:54:53 +0100

-meansdplot- is a program from Phil Ender from UCLA:

meansdplot from
    meansdplot.  Plot mean and stendard deviation for multiple groups. /
    Philip B. Ender / Statistical Computing and Consulting / UCLA Academic
    Technology Services / / Stata ado and hlp files in the
    package / distribution-date: 20071117

Please remember that you are asked to explain _where_ user-written
programs you refer to come from.

You have, I think, found a bug in -meansdplot-. The program accepts an
-if- qualifier [not a statement] but it only affects part of the plot
and does not affect the main calculations.

One work-around for what you want while Phil fixes the code is

forval j = 1/3 {
           keep if group == `j'
           meansdplot var1 var2

-sttripplot- (SSC) and -dotplot- are other commands with broadly
similar aims. It is also always possible to -collapse- a dataset
-by()- some group variable and plot summary statistics directly.

On Thu, Sep 27, 2012 at 9:13 PM, Cathy Antonakos <> wrote:
> Does the -meansdplot- command recognize an if statement? I issued the
> following commands and obtained the same graph for all 3 groups. Maybe
> there is an alternative way to do this, but the help suggests that if
> is operational. Thanks in advance!
> . meansdplot var1 var2 if group == 1
> . meansdplot var1 var2 if group == 2
> . meansdplot var1 var2 if group == 3
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index