Simple two-line graph with markers in legend and 95%-confidence-interval error bars. - Statistica General Discussion - Statistica - Dell Community

# Simple two-line graph with markers in legend and 95%-confidence-interval error bars.

#### Simple two-line graph with markers in legend and 95%-confidence-interval error bars.

Many versions ago, SPSS could do this easily. But now it seems to have degenerated to the point where the bugginess of SPSS's chart editor makes it more trouble than it's worth. So can Statistica make this simple, two-line graph with markers in legend and 95%-confidence-interval error bars? I so, how?: http://i.imgur.com/UFGwjs0.png

• Yes. You can create such chart in Statistica, at least two ways. Here is how:

1) Means with Error plots

Select Means plot from the Graphs ribbon bar - then Gender as Grouping variable and Handedness for Categories

The result will be very similar. By default the software will plot CI bars with a shift between groups - you can control the size of that shift (to a degree) after the graph has been crated using the value of "space between groups" in the Graph options dialog.

2) Interaction plot

Run ANOVA, select the Factorial ANOVA option with Gender and Handedness as factors. Then from the ANOVA results dialog the option "All effects/Graphs" will let you plot a graph of the interaction effect (in your case Handedness is the line pattern).

Once the graph is created you can right click on it choose the graph data editor and adjust X positions of the error bars if you like.

Option 2 gives better control of the layout  and also will let you choose the type of means for the CI bars.

Let us know if that worked for you.

• Hello, you can select categorical variables under the "Categorized" tab in the Means with Error Plots dialog.Alternatively, you can select Graphs|Categorized|Means w/ Error Plots. Here is another KB article about How to Define Categories for Categorized Graphs.

1.select "On" under X-categories. 2. click "Change Variable" to specify the categorical variable.3. select "Overlaid" as Layout 4. Click "OK".

• You are welcome! Under "Categorized" Tab: 1.select "On" under X-categories. 2. click "Change Variable" to specify the categorical variable.3. select "Overlaid" as Layout 4. Click "OK".

If Graphs|Categorized Graph module is chosen, the same graph can be created by simply clicking "Variables" to select Dependent, Group and X- category variables with "Overlaid" layout selected. A categorized boxplot is explained in this KB article How to make a simple categorized boxplot.

• Thanks all.

I was able to create this graph on Statistica. One problem is that Method 1 appears to contain a bug such that the X axis title ("Gender") isn't properly centered. Another unfortunate limitation is that there's no way to have the line markers line-up exactly across the two lines, rather than being horizontal offset.

Thanks.

All Replies
• Yes. You can create such chart in Statistica, at least two ways. Here is how:

1) Means with Error plots

Select Means plot from the Graphs ribbon bar - then Gender as Grouping variable and Handedness for Categories

The result will be very similar. By default the software will plot CI bars with a shift between groups - you can control the size of that shift (to a degree) after the graph has been crated using the value of "space between groups" in the Graph options dialog.

2) Interaction plot

Run ANOVA, select the Factorial ANOVA option with Gender and Handedness as factors. Then from the ANOVA results dialog the option "All effects/Graphs" will let you plot a graph of the interaction effect (in your case Handedness is the line pattern).

Once the graph is created you can right click on it choose the graph data editor and adjust X positions of the error bars if you like.

Option 2 gives better control of the layout  and also will let you choose the type of means for the CI bars.

Let us know if that worked for you.

• Sounds promising, but as indicated in this new screen shot -- i.imgur.com/glmO1pF.png&nbsp;-- VARIABLES allows specification of a DEPENDENT VARIABLE and a GROUPING VARIABLE, but no "CATEGORIES" VARIABLE.

• Hello, you can select categorical variables under the "Categorized" tab in the Means with Error Plots dialog.Alternatively, you can select Graphs|Categorized|Means w/ Error Plots. Here is another KB article about How to Define Categories for Categorized Graphs.

1.select "On" under X-categories. 2. click "Change Variable" to specify the categorical variable.3. select "Overlaid" as Layout 4. Click "OK".

• Thanks Wendy-X, but 'Categorized' tab (which you've shown above) does not allow me to specify the 'variable' as anything but "none" (regardless of whether the 'On' box is checked). Additionally, the knowledge base article you provided seems to pertain to using a many-valued variable to create a fewer-valued variable, which is not what I need to do: I already have one dependent variable and two independent variables, and I simply want to plot them as a two-line graph.

• You are welcome! Under "Categorized" Tab: 1.select "On" under X-categories. 2. click "Change Variable" to specify the categorical variable.3. select "Overlaid" as Layout 4. Click "OK".

If Graphs|Categorized Graph module is chosen, the same graph can be created by simply clicking "Variables" to select Dependent, Group and X- category variables with "Overlaid" layout selected. A categorized boxplot is explained in this KB article How to make a simple categorized boxplot.

• Thanks all.

I was able to create this graph on Statistica. One problem is that Method 1 appears to contain a bug such that the X axis title ("Gender") isn't properly centered. Another unfortunate limitation is that there's no way to have the line markers line-up exactly across the two lines, rather than being horizontal offset.

Thanks.

• Plot from ANOVA will suit you better then.

• Thanks. It does work. By the way. Is there a particular portion of the Statistica documentation that I could have consulted to get to this point. For example, does the documentation include a step-by-step example of "How to make a two-line graph with error bars?"

• Thanks for your feedback. It seems that by design, in this particular categorized mean plot ,  X label is centered by the whole graph area instead of the X axis. I have reported this issue to our Product development team to consider modifying it in the future release of Statistica. Here is the issue report ID 105487.

• Hi RA1,  our online help document and e-manual do have examples for most modules:

In addition, if you need have any technical question regarding Statistica, you can:

utilize our self-help tools: Statistica Self-Help

or search at our Statistica Knowledge Base center

or contact our Technical Support Team How to get support through the Dell Support Portal