Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Graphing the median of a list of variables


From   Jeremy Voros <[email protected]>
To   [email protected]
Subject   st: Graphing the median of a list of variables
Date   Tue, 27 Apr 2010 14:05:31 -0400

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index