[R] subset svydesign problem

2015-06-03 Thread Daniela Droguett
Hi, it seems not possible to susbset a svydesign object (DBI svydesign) and use variables to make the subset expression uff<-c("14","15") for (i in 1:length(uff)) { subpnad<-subset(pnad, uf==uff[i] & v0302=='4') } the error is the following Error in sqliteSendQuery(con, statement, bind.data)

[R] vcov function and cross terms

2014-10-15 Thread Daniela Droguett
Hi, I would like to apply the vcov function from the survey package for the variables api00 and api99 grouped by the stype variable which can assume H, M and E categories. ​From the code in the survey package manual:​ ​data(api) dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc) r

[R] svyby and vcov function problem (Survey Package)

2014-09-17 Thread Daniela Droguett
Hi all, I would like to apply the vcov function from the survey package for the variables api00 and api99 grouped by the stype variable which can assume H, M and E categories (see below) I have tried svyby but as far as I know covariant matrices don't work with this function ​ In the code example