| sbs {ReGenesees} | R Documentation |
The sbs data frame stores artificial sbs-like sampling data, while sbs.frame is the artificial sampling frame from which the sbs units have been drawn. They allow to run R code contained in the ‘Examples’ section of the ReGenesees package help pages.
data(sbs)
The sbs data frame mimics data observed in a Structural Business Statistics survey, under a one-stage stratified unit sampling design. The sample is made up of 6909 units, for which the following 22 variables were observed:
idIdentifier of the sampling units (enterprises), numeric
publicDoes the enterprise belong to the Public Sector? factor with levels 0 (No) and 1 (Yes)
emp.numNumber of employees, numeric
emp.clNumber of employees classified into 5 categories, factor with levels [6,9] (9,19] (19,49] (49,99] (99,Inf] (notice that small enterprises with less than 6 employees fell outside the scope of the survey)
nace5Economic Activity code with 5 digits, factor with 596 levels
nace2Economic Activity code with 2 digits, factor with 57 levels
areaTerritorial Division, factor with 24 levels
censFlag identifying statistical units to be censused (hence defining take-all strata), factor with levels 0 (No) and 1 (Yes)
regionMacroregion, factor with levels North Center South
va.clClass of Value Added, factor with 27 levels
vaValue Added, numeric (contains NAs)
dom1A planned estimation domain, factor with 261 levels (dom1 crosses nace2 and emp.cl)
nace.macroEconomic Activity Macrosector, factor with levels Agriculture Industry Commerce Services
dom2A planned estimation domain, factor with 12 levels (dom2 crosses nace.macro and region)
strataStratification Variable, a factor with 664 levels (obtained by crossing variables region, nace2, emp.cl and cens)
va.imp1Value Added Imputed1, numeric (NAs were replaced with average values computed inside imputation strata obtained by crossing region, nace.macro, emp.cl)
va.imp2Value Added Imputed2, numeric (NAs were replaced with median values computed inside imputation strata obtained by crossing region, nace.macro, emp.cl)
yA numeric variable correlated with va
weightDirect weights, numeric
fpcFinite Population Corrections (given as sampling fractions inside strata), numeric
entConvenience numeric variable identically equal to 1 (sometimes useful, e.g. to estimate the total number of enterprises)
dom3An unplanned estimation domain, factor with 4 levels
The sbs.frame sampling frame (from which sbs units have been drawn) contains 17318 units.
data(sbs) head(sbs) str(sbs) str(sbs.frame)