ben-domingue / irw

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

Factor structure, measurement invariance, and psychometric properties of the Posttraumatic Cognitions Inventory (PTCI) and its brief version (PTCI-9) in Chinese adolescents and adults #403

Closed ben-domingue closed 1 month ago

ben-domingue commented 1 month ago

https://osf.io/tj8rh/

License: CC-By Attribution 4.0 International

https://psycnet.apa.org/record/2024-52701-001

KingArthur0205 commented 1 month ago

This paper includes 2 datasets.

The 1st dataset includes 2374 participants, and 33 PTCI items on a 7-point scale.(2 items from the original PTCI quesitonnaire were excluded by the author)

The 2nd dataset is used to assess test-retest reliability of PTCI.

The 2nd dataset includes 61 participants sampled at a different high school and items from multiple questionnaries. These participants were selected due to having experience in at least one traumatic event.:

  1. Life Events Checklist(LEC): 17-item questionnaire on 6-point scale.
  2. Posttraumatic Stress Disorder Checklist(PCL): 20-item questionnaire on a 4-point scale.
  3. Posttraumatic Cognitions Inventory(PTCI): 33-item questionnaire on a 7-point scale.
KingArthur0205 commented 1 month ago

Alternatively, we can combine the PTCI data in Study 2 with those in Study 1. However, participants in Study 1 didn't take a re-test

ben-domingue commented 1 month ago

so in study 2 they take the pcti data twice? i would vote we package study 1 pcti + the first attempt at pcti for study 2 into one dataset. the retest stuff may be kind of dubious, not really essential. does that seem doable?

KingArthur0205 commented 1 month ago

so in study 2 they take the pcti data twice? i would vote we package study 1 pcti + the first attempt at pcti for study 2 into one dataset. the retest stuff may be kind of dubious, not really essential. does that seem doable?

They didn't only take PCTI twice but also PCL and LEC. Should we just completely discard these last two datasets as well? There were only 61 participants, so it might not be a significant issue.

ben-domingue commented 1 month ago

yeah let's toss. add'l datasets with only n=61 we can jettison. thank you!

KingArthur0205 commented 1 month ago

Data: PTCI_Chinese_Zhan_2024.csv

Code:

# Paper: https://psycnet.apa.org/record/2024-52701-001
# Data: https://osf.io/tj8rh/
library(haven)
library(dplyr)
library(tidyr)
library(foreign)

# ------ Process Dataset 1 ------
df <- read_sav("PTCI_data.sav")
df <- df |>
  select(ID, starts_with("PTCI")) |>
  rename(id = ID)
df[] <- lapply(df, function(col) { # Remove column labels for each column
  attr(col, "label") <- NULL
  return(col)
})
df <- pivot_longer(df, cols=-id, names_to = "item", values_to = "resp")

# ------ Process Dataset 2 ------
df_retest <- read.spss("./PTCI_retest.sav", to.data.frame = TRUE, use.value.labels = FALSE)
df_retest <- df_retest |>
  rename(id=ID_retest) |>
  select(-YN_lec, -YN, -grade, -class, -sex, -age, -location, -fedu, -medu, 
         -TE_YN, -TE_Rest_YN, -filter_., -PCTI_Total_test, -PCTI_Total_rtest, -B_PCTI_Total_test,
         -B_PCTI_Total_rtest, -blame_test, -blame_retest, -self_retest, -word_test,
         -word_retest, -self_test, -starts_with("B_"))

# ---- Process PTCI Dataset ----
ptci_df <- df_retest |>
  select(id, starts_with("ptci"))

ptci_test_df <- ptci_df |>
  select(id, ends_with("_test"))
colnames(ptci_test_df) <- gsub('_test$', '', colnames(ptci_test_df))
ptci_test_df <- pivot_longer(ptci_test_df, cols=-id, names_to = "item", values_to = "resp")

df <- rbind(df, ptci_test_df)
save(df, file="PTCI_Chinese_Zhan_2024.Rdata")
write.csv(df, "PTCI_Chinese_Zhan_2024.csv", row.names=FALSE)
KingArthur0205 commented 1 month ago

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