ebp_test_means {povmap} | R Documentation |
Perform test for difference between survey and census means
Description
This function computes weighted means of the same set of variables within the census and the survey. A test for difference of the means are performed for each variable with two-tailed p-values returned.
Usage
ebp_test_means(varlist, smp_data, pop_data, weights = NULL, pop_weights = NULL)
Arguments
varlist |
character vector, the set of variables of interest |
smp_data |
the survey data |
pop_data |
the population data |
weights |
a character string containing the name of a variable that
indicates weights in the sample data. If a character string is provided
a weighted version of the ebp will be used. The variable has to be numeric.
Defaults to |
pop_weights |
a character string containing the name of a variable that
indicates population weights in the populatation data. If a character string
is provided weighted indicators are estimated using population weights.
The variable has to be numeric. Defaults to |
Value
dataframe with census and survey means and test results for their difference.
Examples
data("eusilcA_pop")
data("eusilcA_smp")
variables <- c("gender", "eqsize", "cash", "self_empl",
"unempl_ben", "age_ben", "surv_ben",
"sick_ben", "dis_ben", "rent", "fam_allow",
"house_allow", "cap_inv", "tax_adj")
ebp_test_means(varlist = variables,
pop_data = eusilcA_pop,
smp_data = eusilcA_smp,
weights = "weight")