Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | lisa wallner <wallner.lisa@hotmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | RE: st: RE: Panel data - line graph |
Date | Tue, 5 Nov 2013 08:03:11 +0100 |
Dear Tim, many thx!!!!! It worked out well :) Lisa ---------------------------------------- > From: tshmak@hku.hk > To: statalist@hsphsun2.harvard.edu > Date: Tue, 5 Nov 2013 10:08:37 +0800 > Subject: RE: st: RE: Panel data - line graph > > Hi Lisa, > > I think what Dave mean would be something like: > > collapse (mean) expenditures, by(agegroups year) > sort agegroups year > xtset agegroups year > xtline expenditures, overlay > > Alternatively, you could try download -lgraph- from ssc: > ssc install lgraph > lgraph expenditures year agegroups > > HTH, > Tim > > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of lisa wallner > Sent: 05 November 2013 05:24 > To: statalist@hsphsun2.harvard.edu > Subject: RE: st: RE: Panel data - line graph > > Sorry, but I didn't get it... > Maybe you could explain the command a bit more in detail? > > Thx in advance! > Lisa > >> From: jacobs.184@sociology.osu.edu >> To: statalist@hsphsun2.harvard.edu >> Subject: st: RE: Panel data - line graph >> Date: Mon, 4 Nov 2013 16:13:22 +0000 >> >> Look at the Stata command called -collapse- and then think about collapsing by year. >> >> Dave Jacobs >> >> -----Original Message----- >> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of lisa wallner >> Sent: Monday, November 04, 2013 3:15 AM >> To: statalist@hsphsun2.harvard.edu >> Subject: st: Panel data - line graph >> >> Dear Statalist, >> >> I have panel data and I want to draw a line graph (dots with connection through lines), with y axis average expenditures, x axis years (2005-2010), and the lines in the graph should cover (total) average expenditures, and 6 lines for average expenditures for different age groups (variable agegroups is recoded of age). >> >> Unfortunately I am not able to find the right code; hopefully one can help me. >> Thx in advance! >> >> Lisa >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/