Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Graphs, pull out random values at peak interval


From   Knag Anne-Christine <[email protected]>
To   <[email protected]>
Subject   Re: st: RE: Graphs, pull out random values at peak interval
Date   Thu, 07 Jun 2007 14:16:11 +0200

Thank you Mr Cox! I have another question regarding graphs. I want to make
twoway bar graphs showing production of the different types over a period of
time. I created the plots like this:

 twoway (bar production day_of_prod), ytitle(Production) xtitle(Day of
production) by(type)

I have ordered the type, how can I sort the plots in this order?

I tried to simply:
twoway (bar fec_div_div day_of_spawning), ytitle(Fecundity *10-6) xtitle(Day
of spawning) by (treat, sort(order))
But this does not work..

I would also like to have a last summarizing showing total production (all
types together). How can I add this in the syntax?

Thanks!
Anne-Christine




On 6/6/07 9:05 PM, "Nick Cox" <[email protected]> wrote:

> I don't see where the randomness enters in that
> case. Perhaps you just want 25 in the middle
> of each panel. 
> 
> In that case, there are numerous slight variations
> on this recipe: 
> 
> by group, sort : egen maxtime = max(time)
> by group : egen mintime = min(time)
> gen middletime = floor((mintime + maxtime) / 2)
> gen byte select = inrange(time, middletime - 12, middletime + 12)
> 
> programthatanalysesyourdataandtellsyoutheirmeaningandgivespublishableresults
> if select 
> 
> I assume time measurement on successive days, labelled
> with integers. 
> 
> Nick 
> [email protected]
> 
> Knag Anne-Christine
>  
>> As 25 starting from a not randomly selected date until
>> another not randomly
>> selected date.
>  
> On 6/6/07 7:13 PM, "Nick Cox" <[email protected]> wrote:
>  
>>> In what sense would these days be randomly selected?
>>> As 25 from some larger number? As 25 starting from
>>> some randomly selected date?  Or what?
>>> 
>>> Nick 
>>> [email protected]
>>> 
>>> Knag Anne-Christine
>>> 
>>>> I have plotted production for 7 different groups over a
>> time period of
>>>> around 100 days. There were some days without production,
>>>> these days varied
>>>> between the groups. Production began and ended at different
>>>> days in each of
>>>> the groups. I want to compare 25 random days at the middle of
>>>> the production
>>>> period between and within groups (1factor anova). But how can
>>>> I pull out 25
>>>> random days in the middle using STATA?
>>>> 
>>>> I have another comparison where I am looking at the max size
>>>> of the product
>>>> that were measured each day. The max size peaks over a period
>>>> of around 7
>>>> days. The peaks occurs at different times between the groups.
>>>> How can I
>>>> compare the sizes within and between the groups during
>> just the peak?
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index