[R] Svyglm Error

Courtney Benjamin cbenjami at BTBOCES.ORG
Wed Jul 5 20:24:21 CEST 2017


I am revisiting code from several different files I have saved from the past and all used to run flawlessly; now when I run any of the svyglm related functions, I am coming up with an error:

Error in model.frame.default(formula = F3ATTAINB ~ F1PARED, data = data,  :
  the ... list does not contain 4 elements
The following is a minimal reproducible example:

data <- getURL("https://raw.githubusercontent.com/cbenjamin1821/careertech-ed/master/elsq1adj.csv")
elsq1ch <- read.csv(text = data)

#Specifying the svyrepdesign object which applies the BRR weights
elsq1ch_brr<-svrepdesign(variables = elsq1ch[,1:16], repweights = elsq1ch[,18:217], weights = elsq1ch[,17], combined.weights = TRUE, type = "BRR")

##Resetting baseline levels for predictors
elsq1ch_brr <- update( elsq1ch_brr , F1HIMATH = relevel(F1HIMATH,"PreAlg or Less") )
elsq1ch_brr <- update( elsq1ch_brr , BYINCOME = relevel(BYINCOME,"0-25K") )
elsq1ch_brr <- update( elsq1ch_brr , F1RACE = relevel(F1RACE,"White") )
elsq1ch_brr <- update( elsq1ch_brr , F1SEX = relevel(F1SEX,"Male") )
elsq1ch_brr <- update( elsq1ch_brr , F1RTRCC = relevel(F1RTRCC,"Other") )

##Univariate testing for Other subset
Othpared <- svyglm(formula=F3ATTAINB~F1PARED,family="quasibinomial",design=subset(elsq1ch_brr,BYSCTRL==1&G10COHRT==1&F1RTRCC=="Other"),na.action=na.omit)

Any help in resolving this concern would be greatly appreciated.



Courtney Benjamin

Broome-Tioga BOCES

Automotive Technology II Teacher

Located at Gault Toyota

Doctoral Candidate-Educational Theory & Practice

State University of New York at Binghamton

cbenjami at btboces.org<mailto:cbenjami at btboces.org>


	[[alternative HTML version deleted]]

More information about the R-help mailing list