Here’s the syntax of my query in R:
> ipums.design <- svydesign(id=~serial, strata=~strata, data=workers1, weights=perwt)
And here’s the result:
Error in inherits(weights, “formula”) : object ‘perwt’ not found
“Perwt” is a variable in the data frame workers1, so the error message doesn’t make sense. Serial and strata (a combo of statefip and puma) also are variables in the data frame. I’m trying to create svydesign, a more-or-less mandatory element in the survey package, so that I can run some statistical procedures on the data.