[R] GEE with Inverse Probability Weights

Thomas Lumley tlumley at uw.edu
Wed Jun 13 11:04:16 CEST 2012


On Wed, Jun 13, 2012 at 9:25 AM, RFrank <sparkyjc at gmail.com> 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



More information about the R-help mailing list