Description Usage Arguments Details Value Author(s) Examples
View source: R/randomized_response_designer.R
Produces a (forced) randomized response design that measures the share of individuals with a given trait prevalence_trait
in a population of size N
. Probability of forced response ("Yes") is given by prob_forced_yes
, and rate at which individuals with trait lie is given by withholding_rate
.
1 2 3 4 5 6 7 | randomized_response_designer(
N = 1000,
prob_forced_yes = 0.6,
prevalence_rate = 0.1,
withholding_rate = 0.5,
args_to_fix = NULL
)
|
N |
An integer. Size of sample. |
prob_forced_yes |
A number in [0,1]. Probability of a forced yes. |
prevalence_rate |
A number in [0,1]. Probability that individual has the sensitive trait. |
withholding_rate |
A number in [0,1]. Probability that an individual with the sensitive trait hides it. |
args_to_fix |
A character vector. Names of arguments to be args_to_fix in design. |
randomized_response_designer
employs a specific variation of randomized response designs in which respondents are required to report a args_to_fix answer to the sensitive question with a given probability (see Blair, Imai, and Zhou (2015) for alternative applications and estimation strategies).
See vignette online.
A randomized response design.
1 2 | # Generate a randomized response design using default arguments:
randomized_response_design <- randomized_response_designer()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.