ben-domingue / irw

Code related to data for the Item Response Warehouse
https://datapages.github.io/irw/
7 stars 10 forks source link

Challenges in Process Dissociation Measures for Moral Cognition #456

Closed ben-domingue closed 1 month ago

ben-domingue commented 1 month ago

https://osf.io/vmy4q/

License: CC-By Attribution 4.0 International

https://osf.io/preprints/psyarxiv/du6ah/

KingArthur0205 commented 1 month ago

This dataset includes questions from 2 different scales on 1043 participants: PDP-dilemmas and High-conflict dilemmas.

  1. PDP-dilemmas: 18 items on a 2-point scale. 1 = Acceptable, 2 = Unacceptable
  2. High-conflict dilemmas: 12 items on a 7-point scale.
KingArthur0205 commented 1 month ago

Zipped Version(CSV and Rdata): CPDMMC_Kunnari_2020_CSV.zip CPDMMC_Kunnari_2020_Rdata.zip

Individual Datasets: CPDMMC_Kunnari_2020_HCD.csv CPDMMC_Kunnari_2020_PDP.csv

Code:

# Paper: https://osf.io/preprints/psyarxiv/du6ah
# Data: https://osf.io/vmy4q/
library(haven)
library(dplyr)
library(tidyr)

df <- read.csv("PDP_data.csv")
df <- df |>
  mutate(id = row_number()) |>
  select(-starts_with("AC"), -education, -age, -gender)

# ------ Process PDP-dilemmas Dataset ------
pdp_df <- df |>
  select(ends_with("_C"), ends_with("_IC"), id)
pdp_df <- pivot_longer(pdp_df, cols=-id, names_to="item", values_to="resp")

save(pdp_df, file="CPDMMC_Kunnari_2020_PDP.Rdata")
write.csv(pdp_df, "CPDMMC_Kunnari_2020_PDP.csv", row.names=FALSE)

# ------ Process High-conflict Dilemmas Dataset ------
hcd_df <- df |>
  select(-ends_with("_C"), -ends_with("_IC"))
hcd_df <- pivot_longer(hcd_df, cols=-id, names_to="item", values_to="resp")

save(hcd_df, file="CPDMMC_Kunnari_2020_HCD.Rdata")
write.csv(hcd_df, "CPDMMC_Kunnari_2020_HCD.csv", row.names=FALSE)
KingArthur0205 commented 1 month ago

PR for this issue: https://github.com/ben-domingue/irw/pull/474

ben-domingue commented 1 month ago

these look good. one note: they had 2/1 responses in one dataset that i made 1/0. nbd, i made a comment in the code so nothing further needed. https://github.com/ben-domingue/irw/blob/main/data/CPDMMC_Kunnari_2020.R