Statalist


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

RE: AW: AW: AW: AW: AW: AW: st: Re: graph question


From   DE SOUZA Eric <[email protected]>
To   <[email protected]>
Subject   RE: AW: AW: AW: AW: AW: AW: st: Re: graph question
Date   Mon, 20 Apr 2009 17:43:08 +0200

It could also be a question of not having the line breaks in the right place when copying the code.
Or it could be that he does not have Stata10. It doesn't work with Stata9

Eric de Souza
College of Europe
Brugge (Bruges), Belgium
http://www.coleurope.eu


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: 20 April 2009 17:29
To: [email protected]
Subject: AW: AW: AW: AW: AW: AW: AW: st: Re: graph question

<> 


I have sent Nikolaos my do-file and the resulting graph as pdf. I hope that this resolves his problem. He might also want to check that he has the most recent version of -eclplot-.

***
. which eclplot
c:\ado\plus\e\eclplot.ado
*! Author: Roger Newson
*! Date: 02 July 2008
***



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nikolaos Pandis
Gesendet: Montag, 20. April 2009 17:18
An: [email protected]
Betreff: Re: AW: AW: AW: AW: AW: AW: st: Re: graph question

Dear martin,

I cannot get it to work.
Could send the do-file at [email protected]
Thank you
Nick
--- On Mon, 4/20/09, Martin Weiss <[email protected]> wrote:


From: Martin Weiss <[email protected]>
Subject: AW: AW: AW: AW: AW: AW: st: Re: graph question
To: [email protected]
Date: Monday, April 20, 2009, 5:42 PM


<> 

Hmmm, works for me. Make sure that the code transfers well from your email
program to the do-file editor. My code should only wrap at the point where
the "///" line break is inserted.


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nikolaos Pandis
Gesendet: Montag, 20. April 2009 16:12
An: [email protected]
Betreff: Re: AW: AW: AW: AW: AW: st: Re: graph question

Dear Martin,
 
Thank you very much.
I get the error barwidth () option not allowed?
Any suggestions?
 
Nick

--- On Mon, 4/20/09, Martin Weiss <[email protected]> wrote:


From: Martin Weiss <[email protected]>
Subject: AW: AW: AW: AW: AW: st: Re: graph question
To: [email protected]
Date: Monday, April 20, 2009, 4:33 PM


<> 

In addition to Maarten`s excellent contribution, let me provide a final
solution for Nikolaos via the -eclplot- package by Roger Newson. I think it
pretty much does what he has wished for all along... 

*************
clear*

qui{
//create data
set obs 600

gen arm= cond(_n<301,0,1)
lab def arms 0 "control" 1 "experimental"
la val arm arms

egen float interval = fill(0 1 3 6 9 12 0 1 3 6 9 12)
egen float measurement = seq(), from(1) to(50) block(6)

//fictional value of measurement (no systematic diff btw control and
experimental group)
gen mymeasurement=rchi2(3)
}

//check
mean mymeasurement, over(arm interval)

//collapse
collapse (mean) mean=mymeasurement (semean) semean=mymeasurement, by(arm
interval)
gen lb= mean-invnormal(0.975)*semean
gen ub= mean+invnormal(0.975)*semean


//get -eclplot- by Roger Newson
cap ssc inst eclplot
//see what happened there...
di in red _rc

//graph
eclplot mean lb ub interval, eplot(bar) ciopts(blcolor(black))
estopts(barwidth(0.25)) ///
estopts1(bcolor(red)) estopts2(bcolor(blue)) supby(arm, spaceby(0.25))
xscale(range(0 6)) xlabel(0 1 3 6 9 12)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Montag, 20. April 2009 15:23
An: [email protected]
Betreff: Re: AW: AW: AW: AW: st: Re: graph question


--- On Mon, 20/4/09, Martin Weiss wrote:

> Let me think about combining those two w/o overlapping...

What about this:

*---------------- begin example ---------------------
clear*

qui{
//create data
set obs 600

gen arm= cond(_n<301,0,1)
lab def arms 0 "control" 1 "experimental"
la val arm arms

egen float interval = fill(0 1 3 6 9 12 0 1 3 6 9 12)
egen float measurement = seq(), from(1) to(50) block(6)

//fictional value of measurement (no systematic diff btw control and
experimental group)
gen mymeasurement=rchi2(3)
}

//check
mean mymeasurement, over(arm interval)

//collapse
collapse (mean) mean=mymeasurement (semean) semean=mymeasurement, by(arm
interval)
gen lb= mean-invnormal(0.975)*semean
gen ub= mean+invnormal(0.975)*semean


gen interval2 = cond(arm == 1, interval + .25, interval - .25)
twoway bar mean interval2, barwidth(.4) || ///
       rcap lb ub interval2,               ///
       xlabel(0 1 3 6 9 12)                ///
       xmlabel( -.25 "c"   .25 "e"         ///
                 .75 "c"  1.25 "e"         ///
                2.75 "c"  3.25 "e"         ///
                5.75 "c"  6.25 "e"         ///
                8.75 "c"  9.25 "e"         ///
               11.75 "c" 12.25 "e" )       ///
       legend(off)
*------------------- end example -------------------

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------





      

*
*   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/



      

*
*   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/



      

*
*   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/

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