Statalist


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

st: AW: Graphics with averages of variables (over other variables)


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Graphics with averages of variables (over other variables)
Date   Wed, 10 Jun 2009 12:58:31 +0200

<> 

Just -collapse- the data -by- your group identifier and the time variable
and then draw them...


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von
oezguer.guererk@uni-erfurt.de
Gesendet: Mittwoch, 10. Juni 2009 12:56
An: statalist@hsphsun2.harvard.edu
Betreff: st: Graphics with averages of variables (over other variables)

Hello,

I would like to create "twoway connected" graphics of a variable called 
"myredpts" on the Y-axis and the variable "period" on the X-axis. 
"myredpts", however, should be averaged over several "subjects" 
belonging to the same "group", for each "period".

I use the command: "twoway (connected mean(myredpts) period) if 
treatment == 1, by(group)" which is apparently wrong because of the 
"mean"... If I skip mean and use only "twoway (connected myredpts 
period) if treatment == 1, by(group)" then stata draws in each period 
several points for several subjects and connects them, I, however, want 
Stata to draw only one single data point for each group consisting of 4 
subjects in each period and connect these for the consecutive 20 periods.

Thank you very much for your help!
Ozgur

-- 
Dr. Özgür Gürerk

Lehrstuhl für Mikroökonomie & Laboratorium für experimentelle
Wirtschaftsforschung
(Microeconomics & Laboratory for Experimental Economics)

Universität Erfurt, Nordhäuser Str. 63, D-99089 Erfurt 

Tel: +49 361 7374561
Fax: +49 361 7374569
www.uni-erfurt.de/elab
--

*
*   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–2025 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index