[R] Svyglm Error in Survey Package

Courtney Benjamin cbenjami at BTBOCES.ORG
Sat Sep 24 05:01:03 CEST 2016


In attempting to use the svyglm call in the R Survey Package, I am receiving the error: Error in pwt[i] : invalid subscript type 'list'

I have not been able to find a lot of information on how to resolve the error; one source advised it was related to how the subsetting command was executed.

This was my initial attempt:

mc1 <- svyglm(F3ATTAINMENT~F1SES2QU+F1RGPP2,elsq1ch_brr,subset(elsq1ch_brr,BYSCTRL==1 & G10COHRT==1),na.action)
summary(mc1)
This was my second approach trying to change up how I had subsetted the data:
summary(mc1)
samp1 <- subset(elsq1ch_brr,BYSCTRL==1 & G10COHRT==1)
dim(samp1)
mc1 <- svyglm(F3ATTAINMENT~F1SES2QU+F1RGPP2,elsq1ch_brr,subset=samp1,na.action)
summary(mc1)?

Both attempts resulted in the same error stated above.  Any advisement in how to resolve this error would be greatly appreciated.
Sincerely,
Courtney Benjamin

?



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>

607-763-8633

	[[alternative HTML version deleted]]



More information about the R-help mailing list