Re: [R] Exactly Replicating Stata's Survey Data Confidence Intervals in R

2012-09-24 Thread Thomas Lumley
In the first and third examples it looks as though confint(svymean()) matches the totals and svyciprop(method="logit") matches the proportions, which is what Stata says (http://www.stata.com/statalist/archive/2006-10/msg01127.html). The agreement isn't perfect for the counts in the first example,

Re: [R] Exactly Replicating Stata's Survey Data Confidence Intervals in R

2012-09-24 Thread Anthony Damico
Hi Dr. Lumley, you're obviously correct about all of that. Thank you for cluing me into it! And sorry for overlooking that part of the documentation. I'm unfortunately still struggling with matching numbers exactly, and I foolishly provided a dataset without a weight variable - thinking there wa

Re: [R] Exactly Replicating Stata's Survey Data Confidence Intervals in R

2012-09-23 Thread Thomas Lumley
On Sat, Sep 22, 2012 at 2:51 AM, Anthony Damico wrote: > Survey: Mean estimation > > Number of strata = 1 Number of obs= 183 > Number of PSUs = 15 Population size = 9235.4 > Design df= 14 > > ---

[R] Exactly Replicating Stata's Survey Data Confidence Intervals in R

2012-09-21 Thread Anthony Damico
Hi everyone, apologies if the answer to this is in an obvious place. I've been searching for about a day and haven't found anything.. I'm trying to replicate Stata's confidence intervals in R with the survey package, and the numbers are very very close but not exact. My ultimate goal is to repl