View source: R/svyPVbenchmark.R
| svyPVbenchmark | R Documentation | 
This function works in a similar fashion like the svyPVlevel
function. It discretizes the plausible values to a dichotomous variable and
estimates the proportion of population totals above and below the benchmark
within the comitted groups (by statement).
svyPVbenchmark(by, svydat, pvs, BENCH = NA, colN = FALSE)
by | 
 A formula statement is expected which splits the data into several subsets.  | 
svydat | 
 A survey design (  | 
pvs | 
 A character vector which includes the colnames of the plausible
values. These variables must be part of the survey design comitted as
  | 
BENCH | 
 Submit a benchmark (numeric vector of length = 1). A plausible value will be assigned to "< benchmark" if it is below the benchmark and assigned to ">= benchmark" if it is on or above the benchmark.  | 
colN | 
 If TRUE the colnames will equal the grouping variable names from the by statement. If FALSE, which is the default, the names will be Group1 up to Group k.  | 
The function returns a data.frame with the following columns
Group1..k | 
 The first k-1 columns show the different levels of the k-1
subsetting groups, provided with   | 
Number.of.cases | 
 Shows the unweighted number of cases (NA's excluded) within each group.  | 
Sum.of.weights | 
 Shows the sum of weights (NA's excluded) within each group.  | 
Proportion | 
 Contains the estimate of the conditional proportion of persons below and on/above the benchmark given the categories of the first k-1 groups.  | 
Proportion.SE | 
 Contains the SE of the proportion estimate.  | 
Manuel Reif
Lumley, T. (2010). Complex Surveys. Hoboken, NJ: Wiley.
Saerndal, C.-E. & Swensson, B. & Wretman, J. (1992). Model Assisted Survey Sampling. New York: Springer.
Chaudhuri, A. & Stenger, H. (2005). Survey Sampling. Theory and Methods. Boka Raton, FL: Chapman & Hall/CRC.
svyPVlevel
data(svy_example1)
erg_ben <- svyPVbenchmark(by = ~ sex, svydat=svy.exrep, 
pvs=c("plaus1","plaus2","plaus3"), BENCH=320)
erg_ben
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.