Description Usage Arguments Value Examples
Simulate the true response to a continuous numerical response question in a given population with specified characteristics for sex, race/ethnicity, education, and population
1 2 | simulate_response_education_continuous(geovector, lambda_geography, lambda_sex,
lambda_raceethnicity, lambda_education)
|
geovector |
A vector of geographies specified as a two letter
abbreviation or a 5-digit FIPS code. Each geography must be the entire U.S.
( |
lambda_geography |
Numeric vector specifying lambda (Poisson
distribution) for the survey respondents by geography in the same bins as
|
lambda_sex |
Numeric vector specifying lambda (Poisson distribution)
for the survey respondents by sex in the order male, then female, for
example, |
lambda_raceethnicity |
Numeric vector specifying lambda for the survey
respondents by race/ethnicity in the order white alone, Hispanic or Latino,
black alone, Asian alone, and other, for example,
|
lambda_education |
Numeric vector specifying lambda for survey
respondents by educational attainment in the following bins: less than
high school diploma, high school graduate (includes equivalency), some
college or associate's degree, bachelor's degree or higher, for example,
|
A data frame with 3 columns (value
, answer
, and
result
) that tabulates the true response to the continuous, numerical
survey question in the given geography.
1 2 3 4 5 6 7 8 9 10 11 12 | geovector <- c("WI", "WV")
lambda_geography <- c(50, 10)
# lambda_sex specifies the response weights of men/women
# in this example, women have a higher mean response than men
lambda_sex <- c(25, 75)
lambda_raceethnicity <- c(90, 10, 50, 50, 50)
lambda_education <- c(20, 40, 60, 80)
opinionDF <- simulate_response_education_continuous(geovector,
lambda_geography,
lambda_sex,
lambda_raceethnicity,
lambda_education)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.