Z_identities(
a=.5,
b=.1,
a_and_b=.05,
a_or_b=.55,
a_given_b=.5,
b_given_a=.1,
a_given_not_b=.5,
b_given_not_a=.1,
a_and_not_b=.45,
b_and_not_a=.05,
)
#Get identities for a set of participants
library(magrittr)
library(dplyr)
library(tidyr)
data.frame(
ID = LETTERS[1:20],
a=runif(20),
b=runif(20),
a_and_b=runif(20),
a_or_b=runif(20),
a_given_b=runif(20),
b_given_a=runif(20),
a_given_not_b=runif(20),
b_given_not_a=runif(20),
a_and_not_b=runif(20),
b_and_not_a=runif(20),
not_a=runif(20),
not_b=runif(20)
) %>%
group_by(ID) %>%
do(
Z_identities(
.$a,
.$b,
.$a_and_b,
.$a_or_b,
.$a_given_b,
.$b_given_a,
.$a_given_not_b,
.$b_given_not_a,
.$a_and_not_b,
.$b_and_not_a,
.$not_a,
.$not_b
)
)
Run the code above in your browser using DataLab