GEE with Inverse Probability Weights

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GEE with Inverse Probability Weights

RFrank
Greetings,

I have a very, very, simple research question.  I want to predict one dichotomous variable using another dichotomous variable.  Straightforward, right?  The issue is that the dataset has two issues causing some complications for me.

1) The subjects are not independent -- they are sibling pairs.  Every person in the dataset has a sibling in the dataset.  This needs to be treated a nuisance for the purposes of my analysis.
2) The subjects were not sampled randomly.  Some of the subjects had a higher probability of selection, and I want to incorporate inverse-probability weights into my analysis to account for this.  (The inverse-probability weights are already calculated).

I know that GEE is an appropriate technique to deal with Issue #1, and I've toyed with the gee pack in R.  
R> library("gee")
http://cran.r-project.org/web/packages/gee/gee.pdf

My question is -- how can I incorporate the sampling weights into the GEE code?  I don't see a spot for it based on the documentation here, unless I'm missing something obvious.  Or is there another GEE function I can use that would allow me to do this?  

Thanks!  
Reply | Threaded
Open this post in threaded view
|

Re: GEE with Inverse Probability Weights

Thomas Lumley-2
On Wed, Jun 13, 2012 at 9:25 AM, RFrank <[hidden email]> wrote:

> Greetings,
>
> I have a very, very, simple research question.  I want to predict one
> dichotomous variable using another dichotomous variable.  Straightforward,
> right?  The issue is that the dataset has two issues causing some
> complications for me.
>
> 1) The subjects are not independent -- they are sibling pairs.  Every person
> in the dataset has a sibling in the dataset.  This needs to be treated a
> nuisance for the purposes of my analysis.
> 2) The subjects were not sampled randomly.  Some of the subjects had a
> higher probability of selection, and I want to incorporate
> inverse-probability weights into my analysis to account for this.  (The
> inverse-probability weights are already calculated).
>
> I know that GEE is an appropriate technique to deal with Issue #1, and I've
> toyed with the gee pack in R.
> R> library("gee")
> http://cran.r-project.org/web/packages/gee/gee.pdf
>
> My question is -- how can I incorporate the sampling weights into the GEE
> code?  I don't see a spot for it based on the documentation here, unless I'm
> missing something obvious.  Or is there another GEE function I can use that
> would allow me to do this?

You don't need GEE; you can simply use logistic regression with
sampling weights and an appropriate description of the sampling
design.

eg
library(survey)
mydesign <- svydesign(id=~sib.pair.id, weights=~sampling.weights,
data=mydataset)

svyglm( response~predictor, family=quasibinomial(), design=mydesign)


   -thomas

--
Thomas Lumley
Professor of Biostatistics
University of Auckland

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: GEE with Inverse Probability Weights

RFrank
Thanks -- extremely helpful.  But what is the mechanism by which this analysis corrects for the fact that my subjects are clustered (twins)?
Reply | Threaded
Open this post in threaded view
|

Re: GEE with Inverse Probability Weights

Joshua Wiley-2
Hi Frank,

It clusters by twin, that is why in Dr. Lumley's example, the "id" was
twin pair, not individual, and the SE is adjusted accordingly.

Cheers,

Josh

On Thu, Jul 5, 2012 at 12:10 PM, RFrank <[hidden email]> wrote:

> Thanks -- extremely helpful.  But what is the mechanism by which this
> analysis corrects for the fact that my subjects are clustered (twins)?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/GEE-with-Inverse-Probability-Weights-tp4633172p4635533.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: GEE with Inverse Probability Weights

Thomas Lumley-2
If you're going to reply to something from two weeks ago, it's helpful
to include more of the conversation.

However, the mechanism is straightforward.  The standard error
estimator assumes only that observations in different clusters are
independent: it approximates the variance of the estimating functions
by the empirical variance of the cluster totals of the estimating
functions, and uses the delta method to convert this to a variance for
the coefficients.   It's the same as GEE.

In this simple setting it's the same as the GEE variance estimator.

   - thomas



On Fri, Jul 6, 2012 at 7:40 AM, Joshua Wiley <[hidden email]> wrote:

> Hi Frank,
>
> It clusters by twin, that is why in Dr. Lumley's example, the "id" was
> twin pair, not individual, and the SE is adjusted accordingly.
>
> Cheers,
>
> Josh
>
> On Thu, Jul 5, 2012 at 12:10 PM, RFrank <[hidden email]> wrote:
>> Thanks -- extremely helpful.  But what is the mechanism by which this
>> analysis corrects for the fact that my subjects are clustered (twins)?
>>
>> --
>> View this message in context: http://r.789695.n4.nabble.com/GEE-with-Inverse-Probability-Weights-tp4633172p4635533.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> Programmer Analyst II, Statistical Consulting Group
> University of California, Los Angeles
> https://joshuawiley.com/
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



--
Thomas Lumley
Professor of Biostatistics
University of Auckland

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.