Closed ajdamico closed 1 year ago
library(convey) library(survey) library(laeken) data(eusilc) ; names( eusilc ) <- tolower( names( eusilc ) ) # linearized design des_eusilc <- svydesign( ids = ~rb030 , strata = ~db040 , weights = ~rb050 , data = eusilc ) des_eusilc <- convey_prep(des_eusilc) svyzenga( ~eqincome , design = des_eusilc ) # replicate-weighted design des_eusilc_rep <- as.svrepdesign( des_eusilc , type = "bootstrap" ) des_eusilc_rep <- convey_prep(des_eusilc_rep) # works svyzenga( ~ py010n , design = des_eusilc_rep , na.rm = TRUE ) # should return NA not error svyzenga( ~ py010n , design = des_eusilc_rep )