View source: R/model_sdt_cdp.R
| aggregate_sdt_cdp_data | R Documentation |
sdt_cdp()Reshapes long-format Remember/Know recognition data – one row
per trial, or one row per response category with a count column – into
the aggregated wide format sdt_cdp() is fit to: one row per cell and
one count column per response category, named new1 ... new<n_new>,
know<k> / remember<k> (and guess<k> when the data contain "guess"
judgments), with k on the unified confidence scale
n_new + 1 ... n_new + n_old.
aggregate_sdt_cdp_data(data, judgment, confidence, count = NULL, response = "")
data |
A data frame in long format. Cells are defined by all columns
other than |
judgment |
The name of the column coding the memory judgment, with
values |
confidence |
The name of the column coding confidence on the unified old/new scale (integer, 1 = most confident "new" to K = most confident "old"; "new" judgments occupy the low levels, "old" judgments the high levels). |
count |
Optional name of a column of response counts. If |
response |
Optional common prefix for the generated count columns
(default |
A data frame with one row per cell: the cell-defining columns
followed by the response count columns, ready to pass to bmm() with an
sdt_cdp() model. The numbers of "new" and "old" confidence levels are
inferred from the data.
dat <- data.frame(
stimulus = c(1L, 1L, 1L, 0L, 0L, 0L),
judgment = c("remember", "know", "new", "new", "know", "new"),
confidence = c(3L, 2L, 1L, 1L, 3L, 1L),
count = c(40L, 25L, 15L, 55L, 10L, 20L)
)
aggregate_sdt_cdp_data(dat, "judgment", "confidence", "count")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.