I am trying to analyze nhamcs http://www.nber.org/data/national-hospital-ambulatory-medical-care-survey.html using Lumley's survey package but getting the wrong standard errors when comparing them against http://www.cdc.gov/nchs/data/ahcd/nhamcs_emergency/2011_ed_web_tables.pdf

current design object is defined as:

data.design <- survey::svydesign(id = ~CPSUM, strata = ~CSTRATM, weight = ~PATWT, data = data, nest = TRUE)

but this gives me the wrong s.e. for example, for the total population number of visits I get:

    total      SE

[1,] 136296400 7370965

while the pdf above reports (in thousands for both totals and s.e.):

136,296 (6,413)

would appreciate any thoughts on where I might be going wrong



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.