Learn R Programming

deliberr (version 0.1.0)

permute_dri: Permute DRI

Description

permute_dri tests whether the links between considerations and policy preferences are consistent or likely due to chance

Usage

permute_dri(data, iterations = 10000, verbose = FALSE, summary = TRUE)

Value

dataframe with permutation test results, raw or summarized. Summarized results include the number of participants, n, the observed DRI, obs_dri, the number of permutations conducted, n_perm, the mean permutation DRI, mean_perm_dri, and the frequency which the permutation DRI is greater or equal to the observed DRI, p

Arguments

data

raw DRI survey dataframe

iterations

number permutations to generate

verbose

a logical flag to print time of permutation

summary

a logical indicating whether to return the raw data or summary of test results; raw data is optimal for plotting permutation results

Examples

Run this code

# get pre-deliberation (stage_id == 1) data from Zukunft case
data <- human_data[human_data$stage_id == 1 & human_data$case == "Zukunft", ]

# permute DRI 100 times
permute_dri(data, iterations = 100)

Run the code above in your browser using DataLab