ben-domingue / irw

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

Development and Pyschometric Validation of Measures for Vaginal Ring Adherence Survey #540

Open ben-domingue opened 1 week ago

ben-domingue commented 1 week ago

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

saviranadela commented 6 days ago

working on this

saviranadela commented 5 days ago

hi @ben-domingue i just wanted to double-check again. Continuous data and string/free-text data types shouldn’t be included in the item-response, correct? It should only consist of scale-like or yes/no responses, right? example: image

also, do you think these kind of data about trials should be included in our final data? image image

ben-domingue commented 5 days ago

a few notes:

what we really want here is the adhernece scale

saviranadela commented 3 hours ago

Processed data: Adherence_Zissette_2018.csv

Code:

library(tidyr)
library(dplyr)

df <- read.csv("Adherence_Measurement_ARV_Rings_Psychometrics.csv")
df$time_start <- as.POSIXct(df$time_start, format = "%m/%d/%Y %H:%M")
df$time_stop <- as.POSIXct(df$time_stop, format = "%m/%d/%Y %H:%M")

df$rt <- as.numeric(difftime(df$time_stop, df$time_start, units = "secs"))

df <- df %>%
  select(KEY, rt, matches("q_f_ring|q_f_gel|q_f_pill")) %>%
  pivot_longer(c(matches("q_f_ring|q_f_gel|q_f_pill")),
               names_to = "item",
               values_to = "resp") %>%
  filter(!(resp %in% c(99, 0)) & !is.na(resp)) %>%
  rename(id = KEY)

# print(unique(df$resp)) #checking resp

write.csv(df, "Adherence_Zissette_2018.csv", row.names=FALSE)

still asking something to Arthur, will do the PR once everything's clear!