Hi,

I want to do logistic regression based on a complex sample design. I used
package survey, but when I ran svyglm, an error message came out:
Error in onestrat(x[index, , drop = FALSE], clusters[index],
nPSU[index][1],  :
  Stratum (16) has only one PSU at stage 1


My code is below:

a.design<-svydesign(id = ~CASENUM ,strata = ~STRATUM ,data = a ,weights =
~SIZAGYWT )
summary(logistic1 <- svyglm(ANYCONTR ~ CHAIN+OWN+HPPAT, family =
binomial(link = "logit"), design=a.design))


How to solve this issue? Thank you.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to