search for: apistrat

Displaying 5 results from an estimated 5 matches for "apistrat".

Did you mean: apistat
2008 Aug 06
1
Warning when using survey:::svyglm
...stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) svyglm(sch.wide~meals+acs.core+hsg,dstrat,family="binomial") I get: Stratified Independent Sampling design ... Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm! Is this still indicative of a problem? Thanks, Ben
2005 Oct 04
1
"Survey" package and NAMCS data... unsure of specification
...e of standard errors for a cross-tabulation. PROC CROSSTAB DATA=COMB1 DESIGN=WR FILETYPE=SAS; NEST CSTRATM CPSUM/MISSUNIT; In R, the svydesign command is used to set the sampling scheme, but as follows (example from the documentation): dstrat <- svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) stratified on stype, with sampling weights pw. The fpc variable contains the population size for the stratum. As the schools are sampled independently, each record in the data frame is a separate PSU. This is indicated by id=~1. Since the sampling weights could have been determined fro...
2012 Feb 13
1
survey package svystat objects from predict()
Hello, I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with version 3.28 of Thomas Lumley's survey package. I was using predict() from svyglm(). E.g.: data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) out <- svyglm(sch.wide~ell+mobility, design=dstrat, family=quasibinomial()) pred.df <- expand.grid(ell=c(20,50,80), mobility=20) out.pred <- predict(out, pred.df) From the console out.pred looks like this: > class(out.pred) [1] "svystat" > print(out.pr...
2009 Dec 07
0
zelig logit survey
...se the model is not using "quasibinomial" (see R-News 2003, Analyzing Survey Data in R, by Thomas Lumley). Is there a way to change the model to use "quasibinomial"? Reproducible example: library(Zelig) library(survey) data(api) z.out <- zelig(form = yr.rnd ~ api00, data = apistrat, model = 'logit.survey', id = ~1, strata = ~ stype, weight = ~pw, fpc = ~fpc) summary(z.out) Respectfully, Frank Lawrence
2014 Oct 15
2
Advice on package design for handling of dots in a formula
...ationID=~ID, strata=~site, data=mydata) myresults <- doanalysis(formula=y~X1+X2+X3, design=mystudy) But it seems that the survey package is also not designed to handle the dot. data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) svyglm(api00~., design=dstrat) Error in svyglm.survey.design(api00 ~ ., design = dstrat) : all variables must be in design= argument Does anyone have advice on how best to handle this? 1. Tell my tester "Tough, you can't use dots in a formula in my package".essentially...