Description Usage Arguments Details Value Examples
Calculate some estimates of the margin of error for weighted survey results
1 2 3 | margin_of_error(inputfile, response)
margin_of_error_(inputfile, response_col)
|
inputfile |
A file containing the weighted survey data (a survey data
frame with post-stratification weights, such as those created by
|
response |
A column in |
response_col |
Response column as string |
margin_of_error
is given bare names while
margin_of_error_
is given strings and is therefore suitable for
programming with.
A list with
the percent standard error of the raw, unweighted survey,
the percent bias of the raw, unweighted survey (compared to the weighted survey),
the percent total error of the raw, unweighted survey (the square root of the sum of the squares of the bias and standard error), and
the percent standard error of the weighted survey.
1 2 | margin_of_error(system.file("extdata/weightedsurvey.csv", package = "WWC"),
response)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.