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: metan - consistency between six, two and three variable forms


From   "Ross Harris" <[email protected]>
To   <[email protected]>
Subject   RE: st: metan - consistency between six, two and three variable forms
Date   Wed, 7 Dec 2011 17:24:51 -0000

Dear Richard, Statalisters

The 6-parameter form of metan is for convenience and underneath the
wrapping it is indeed doing the same old analysis of estimates plus
standard errors. Some care needs to be taken as the default analysis for
continuous data is of standardised mean differences, so this must either
be performed by hand to ensure comparability, or the *nostandard* option
employed. The code below requires a couple of revisions- namely, to
standardise differences (if required); and there is a bracket out of
place in the variance formula (Cohen's). The following code will then
give matching answers:

use http://fmwww.bc.edu/repec/bocode/m/metan_example_data, clear

gen s=sqrt( ((tsample-1)*(tsd^2)+(csample-1)*(csd^2)) /
(tsample+csample-2) )
gen d = (tmean - cmean)/s	// computes STANDARDISED mean effect
gen var_d = ( (tsample+csample) / (tsample*csample)) +
(d^2)/(2*(tsample+csample-2))
gen se_d = sqrt(var_d)

* metan code for 6 vars vs. two variable method
metan tsample tmean tsd csample cmean csd, by(type_study) sgweight fixed
second(random) nograph
metan d se_d, by(type_study) sgweight fixed second(random) nograph

Best wishes,
Ross

PS- apologies for the long break in this thread

> Date: Thu, 24 Nov 2011 17:50:12 +0000
> From: Richard Palmer-Jones <[email protected]>
> Subject: st: metan - consistency between six, two and three variable 
> forms
>
> Dear Readers
>
> I was surprised to find that when I calculated effect sizes (d) using 
> the six varaiale form (n_, mean_ and sd_treatment followed by n_, 
> mean_ and sd_controls I do not get the same results as with the two (d

> and
> se_d) and three (d, ci_lo and ci_hi) forms, when I transform the six 
> variables into the two and three variables.
>
>
> use http://fmwww.bc.edu/repec/bocode/m/metan_example_data, clear
>
> * N, means and standard deviations of treatment and control - example 
> given in help metan metan tsample tmean tsd csample cmean csd,
> by(type_study) sgweight ///
> 	fixed second(random) rfdist counts label(namevar = id) ///
> 	favours(Treatment reduces blood pressure # Treatment increases
blood
> pressure) name(_6vars, replace)
>
> * effect size and its standard error
> gen d : "mean difference"  = tmean - cmean	// computes mean effect
> * variance of mean effect from Wilson effect size calculator gen var_d
:
> "variance of d" = (( tsample +  csample) / ( tsample * csample ) + d^2

> /
> (2 * ( tsample + csample))) gen sd_d = sqrt(var_d) gen se_d : 
> "standard error of d" = sqrt(var_d) / sqrt(tsample +  csample)
>
> * 95% cis
> gen ci_95_d_lower = d - invnormal(0.975) * sqrt(var_d) / sqrt(tsample
> +  csample)
> gen ci_95_d_upper = d + invnormal(0.975) * sqrt(var_d) / sqrt(tsample
> +  csample)
>
> * three variable method
> metan d ci_95_d_lower ci_95_d_upper , by(type_study) ///
> 	sgweight fixed second(random) rfdist  label(namevar = id) /// //

> counts
> 	favours(Treatment reduces blood pressure # Treatment increases
blood 
> pressure)name(_3vars, replace)
>
> * two variable method
> metan d se_d, by(type_study) ///
> 	sgweight fixed second(random) rfdist  label(namevar = id) /// //

> counts
> 	favours(Treatment reduces blood pressure # Treatment increases
blood
> pressure) name(_2vars, replace)
>
>
> I have obviously got the wrong end of the stick - is it that the two 
> and three variable forms are for OR/RR only?
>
> Is there any way round this? I am trying to do a meta analysis on 
> papers that present different statistics - using different estimation 
> methods, etc., and want to convert them to a common form that can be 
> input to a meta analysis.
>
> As usual, all advice much appreciated.
>
> Richard

-----------------------------------------
**************************************************************************
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk
**************************************************************************

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