Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: meta-analysis residual question


From   Roger Harbord <roger.harbord@bristol.ac.uk>
To   statalist@hsphsun2.harvard.edu, "Garrard, Wendy M." <wendy.garrard@vanderbilt.edu>
Subject   Re: st: meta-analysis residual question
Date   Fri, 18 Feb 2005 12:09:47 -0000

--On 17 February 2005 21:55 -0600 "Garrard, Wendy M." <wendy.garrard@vanderbilt.edu> wrote:


Could someone help me understand the fitted values that are generated
post-estimation using the metareg (updated version)?

After a meta-regression I generated the fitted values using (predict
yhat).

But, I get quite different values when I use the regression equation to
obtain the fitted values like so:
	(gen yhat2 = _b[_cons] + _b[Var1]*Var1 + _b[Var2]*Var2 -
_b[Var3]*Var3)

For example, for the first record in my data set, the fitted value is .5
using the predict command, and 1.1 obtained via the equation.

I assume this difference has something to do with how the weighting is
used in the postestimation command, but I'd like to understand how to
correctly approximate the fitted values using the equation.
Dear Wendy,

There's no reason for the two methods to differ. The weights aren't used when calculating fitted values (other than their effect on the coefficients already estimated). I can't reproduce this problem using my own example datasets. But I'm assuming the minus sign before the Var3 term in your code above is a typo for a plus - if not that could be the source of the problem!

If that's not it could you send me a full log-file using the procedure outlined at
http://www.stata.com/support/faqs/techsup/sendout.html
(please email me alone not Statalist and i'll summarise our finding to the list later)

Thanks,
Roger.

--
Roger Harbord
Department of Social Medicine, University of Bristol
http://www.epi.bris.ac.uk


*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index