RE: [S] Plot with confidence interval

Lambert, Daryl B (daryl.b.lambert@intel.com)
Thu, 16 Apr 1998 18:15:00 -0700



One way to skin this cat-

Get your data into a format like so:

group subgroup foo
1 group1 a 60.4
2 group1 a 219.7
3 group1 a 91.4
4 group1 b 17.3
5 group1 b 81.1
6 group1 b 97.6
7 group1 c -103.9
8 group1 c -2.1
9 group1 c 157.7
10 group2 a 1.4
11 group2 a 156.3
12 group2 a 167.6
13 group2 b -23.4
14 group2 b -96.1
15 group2 b -56.6
16 group2 c -34.3
17 group2 c 4.7
18 group2 c 41.1

Then try this:


dotplot(subgroup~foo|group,data=groupdata,layout=c(1,2,1),groups=subgr
oup,panel=panel.superpose))

The axes are flipped from your example, and you would have to edit
panel.dotplot to draw the lines between points if you really want
them. But the right information, grouping, and symbol coding are
done.

Daryl
daryl.b.lambert@intel.com

______________________________ Reply Separator
_________________________________
Subject: Re: [S] Plot with confidence interval
Author: jxs@dor.kaiser.org [SMTP:jxs@dor.kaiser.org] at MSXGATE
Date: 4/16/98 3:23 PM

Thanks for those who replied my query. Unfortunately none of those
really
gave me a solution. What I need is the interval plot by group and
there are
subgroups within each 'big' group. I would like to use different
symbols
for the subgroups to distinguish them. As shown in my original
query, there
are two groups, i.e., group 1 and group 2, and there are 3
subgroups, i.e.,
A, B, and C.


##### the original query:

Hello,
Does anyone have a function to plot mean and confidence interval by
group.
The plot is something like the following:

| _ _ _
| _ | _ | |
| _ | C | B C
| | B | A | |
| A | _ | _ _
| | _ _
| _
__________________________
group 1 group 2

There could be more than two groups.

Thanks for any help.

Jun


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe

send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news