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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: Graphing the median of a list of variables


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Graphing the median of a list of variables
Date   Tue, 27 Apr 2010 20:10:11 +0200

<>

*******
help grmeanby
*******

might be useful.


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jeremy Voros
Sent: Dienstag, 27. April 2010 20:06
To: statalist@hsphsun2.harvard.edu
Subject: st: Graphing the median of a list of variables

Stata newbie here with a question I'm having trouble finding an answer for.
I would like to create a line graph with variables along the x-axis and
their median on the y-axis, with a different line for each variable based on
the cohort year. Here's the details:

My database of likert-scale survey data looks basically like this:

|      id     |     year     |     question1     |      question2     |
question3     |     etc...
|      5      |     1999     |         1         |          4         |
3         |            
|      5      |     2001     |         3         |          4         |
2         |
|      6      |     1999     |         3         |          5         |
4         |


So ultimately I'd like a graph with question1, question2...questionX along
the x-axis, and the median of each variable on the y-axis, with a different
line for each year.

I feel like it should involve tabstat or reshape somehow, but can't manage
to work it out. Any help appreciated.

Thanks,

Jeremy Voros
Case Western Reserve University
School of Medicine, Class of 2011






*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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