Aha. As you will realise, neither Stata's -findit-
nor Google is yet able to scan your own machine.
-metareg- as written by David Wilson is not
an r-class command, although that does not rule
out its calling other commands that leave results
of the form r(). Therefore my best advice is
to insert a -return list- after your call to -metaregW-
to see what r-class results are in memory at that
point, because the key question is where r(corr) and r(pr)
come from.
Despite what you say, I still don't get the impression
that your code has broken by an upgrade to Stata 9.
Nick
[email protected]
Garrard, Wendy M.
> Sorry about not clarifying the --metaregW-- command. This macro is
> documented in Lipsey & Wilson's (2001) Practical Meta-Analysis, and is
> available on David Wilson's website
> (http://mason.gmu.edu/~dwilsonb/ma.html). Wilson's macro was
> originally
> named --metareg--, but this conflicts with another widely-used Stata
> macro name, so I changed the name to metaregW for my use.
>
> The mat / loop procedure ran fine under version 8. Indeed, I used it
> quite a bit to get these special type (weighted random effects
> bivariate) correlations. I only recently tried to use the procedure
> with version 9, and now it doesn't work properly.
Nick Cox
> This uses a procedure -metaregW-.
>
> The Statalist FAQ advises
>
> "Say what command(s) you are using.
> If they are not part of official Stata, say where they come from: the
> STB/SJ, SSC, or other archives."
>
> . findit metaregW
>
> finds nothing, and a Google search seems to find nothing much except
> your own previous references to
> -metaregW- in Statalist postings, so for I all know it is your own
> program.
>
> In general I suspect the problem is nothing to do with Stata
> 9. You must
> use exactly the same names as -metaregW- to pick up its results.
> -return list- after -metaregW- will tell you what -metaregW- returns.
Garrard, Wendy M.
> > I am hoping someone can help me get this bit of code (developed in
> > v.8) to run in v9.
> > The commands are below, and when it works properly, it calls a
> > "meta-regression" macro and produces a list (matrix) of bivariate
> > weighted random effects correlations between the effect
> size and each
> > variable in the varlist.
> >
> > This is the first time I've tried to use this do-file in v9, and no
> > correlations are showing up in the (oblong) matrix.
> >
> > Any suggestions? Thanks very much
> > --wg
> >
> > *********************
> > /*START*/
> > mat res = J(20,2,0)
> > local i 0
> > foreach v of varlist var1 var2 var3 var4 var5 {
> > qui metaregW es_adjRndwz `v' [aw=weight] , model(ml)
> > *summarize `v'
> > local ++i
> > mat res[`i',1] = r(corr)
> > mat res[`i',2] = r(pr)
> > local rl "`rl' `v'"
> > }
> > mat rownames res = `rl'
> > mat colnames res = Corr(ml) p-value
> > mat list res, f(%9.3f)
> > /*STOP*/
*
* 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/