ben-domingue / irw

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

FACES IV Package for Spanish Adolescents #547

Closed ben-domingue closed 2 weeks ago

ben-domingue commented 3 weeks ago

https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/UA5GTO

(Edited by Arthur)Paper: https://pubmed.ncbi.nlm.nih.gov/35723836/

KingArthur0205 commented 3 weeks ago

This paper includes 1 dataset of 1196 participants on 3 scales..(There is a slight inconsistency between the paper and the dataset. The paper said 1187 participants were involved)

Note: There are a few imputations in the dataset, which have been corrected by replacing the imputated values with NA.

  1. FACES IV: 42 items on a 5-point scale. 2 participants provided out-of-scale values 0 and 6, which are set to NA.
  2. Family Communication Scale(FCS): Only aggregate stats of this scale is provided.
  3. Family Satisfaction Scale(FSS): 10 items on a 5-point scale.
KingArthur0205 commented 3 weeks ago

Zipped Datasets(CSV and Rdata): FACES_Spanish_Vegas_2022_CSV.zip FACES_Spanish_Vegas_2022_Rdata.zip

Data: FACES_Spanish_Vegas_2022_FACES.csv FACES_Spanish_Vegas_2022_FSS.csv

Code:

# Paper: https://pubmed.ncbi.nlm.nih.gov/35723836/
# Data: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/UA5GTO
library(haven)
library(dplyr)
library(tidyr)
library(readxl)

df <- read_xlsx("Faces Spanish Adolescents.xlsx")
df <- as.data.frame(t(df))
colnames(df) <- df[1, ]
df <- df[-1, ]
df$id <- seq_len(nrow(df))

# ------ Process FACES Dataset ------
faces_df <- df |>
  select(id, starts_with("FACE"))
faces_df <- pivot_longer(faces_df, cols=-id, names_to="item", values_to="resp")
faces_df$resp <- as.numeric(faces_df$resp)
faces_df$resp <- ifelse(faces_df$resp %% 1 != 0, NA, faces_df$resp)
faces_df$resp[43139] <- NA # Remove the unexpected values of 0 and 6
faces_df$resp[43978] <- NA

save(faces_df, file="FACES_Spanish_Vegas_2022_FACES.Rdata")
write.csv(faces_df, "FACES_Spanish_Vegas_2022_FACES.csv", row.names=FALSE)

# ------ Process FSS Dataset ------
fss_df <- df |>
  select(id, starts_with("FSS"), -FSS)
fss_df <- pivot_longer(fss_df, cols=-id, names_to="item", values_to="resp")
fss_df$resp <- as.numeric(fss_df$resp)
fss_df$resp <- ifelse(fss_df$resp %% 1 != 0, NA, fss_df$resp)

save(fss_df, file="FACES_Spanish_Vegas_2022_FSS.Rdata")
write.csv(fss_df, "FACES_Spanish_Vegas_2022_FSS.csv", row.names=FALSE)
ben-domingue commented 2 weeks ago

we need a PR for this @KingArthur0205 ? otherwise great

KingArthur0205 commented 2 weeks ago

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