[R] survey package question

2012-10-11 Thread Sebastián Daza
Hello, I have got a cluster sample using an election dataset where I already had the final results of a county-specific election. I am trying to figure out what would be the best sampling design for my data. The structure of the dataset is: 1) polling station (in general schools where people

Re: [R] survey package question

2012-10-11 Thread Thomas Lumley
On Fri, Oct 12, 2012 at 6:56 AM, Sebastián Daza sebastian.d...@gmail.com wrote: Hello, I have got a cluster sample using an election dataset where I already had the final results of a county-specific election. I am trying to figure out what would be the best sampling design for my data. The

Re: [R] survey package question

2012-10-11 Thread Sebastián Daza
Hello Thomas, I use both svymean (with the expanded sample = people), and svyratio (voting unit level), using the same design: design -svydesign(id=~station + unit, fpc=~probstation+probunits, data=sample, pps=brewer) I got different results using the same sample: svyratio (voting unit)

[R] survey package question

2010-02-18 Thread Richard Valliant
Should the svyby function be able to work with svyquantile? I get the error below ... data(api) dclus1-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc) svyby(~api00, design=dclus1, by = ~stype, quantiles=c(.25,.5,.75), FUN=svyquantile,

Re: [R] survey package question

2010-02-18 Thread Thomas Lumley
On Thu, 18 Feb 2010, Richard Valliant wrote: Should the svyby function be able to work with svyquantile? I get the error below ... It works, but you need to either specify ci=TRUE or keep.var=FALSE. The problem is that svyquantile() by default does not produce standard errors.