Participants were asked to repeat the ICG 20-24 months after their participation in the study, either via mail or online.
library(tidyverse)
library(lubridate)
library(psych)
library(ggplot2)
filter <- dplyr::filter
select <- dplyr::select
# Import CSV from Qualtrics
fu <- read.csv("~/Downloads/OT+fMRI+Inventory+of+Complicated+Grief+-+20-mo.+Follow+Up_January+16%2C+2019_13.45.csv", stringsAsFactors = FALSE, na.strings="")[ ,-c(2:17)] %>%
filter(grepl("^D1", Consent, ignore.case = TRUE)) # remove rows that aren't IDs
# Rename variables
fu <- rename(fu, date_followup = StartDate,
ID = Consent,
fu_icg_1 = ICG.R1.19_1,
fu_icg_2 = ICG.R1.19_2,
fu_icg_3 = ICG.R1.19_3,
fu_icg_4 = ICG.R1.19_4,
fu_icg_5 = ICG.R1.19_5,
fu_icg_6 = ICG.R1.19_6,
fu_icg_7 = ICG.R1.19_7,
fu_icg_8 = ICG.R1.19_8,
fu_icg_9 = ICG.R1.19_9,
fu_icg_10 = ICG.R1.19_10,
fu_icg_11 = ICG.R1.19_11,
fu_icg_12 = ICG.R1.19_12,
fu_icg_13 = ICG.R1.19_13,
fu_icg_14 = ICG.R1.19_14,
fu_icg_15 = ICG.R1.19_15,
fu_icg_16 = ICG.R1.19_16,
fu_icg_17 = ICG.R1.19_17,
fu_icg_18 = ICG.R1.19_18,
fu_icg_19 = ICG.R1.19_19)
# Make all of the ICG variables numeric and make date_followup into POSIXct (date format):
fu <- fu %>% mutate_at(vars(-c(ID,date_followup)), funs(as.numeric)) %>% mutate(date_followup = ymd_hms(date_followup))
fu <- fu %>% filter(!grepl("2018-01-08 15:32:23", date_followup)) # remove D125's response from 1-08-2018 (she has a duplicate)
# Scoring
##################
### Inventory of Complicated Grief
# Citation: Prigerson, H. G., Maciejewski, P. K., Reynolds, C. F., Bierhals, A. J., Newsom, J. T., Fasiczka, A., ... & Miller, M. (1995). Inventory of Complicated Grief: a scale to measure maladaptive symptoms of loss. Psychiatry Research, 59(1), 65-79.
# Answer choices range from 0 (Never) – 4 (Always).
# NO reverse scored items.
# Sum all items (possible range: 0 – 76; clinical cut-off = 25). [tot_icg]
tot_icg_20mFU <- subset(fu, select=c(fu_icg_1:fu_icg_19))
fu$tot_icg_20mFU <- rowSums(tot_icg_20mFU, na.rm=TRUE)
describe(fu$tot_icg_20mFU)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 32 15.91 10.16 14 15.04 9.64 2 45 43 0.74 0.21 1.8
qqnorm(fu$tot_icg_20mFU)
# need to make variable for "time since death to FU?"
# Merge these variables into the master
data <- readRDS("~/Dropbox/GLASS Lab/OT Study/data/cleaned-data/selfreports_oxtr_cortisol_random_AB_bx_clean.rds")
data <- left_join(data,fu, by="ID") # merge by ID
saveRDS(data, "~/Dropbox/GLASS Lab/OT Study/data/cleaned-data/selfreports_oxtr_cortisol_random_AB_bx_20mfu_clean.rds")
# How correlated are the ICG measurements?
corr.test(data$tot_icg, data$tot_icg_20mFU)
Call:corr.test(x = data$tot_icg, y = data$tot_icg_20mFU)
Correlation matrix
[1] 0.81
Sample Size
[1] 32
Probability values adjusted for multiple tests.
[1] 0
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$tot_icg, data$tot_icg_20mFU)
t.test(data$tot_icg, data$tot_icg_20mFU, paired=TRUE)
Paired t-test
data: data$tot_icg and data$tot_icg_20mFU
t = 4.7626, df = 31, p-value = 4.237e-05
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
3.23403 8.07847
sample estimates:
mean of the differences
5.65625
# Descriptive stats and distributions (only participants with FU data)
ttest <- data %>% filter(tot_icg_20mFU != "NA")
describe(ttest$tot_icg)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 32 21.56 11.45 19 21.04 13.34 4 51 47 0.43 -0.47 2.02
describe(ttest$tot_icg_20mFU)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 32 15.91 10.16 14 15.04 9.64 2 45 43 0.74 0.21 1.8
boxplot(ttest$tot_icg,ttest$tot_icg_20mFU)
# Create a change variable
## question for down the line: if we use the change score, do we want to use difference scores or standardized residuals?
data <- data %>% mutate(change_icg = tot_icg_20mFU - tot_icg)
describe(data$change_icg)
vars n mean sd median trimmed mad min max range skew kurtosis se
X1 1 32 -5.66 6.72 -5 -5.46 5.93 -19 7 26 -0.29 -0.74 1.19
hist(data$change_icg)
boxplot(data$change_icg)
qqnorm(data$change_icg)
# Transform data to long format, for visualizing change over time
icg <- subset(data, select=c(ID, tot_icg)) %>% mutate(time = rep("1"))
icg_fu <- subset(data, select=c(ID, tot_icg_20mFU)) %>% rename(tot_icg = tot_icg_20mFU) %>% mutate(time = rep("2"))
change <- bind_rows(icg, icg_fu) %>% mutate(ID=as.factor(ID))
# Plot trajectories
p <- ggplot(data = change, aes(x = time, y = tot_icg, group = ID, colour=factor(ID))) + geom_point(show.legend = FALSE) + geom_line(show.legend = FALSE)
p # I can label these with participant IDs but didn't for now so that I don't see who's in which group
# Is time since the death associated with ICG at either timepoint, or change in ICG?
corr.test(data$timesincedeath, data$tot_icg)
Call:corr.test(x = data$timesincedeath, y = data$tot_icg)
Correlation matrix
[1] 0.01
Sample Size
[1] 40
Probability values adjusted for multiple tests.
[1] 0.97
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$timesincedeath, data$tot_icg)
corr.test(data$timesincedeath, data$tot_icg_20mFU)
Call:corr.test(x = data$timesincedeath, y = data$tot_icg_20mFU)
Correlation matrix
[1] 0.05
Sample Size
[1] 32
Probability values adjusted for multiple tests.
[1] 0.79
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$timesincedeath, data$tot_icg_20mFU)
corr.test(data$timesincedeath, data$change_icg)
Call:corr.test(x = data$timesincedeath, y = data$change_icg)
Correlation matrix
[1] -0.09
Sample Size
[1] 32
Probability values adjusted for multiple tests.
[1] 0.61
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$timesincedeath, data$change_icg)
# How about years together?
corr.test(data$yrs_together, data$tot_icg)
Call:corr.test(x = data$yrs_together, y = data$tot_icg)
Correlation matrix
[1] 0.15
Sample Size
[1] 40
Probability values adjusted for multiple tests.
[1] 0.34
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$yrs_together, data$tot_icg)
corr.test(data$yrs_together, data$tot_icg_20mFU)
Call:corr.test(x = data$yrs_together, y = data$tot_icg_20mFU)
Correlation matrix
[1] 0.2
Sample Size
[1] 32
Probability values adjusted for multiple tests.
[1] 0.26
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$yrs_together, data$tot_icg_20mFU)
corr.test(data$yrs_together, data$change_icg)
Call:corr.test(x = data$yrs_together, y = data$change_icg)
Correlation matrix
[1] 0.18
Sample Size
[1] 32
Probability values adjusted for multiple tests.
[1] 0.32
To see confidence intervals of the correlations, print with the short=FALSE option
plot(data$yrs_together, data$change_icg)