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]

Re: st: How to graph several mean trajectories and combine them in a single graph


From   "Han-Jung Ko (Koko)" <[email protected]>
To   [email protected]
Subject   Re: st: How to graph several mean trajectories and combine them in a single graph
Date   Tue, 25 Feb 2014 19:20:58 -0600

Thank you, Nick! It works!

Han-Jung Ko, M.S.
Doctoral Candidate
Human Development and Family Studies
School of Social and Behavioral Health Sciences
Oregon State University
[email protected]


On Tue, Feb 25, 2014 at 6:08 PM, Nick Cox <[email protected]> wrote:
> Type
>
> sort wave
>
> before your graph command or add -sort(wave)- as an option.
>
> Nick
> [email protected]
>
>
> On 25 February 2014 22:19, Han-Jung Ko (Koko)
> <[email protected]> wrote:
>> Thank you both for the help.
>>
>> I did try your suggestions and did more research. I am able to now
>> graph the dots of means of my variables of interest by wave in a
>> single graph (i.e., means of pr_ and pl_). Here is my command:
>>
>> egen pl_m = mean(pl_), by (wave)
>> egen pr_m = mean(pr_), by(wave)
>> graph twoway dot pl_m pr_m wave
>>
>> However, when I tried to connect the dots using the following command:
>> graph twoway connected pl_m pr_m wave
>>
>> it not only connects the dots but also draw a line from wave 1 dot to
>> wave 5 dot for pr_ and pl_. Do you know how I can do to have only the
>> dots connected for pl_ and pr_ separately but not a straight line from
>> wave 1 to wave 5 datapoints?
>>
>> Hope the question is clear. I am sorry that I am not a native speaker.
>>
> *
> *   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/


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