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: FW: DFBetas after GEE model


From   <[email protected]>
To   <[email protected]>
Subject   RE: st: FW: DFBetas after GEE model
Date   Thu, 15 Aug 2013 13:24:41 +0000

Many thanks Steve this worked perfectly.

Tim
________________________________________
From: [email protected] [[email protected]] on behalf of Steve Samuels [[email protected]]
Sent: 14 August 2013 03:50
To: [email protected]
Subject: Re: st: FW: DFBetas after GEE model

Correction to the formulas: b_i = (n*b - bpv_i)/(n-1)
The Stata code has it right.

S.

Tim,

Here's a direct approach. It utilizes psuedo-values from Stata's
-jackknife- prefix command to calculate coefficients when a set of
observations is is omitted. The obvious disadvantage is the time needed
for large data sets. For -xtgee- you'll  have to decide whether to
omit one individual or one panel at a time (cluster() option in
-jacknife-).

If:
    b = coefficient for entire sample
   b_i = coefficient omitting obs i
   se_i = standard error omitting i

The jackknife pseudovalue is: bpv_i = n*b - (n-1)*b_i

Thus: b_i = (bpv_i -n*b)/(n-1)

The standard error  se_i that omits i is
computed in the same way. Then:

   DFBETAS_i = (b - b_i)/se_i


**********CODE BEGINS***********************
sysuse auto, clear
local xvars trunk turn  //predictors
gen y = foreign       // short name

jackknife _b _se, keep: logit y  `xvars'
sum y_*  //pseudovalues

logit y `xvars'  //entire sample

foreach z of varlist `xvars'{
gen double b_`z' = (e(N)*_b[`z'] - y_b_`z')/(e(N) -1)
gen double se_`z' = (e(N)*_se[`z'] - y_se_`z')/(e(N)-1)
gen double dfb_`z' = (_b[`z']-b_`z')/se_`z'
label var dfb_`z' "DFBETAS `z'"
}
**************CODE ENDS**************

Steve

On Aug 13, 2013, at 6:02 AM, <[email protected]> <[email protected]> wrote:

Hi

Thanks - will take a look.

Is there anyone who has done any of these in Stata, the commands that work for other types of regression models (inc. GLM) are not available for the xtgee command.

Thanks

Tim Laing
________________________________________
From: [email protected] [[email protected]] on behalf of Najib Mozahem [[email protected]]
Sent: 12 August 2013 17:09
To: [email protected]
Subject: Re: st: FW: DFBetas after GEE model

"Generalized Estimating Equations" by Hardin and Hilbe says that Cooks, distance, and DFBETA and DFFIT residuals can be used with GEE models as well. They provide a brief summary about these techniques on pages 188-194.

Najib
On Aug 12, 2013, at 12:51 PM, <[email protected]> wrote:

> Hi,
>
> I've been running some GEE models and would like to do some checking for outliers and was wondering if anyone had tried to calculate Cook's distance or DFBetas after such models as is suggested by the literature.
>
> Thanks
>
> Tim Laing
> [email protected]
>
> Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
>
> *
> *   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/

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

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

Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index