Skip to contents

Probability of recall by serial position and output position.

Usage

pnr(data, item_query = NULL, test_key = NULL, test = NULL)

Arguments

data

Merged study and recall data. List length is assumed to be the same for all lists within each subject.

item_query

Query string to select items to include in the pool of possible recalls to e examined.

test_key

Name of column with labels to use when testing transitions for inclusion.

test

Function that takes in previous and current item values and returns TRUE for transitions that should be included.

Value

Results with subject, output, input, prob, actual, and possible columns. The prob column for output x and input y indicates the probability of recalling input position y at output position x. The actual and possible columns give the raw tallies for how many times an event actually occurred and how many times it was possible given the recall sequence.

Examples

raw <- sample_data("Morton2013")
data <- merge_free_recall(raw)
recall <- pnr(data)
head(recall)
#>   subject output input       prob actual possible
#> 1       1      1     1 0.00000000      0       48
#> 2       1      1     2 0.02083333      1       48
#> 3       1      1     3 0.00000000      0       48
#> 4       1      1     4 0.00000000      0       48
#> 5       1      1     5 0.00000000      0       48
#> 6       1      1     6 0.00000000      0       48