Open ben-domingue opened 1 week ago
working on this
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:
also, do you think these kind of data about trials should be included in our final data?
a few notes:
what we really want here is the adhernece scale
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!
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/5W9HXM