[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: graph bar and/or catplot

From   "Nick Cox" <>
To   <>
Subject   RE: st: graph bar and/or catplot
Date   Thu, 2 Oct 2008 18:42:43 +0100

I agree. You need to -reshape- to make headway. 

gen id = _n
reshape long laser, i(id) j(which) 
catplot bar which laser


P.S. The zero responses for 5 are not visible. The easiest way I know to
get those is to redo the whole thing with -twoway bar-. 

b. water

nick (cox),

i have a feeling that i need to manipulate the data into something else
first before applying the appropriate [G]raph command to produce the
graph that i wanted (like so below) but what that something else first
is i am stumped (or that the data set-up need to re-organized in a


no. of	+
returns  80+	xx
	+	xx           xx                  cc	xx cc
            60+	xx cc       xx	    cc	xx cc
	+	xx cc       xx	xx cc	xx cc
	+	xx cc       xx cc          xx cc	xx cc
	+	xx cc       xx cc	xx cc	xx cc
	+	xx cc       xx cc	xx cc	xx cc
		  1	  2	  3	  4	  5

xx = laser1
cc = laser2
xx and cc are my 'cartoon-ish' substitute for a bar histogram for laser
1 and 2 respectively.

there is also a category of responds i.e. equal to 5 which none of the
subjects returns in evaluating laser1 or laser2 hence will be zero on
the histogram as seen above. i am not sure how much of the above
illustration describes what i wanted better than words can but i hope it
does. if further description in words is required please do let me know.

as requested, the contigency table is as follows:

.tab laser1	laser2

	laser1	1	2	3	4	Total
	1	70	65	22	8	165 
	2	64	29	13	0	106 
	3	20	8	2	0	30 
	4	11	3	1	0	15 
	Total	165	105	38	8	316 

*   For searches and help try:

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