Re: [R] Risk differences with survey package

2011-03-07 Thread Thomas Lumley
On Tue, Mar 8, 2011 at 6:50 AM, wrote: > > I'm trying to use the survey package to calculate a risk difference with > confidence interval for binge drinking between sexes. Variables are > X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group > prevalences easily enough with > > resul

[R] Risk differences with survey package

2011-03-07 Thread Michael . Laviolette
I'm trying to use the survey package to calculate a risk difference with confidence interval for binge drinking between sexes. Variables are X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group prevalences easily enough with result <- svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm