[R] survey package question

Richard Valliant rvalliant at survey.umd.edu
Thu Feb 18 19:29:12 CET 2010


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, 
      na.rm=T 
      )
 
> Error in object$coefficients : $ operator is invalid for atomic
vectors

A more general question is: can quantiles and their SEs be computed for
subgroups?
 
The same syntax works using svymean.

Thanks
R. Valliant
Univ. of Maryland, US



More information about the R-help mailing list