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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Help making graph: connecting pre- and post- for 22 individuals |

Date |
Fri, 4 Jun 2004 14:30:50 +0100 |

Check out -linkplot- and -pairplot- from SSC. (Even with Stata 8 graphics there are now several user-written extras.) My own bias is that the most effective graph in such circumstances usually is one of those given by -pairplot-. Also check one of my favourite little papers: McNeil, D.R. 1992. On graphing paired data. American Statistician 46, 307-11. Nick n.j.cox@durham.ac.uk Erik Beecroft > > I am using Stata 8 intercooled for Windows. > > I want to make a graph showing growth in reading levels > between the Fall > term and Spring term for 22 students. The data look like this: > > student fall spring > 1 4.5 5.25 > 2 3.5 5.25 > 3 7.5 7.5 > 4 5.75 5.75 > 5 6.5 7.5 > 6 6.25 7.5 > 7 4.5 5.25 > 8 6.5 7.25 > 9 4.75 5.5 > 10 4.5 5.25 > 11 6.25 6.25 > 12 4.5 5.25 > 13 4.5 5.25 > 14 2.25 3.25 > 15 6.5 7.25 > 16 4.75 5.25 > 17 4.75 5.25 > 18 6.5 6.75 > 19 5.75 5.75 > 20 4.75 5.75 > 21 4.5 4.75 > 22 4.5 5.5 > > I would like one graph, with 22 lines, one per student. The > x axis would > be term, with two values, Fall and Spring. The y axis would > be reading > level. So the graph would show a line connecting Fall and > Spring reading > levels for each student. > > I have spent two hours trying to make this graph, using the > Stata graphics > manual and "A Visual Guide to Stata Graphics." > > I re-shaped the data to have 2 records per student, one for > Fall and one > for Spring. I then tried a connected line graph, but the > graph connected > lines _across_ students, not just within students. > > I also re-shaped the data so that the scores for each student were a > separate variable (i.e., two records, one for Fall and one > for Spring, with > 22 variables, each showing the scores for an individual > student). I then > tried "twoway (line stu1-stu22 Term)", but it looks like only > the first 15 > lines were drawn, I suppose due to a limit in how many > variables can be included in one graph. * * 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/

- Prev by Date:
**Re: st: wish: accumulate recently used datasets under File menu** - Next by Date:
**st: Generating Simulated Data** - Previous by thread:
**st: -tsset- difficulties (was Re: dwstat v dwstat2)** - Next by thread:
**st: RE: Help making graph: connecting pre- and post- for 22 individuals** - Index(es):

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