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]

st: Metan -- Trouble with Forest Plot


From   Shelley <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Metan -- Trouble with Forest Plot
Date   Thu, 31 May 2012 15:40:39 -0500

Hello Listers -- I am working on a meta-analysis and have found the Stata Journal publication very helpful, but I am stuck on the code for the last few steps and am trying to work this out.
 
I have 10 studies.  Two report binary outcomes (which are based on a continuous outcome) which I have converted to SMD using the Campbell Collaborative Calculator.  However, when I hand enter the effect sizes (with se and ci) for these two studies with data editor, metan ignores these in producing my forest plot.  It does, however, produce plotted data for all other studies, for which I provided only means and sds for control and treatment groups.
 
This is the code I am using:
metan no_trt mean_trt sd_trt no_control mean_ctrl sd_ctrl, hedges random lcols(Study) xlabel (-4, -2, 0, 2, 4) ytitle(Effect Size Summary) favours(Favors Control # Favors Treatment)
 
What's missing?  And, how can I also keep the same thing from happening in my funnel plot?
 
Thank you!
 

Sent from my iPhone

On May 31, 2012, at 3:27 PM, "Schaffer, Mark E" <[email protected]> wrote:

> Hi all.  "Variable running totals" isn't the best description of the
> problem, but it's not too far off.
> 
> A colleague has written to me with the following problem.  He has a
> panel dataset with two variables: id and date.  (He has some other
> variables but those are the two that matter.)  There may be multiple
> observations on id for a given date.  The date variable is in Stata %td
> format (#days after 01jan1960).  So it looks like this:
> 
> id    date
> 1    1000
> 1    1002
> 1    1002
> 1    1200
> 1    1250
> 2    1050
> 2    1059
> 2    1085
> 
> ...etc.
> 
> 
> The question is, how to construct a variable that counts the number of
> observations that an individual (id) appears in the dataset up to 30
> days previously.  If we call the variable count30, it would look like
> this:
> 
> id    date    count30
> 1    1000        1
> 1    1002        2
> 1    1002        3
> 1    1200        1
> 1    1250        1
> 2    1050        1
> 2    1059        2
> 2    1085        2
> 
> ...etc.
> 
> I suspect there's an easy way of doing this, but the only ways I could
> think of involved brute force looping through observations.
> 
> Any ideas?
> 
> --Mark
> 
> 
> -- 
> Heriot-Watt University is the Sunday Times
> Scottish University of the Year 2011-2012
> 
> Heriot-Watt University is a Scottish charity
> registered under charity number SC000278.
> 
> 
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index