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: RE: eform
From
Joe Canner <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: RE: eform
Date
Mon, 31 Mar 2014 20:24:36 +0000
I suspected as much, but the help for both -eform- and -metareg- do not explicitly say this, so I wasn't sure if this was an intentional omission or not.
BTW, Claire, you might want to investigate further whether -eform- is appropriate for Hazard Ratios. If you do -help eform- you will see that the Stata usage of -eform- requires a sub-option, e.g. e(b), or, hr, rrr, etc. By default, -metareg- uses -eform(e(b))-, but you can do the following experiment to see that -eform(e(b))- and -eform(hr)- are not the quite the same thing:
regress HRa eGFR, eform(HR)
regress HRa eGFR
regress logHRa eGFR, eform(e(b))
I think it might have to do with how the intercept is treated, but I'm not sure. If necessary, you might be able to circumvent -metareg- entirely by doing the regression yourself, something like:
regress logHRa eGFR [iw=1/SElogHRa] , mse1 eform(hr)
followed by the code provided previously.
Regards,
Joe
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Monday, March 31, 2014 4:05 PM
To: [email protected]
Subject: Re: st: RE: eform
I'd take it as implied by official Stata convention that an -eform-
option only affects a tabular display. I'd usually be surprised if it
affected a graph too. That said, I leave metaphysics to those able and
inclined.
Nick
[email protected]
On 31 March 2014 20:58, Joe Canner <[email protected]> wrote:
> Claire,
>
> For whatever reason, the author of -metareg- has chosen not to incorporate the -eform- option into the -graph- option. If you believe this is an important oversight, you should make a suggestion to the author to that effect.
>
> In any case, it shouldn't be difficult to rectify this situation on your own. The code from metareg.ado that implements the -graph- option in your particular example isn't very involved:
>
> . tempvar fit
> . qui predict `fit'
> . local size 1/`v'
> . local yti : variable label `y'
> . scatter `y' `xvars' [aw=`size'], msymbol(oh) line `fit' `xvars', sort , legend(off) ytitle( `yti')
>
> Accordingly, you would just need to take the exponential of the dependent variable and of the fitted value and redo the graph. Something like this:
>
> metareg logHRa eGFR, wsse(SElogHRa) eform graph
> predict fit
> gen HRa=exp(logHRa) // or use the actual value of HR if you have it already
> gen efit=exp(fit)
> gen size=1/SElogHRa
> scatter HRa eGFR [aw=size], msymbol(oh) || line efit eGFR, sort ||, legend(off) ytitle(HRa)
>
> Whether this is an appropriate way to do meta-analysis of hazard ratios is another story (one which I'm not qualified to comment on).
>
> Regards,
> Joe Canner
> Johns Hopkins University School of Medicine
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Claire Rushton
> Sent: Monday, March 31, 2014 2:19 PM
> To: [email protected]
> Subject: st: eform
>
> I am using the eform option for a bubble plot using metareg but the y
> axis is still showing the log hazard ratio - please advise?
>
> The command i have used is
>
> metareg logHRa eGFR, wsse(SElogHRa) eform graph
>
> The y axis still shows logHRa.
>
> Thanks
> Claire
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/