Statalist The Stata Listserver


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

RE: st: St: metabias command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: St: metabias command
Date   Thu, 22 Jun 2006 15:12:23 +0100

In the case of Galbraith plots, 

. findit galbraith 

points to -galbr-, last publicly updated in STB-56, 
which must be installed from the StataCorp website. 

This was my hack at a modernisation of -galbr- 
a while back. I didn't get as far as a help 
file. The syntax must be inferred from
the -syntax-. 

*! galbr8 NJC 3.0.1 16 November 2005
*! galbr8 NJC 3.0.0 16 November 2005
*! galbr AT 2.0 Marc 2000     (STB-56: sbe20.1)
*! galbr AT 1.15 June/October 1997
program galbr8 
	version 8.2
	syntax varlist(min=2 max=2 numeric) [if] [in] ///
	[, id(varname) scatter(str asis) fitted(str asis) ///
	upper(str asis) lower(str asis) *]
	
	tokenize `varlist'
	args E SE 
	
	quietly { 
		marksample touse 
		count if `touse' 
		if r(N) == 0 error 2000 

		tempvar x y 
		gen `x' = 1 / `SE'
		su `x' if `touse', meanonly 
		local maxx = r(max) 
		gen `y' = `E'/`SE' 
		reg `y' `x' if `touse', noconstant
	}	

	if "`id'" != "" local show "ms(none) mla(`id') mlabpos(0)"
		
	scatter `y' `x' if `touse', `show' `scatter' || /// 
	function fitted = _b[`x'] * x, ra(0 `maxx') `fitted' || ///  
	function upper = 2 + _b[`x'] * x, ra(0 `maxx') ///
		clp(dash) clc(green) `upper' || ///  
	function lower = -2 + _b[`x'] * x, ra(0 `maxx') ///
		clp(dash) clc(green) `lower' || ///  
	, legend(order(2 3 "upper and lower limits") row(1)) ///  
		yti(b / se(b)) xti(1 / se(b)) `options' 
end

Nick 
[email protected] 

b. water
 
> I am using Stata 8.2, Windows XP.
> 
> This is my metan version:
> 
> . which metan
> c:\ado\plus\m\metan.ado
> *! version 1.86 1Apr2004
> 
> For metabias and galbraith:
> 
> -help metabias-
> -help galbr-
 
fes6

> > I am using continuous data.
> > After using the  metan command  I have the _ES, and _seES.
> > What will be the commands for metabias for the egger graph?
> > And also for the gailbrath plot? 

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