| adjust_ezdm_accuracy | R Documentation |
Deprecated. ezdm_summary_stats() now returns
contaminant-free n_upper and n_trials, so this second step is no
longer needed; applying it corrects the same cell twice. Set the guess
rate with the guess_rate argument of ezdm_summary_stats() instead.
Adjusts accuracy counts (n_upper, n_trials) by removing
estimated contaminant trials using binomial sampling. Contaminant trials
are assumed to produce correct responses at a fixed guess rate (e.g., 0.5
for 2AFC tasks).
adjust_ezdm_accuracy(n_upper, n_trials, contaminant_prop, guess_rate = 0.5)
n_upper |
Numeric. Count of upper boundary (correct) responses, a single value. |
n_trials |
Numeric. Total number of trials, a single value. |
contaminant_prop |
Numeric. Estimated proportion of contaminant trials
(e.g., from the |
guess_rate |
Numeric. Assumed accuracy rate for contaminant trials (random guessing). Default is 0.5 (appropriate for 2AFC tasks). |
The function adjusts one cell at a time. Vectors of length greater
than one are an error; to correct several cells, use
ezdm_summary_stats() on each group.
Uses binomial sampling to estimate the number of contaminant trials and contaminant correct responses, then subtracts these from the raw counts. Because of the stochastic sampling, results will vary across calls unless a seed is set by the user.
A 1-row data.frame with columns n_upper_adj and n_trials_adj
(integers). When contaminant_prop is NA or <= 0, returns the original
counts unchanged.
ezdm_summary_stats() for computing the summary statistics and
contamination proportions
# Deprecated. ezdm_summary_stats() returns contaminant-free counts already:
set.seed(42)
rt <- c(rnorm(80, 0.55, 0.05), runif(20, 0.1, 4))
response <- c(rbinom(80, 1, 0.85), rbinom(20, 1, 0.5))
ezdm_summary_stats(rt, response, contaminant_bound = c(0.1, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.