I. Meta-Data

In order to replicate this code file, the following files are needed in the directory data/ found within the project directory: dict.xlsx, baseline_cleaned.RDS, esm_cleaned.RDS. R code associated with each code chunk can be viewed and hidden by toggling on Code on the top right of each output.

knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
options(digits = 3)

libraries <- c("apaTables",    # for cor table
               "here",         # directory access
               "psych",        # for scale alphas
               "stringr",      # working with strings
               "tidyr",        # pivot_wider
               "forcats",      # fct_reorder for barplot
               "rio",          # import export
               "summarytools", # descriptives
               "ggplot2",      # plots
               "ggtext",       # element_markdown
               "kableExtra",   # scroll box
               "sjPlot",       # plot_grid
               "dplyr")        # general wrangling

lapply(libraries, require, character.only = TRUE)

bl_path   <- paste0(here(), "/data/baseline_cleaned.RDS")
esm_path  <- paste0(here(), "/data/esm_cleaned.RDS")
dict_path <- paste0(here(), "/data/dict.xlsx")

source(paste0(here(), "/script/00_helpers.R"))
# list of loaded packages and versions
si <- devtools::session_info()[[2]]
rownames(si) <- NULL
si <- as.data.frame(si)
si %>% 
  select(package, loadedversion, date, source) %>% 
  knitr::kable(caption = "All loaded packages") %>%
  kable_styling() %>% 
  scroll_box(height = "300px")
All loaded packages
package loadedversion date source
apaTables 2.0.8 2021-01-04 CRAN (R 4.3.0)
backports 1.4.1 2021-12-13 CRAN (R 4.3.0)
base64enc 0.1-3 2015-07-28 CRAN (R 4.3.0)
broom 1.0.5 2023-06-09 CRAN (R 4.3.0)
bslib 0.5.1 2023-08-11 CRAN (R 4.3.0)
cachem 1.0.8 2023-05-01 CRAN (R 4.3.0)
callr 3.7.3 2022-11-02 CRAN (R 4.3.0)
cellranger 1.1.0 2016-07-27 CRAN (R 4.3.0)
checkmate 2.2.0 2023-04-27 CRAN (R 4.3.0)
cli 3.6.1 2023-03-23 CRAN (R 4.3.0)
codetools 0.2-19 2023-02-01 CRAN (R 4.3.3)
colorspace 2.1-0 2023-01-23 CRAN (R 4.3.0)
crayon 1.5.2 2022-09-29 CRAN (R 4.3.0)
curl 5.0.2 2023-08-14 CRAN (R 4.3.0)
data.table 1.14.8 2023-02-17 CRAN (R 4.3.0)
devtools 2.4.5 2022-10-11 CRAN (R 4.3.0)
digest 0.6.33 2023-07-07 CRAN (R 4.3.0)
dplyr 1.1.3 2023-09-03 CRAN (R 4.3.0)
ellipsis 0.3.2 2021-04-29 CRAN (R 4.3.0)
evaluate 0.21 2023-05-05 CRAN (R 4.3.0)
fansi 1.0.4 2023-01-22 CRAN (R 4.3.0)
fastmap 1.1.1 2023-02-24 CRAN (R 4.3.0)
forcats 1.0.0 2023-01-29 CRAN (R 4.3.0)
foreign 0.8-86 2023-11-28 CRAN (R 4.3.3)
fs 1.6.3 2023-07-20 CRAN (R 4.3.0)
generics 0.1.3 2022-07-05 CRAN (R 4.3.0)
ggplot2 3.4.3 2023-08-14 CRAN (R 4.3.0)
ggtext 0.1.2 2022-09-16 CRAN (R 4.3.0)
glue 1.6.2 2022-02-24 CRAN (R 4.3.0)
gridtext 0.1.5 2022-09-16 CRAN (R 4.3.0)
gtable 0.3.4 2023-08-21 CRAN (R 4.3.0)
haven 2.5.3 2023-06-30 CRAN (R 4.3.0)
here 1.0.1 2020-12-13 CRAN (R 4.3.0)
hms 1.1.3 2023-03-21 CRAN (R 4.3.0)
htmltools 0.5.6 2023-08-10 CRAN (R 4.3.0)
htmlwidgets 1.6.2 2023-03-17 CRAN (R 4.3.0)
httpuv 1.6.11 2023-05-11 CRAN (R 4.3.0)
httr 1.4.7 2023-08-15 CRAN (R 4.3.0)
jquerylib 0.1.4 2021-04-26 CRAN (R 4.3.0)
jsonlite 1.8.7 2023-06-29 CRAN (R 4.3.0)
kableExtra 1.3.4 2021-02-20 CRAN (R 4.3.0)
knitr 1.43 2023-05-25 CRAN (R 4.3.0)
later 1.3.1 2023-05-02 CRAN (R 4.3.0)
lattice 0.22-5 2023-10-24 CRAN (R 4.3.3)
lifecycle 1.0.3 2022-10-07 CRAN (R 4.3.0)
lubridate 1.9.2 2023-02-10 CRAN (R 4.3.0)
magick 2.8.2 2023-12-20 CRAN (R 4.3.0)
magrittr 2.0.3 2022-03-30 CRAN (R 4.3.0)
MASS 7.3-60.0.1 2024-01-13 CRAN (R 4.3.3)
matrixStats 1.1.0 2023-11-07 CRAN (R 4.3.0)
memoise 2.0.1 2021-11-26 CRAN (R 4.3.0)
mime 0.12 2021-09-28 CRAN (R 4.3.0)
miniUI 0.1.1.1 2018-05-18 CRAN (R 4.3.0)
mnormt 2.1.1 2022-09-26 CRAN (R 4.3.0)
munsell 0.5.0 2018-06-12 CRAN (R 4.3.0)
nlme 3.1-164 2023-11-27 CRAN (R 4.3.3)
openxlsx 4.2.5.2 2023-02-06 CRAN (R 4.3.0)
pander 0.6.5 2022-03-18 CRAN (R 4.3.0)
pillar 1.9.0 2023-03-22 CRAN (R 4.3.0)
pkgbuild 1.4.2 2023-06-26 CRAN (R 4.3.0)
pkgconfig 2.0.3 2019-09-22 CRAN (R 4.3.0)
pkgload 1.3.2.1 2023-07-08 CRAN (R 4.3.0)
plyr 1.8.9 2023-10-02 CRAN (R 4.3.0)
prettyunits 1.1.1 2020-01-24 CRAN (R 4.3.0)
processx 3.8.2 2023-06-30 CRAN (R 4.3.0)
profvis 0.3.8 2023-05-02 CRAN (R 4.3.0)
promises 1.2.1 2023-08-10 CRAN (R 4.3.0)
pryr 0.1.6 2023-01-17 CRAN (R 4.3.0)
ps 1.7.5 2023-04-18 CRAN (R 4.3.0)
psych 2.3.9 2023-09-26 CRAN (R 4.3.0)
purrr 1.0.2 2023-08-10 CRAN (R 4.3.0)
R6 2.5.1 2021-08-19 CRAN (R 4.3.0)
rapportools 1.1 2022-03-22 CRAN (R 4.3.0)
Rcpp 1.0.11 2023-07-06 CRAN (R 4.3.0)
readxl 1.4.3 2023-07-06 CRAN (R 4.3.0)
remotes 2.4.2.1 2023-07-18 CRAN (R 4.3.0)
reshape2 1.4.4 2020-04-09 CRAN (R 4.3.0)
rio 0.5.30 2023-08-29 CRAN (R 4.3.0)
rlang 1.1.1 2023-04-28 CRAN (R 4.3.0)
rmarkdown 2.24 2023-08-14 CRAN (R 4.3.0)
rprojroot 2.0.3 2022-04-02 CRAN (R 4.3.0)
rstudioapi 0.15.0 2023-07-07 CRAN (R 4.3.0)
rvest 1.0.3 2022-08-19 CRAN (R 4.3.0)
sass 0.4.7 2023-07-15 CRAN (R 4.3.0)
scales 1.2.1 2022-08-20 CRAN (R 4.3.0)
sessioninfo 1.2.2 2021-12-06 CRAN (R 4.3.0)
shiny 1.7.5 2023-08-12 CRAN (R 4.3.0)
stringi 1.7.12 2023-01-11 CRAN (R 4.3.0)
stringr 1.5.0 2022-12-02 CRAN (R 4.3.0)
summarytools 1.0.1 2022-05-20 CRAN (R 4.3.0)
svglite 2.1.2 2023-10-11 CRAN (R 4.3.0)
systemfonts 1.0.4 2022-02-11 CRAN (R 4.3.0)
tibble 3.2.1 2023-03-20 CRAN (R 4.3.0)
tidyr 1.3.0 2023-01-24 CRAN (R 4.3.0)
tidyselect 1.2.0 2022-10-10 CRAN (R 4.3.0)
timechange 0.2.0 2023-01-11 CRAN (R 4.3.0)
urlchecker 1.0.1 2021-11-30 CRAN (R 4.3.0)
usethis 2.2.2 2023-07-06 CRAN (R 4.3.0)
utf8 1.2.3 2023-01-31 CRAN (R 4.3.0)
vctrs 0.6.3 2023-06-14 CRAN (R 4.3.0)
viridisLite 0.4.2 2023-05-02 CRAN (R 4.3.0)
webshot 0.5.5 2023-06-26 CRAN (R 4.3.0)
withr 2.5.0 2022-03-03 CRAN (R 4.3.0)
xfun 0.40 2023-08-09 CRAN (R 4.3.0)
xml2 1.3.5 2023-07-06 CRAN (R 4.3.0)
xtable 1.8-4 2019-04-21 CRAN (R 4.3.0)
yaml 2.3.7 2023-01-23 CRAN (R 4.3.0)
zip 2.3.0 2023-04-17 CRAN (R 4.3.0)
# load in data files
baseline <- rio::import(bl_path)
esm      <- rio::import(esm_path)
dict     <- rio::import(dict_path)

# look at top few rows
head(baseline) %>%
  knitr::kable(caption = "Example baseline data") %>%
  kable_styling() %>%
  scroll_box(width = "900px")
Example baseline data
Couple_ID Participant_ID bfas_self_1 bfas_self_2 bfas_self_3 bfas_self_4 bfas_self_5 bfas_self_6 bfas_self_7 bfas_self_8 bfas_self_9 bfas_self_10 bfas_self_11 bfas_self_12 bfas_self_13 bfas_self_14 bfas_self_15 bfas_self_16 bfas_self_17 bfas_self_18 bfas_self_19 bfas_self_20 bfas_self_21 bfas_self_22 bfas_self_23 bfas_self_24 bfas_self_25 bfas_self_26 bfas_self_27 bfas_self_28 bfas_self_29 bfas_self_30 bfas_self_31 bfas_self_32 bfas_self_33 bfas_self_34 bfas_self_35 bfas_self_36 bfas_self_37 bfas_self_38 bfas_self_39 bfas_self_40 bfas_self_41 bfas_self_42 bfas_self_43 bfas_self_44 bfas_self_45 bfas_self_46 bfas_self_47 bfas_self_48 bfas_self_49 bfas_self_50 bfas_self_51 bfas_self_52 bfas_self_53 bfas_self_54 bfas_self_55 bfas_self_56 bfas_self_57 bfas_self_58 bfas_self_59 bfas_self_60 bfas_self_61 bfas_self_62 bfas_self_63 bfas_self_64 bfas_self_65 bfas_self_66 bfas_self_67 bfas_self_68 bfas_self_69 bfas_self_70 bfas_self_71 bfas_self_72 bfas_self_73 bfas_self_74 bfas_self_75 bfas_self_76 bfas_self_77 bfas_self_78 bfas_self_79 bfas_self_80 bfas_self_81 bfas_self_82 bfas_self_83 bfas_self_84 bfas_self_85 bfas_self_86 bfas_self_87 bfas_self_88 bfas_self_89 bfas_self_90 bfas_self_91 bfas_self_92 bfas_self_93 bfas_self_94 bfas_self_95 bfas_self_96 bfas_self_97 bfas_self_98 bfas_self_99 bfas_self_100 bfas_partner_1 bfas_partner_2 bfas_partner_3 bfas_partner_4 bfas_partner_5 bfas_partner_6 bfas_partner_7 bfas_partner_8 bfas_partner_9 bfas_partner_10 bfas_partner_11 bfas_partner_12 bfas_partner_13 bfas_partner_14 bfas_partner_15 bfas_partner_16 bfas_partner_17 bfas_partner_18 bfas_partner_19 bfas_partner_20 bfas_partner_21 bfas_partner_22 bfas_partner_23 bfas_partner_24 bfas_partner_25 bfas_partner_26 bfas_partner_27 bfas_partner_28 bfas_partner_29 bfas_partner_30 bfas_partner_31 bfas_partner_32 bfas_partner_33 bfas_partner_34 bfas_partner_35 bfas_partner_36 bfas_partner_37 bfas_partner_38 bfas_partner_39 bfas_partner_40 bfas_partner_41 bfas_partner_42 bfas_partner_43 bfas_partner_44 bfas_partner_45 bfas_partner_46 bfas_partner_47 bfas_partner_48 bfas_partner_49 bfas_partner_50 bfas_partner_51 bfas_partner_52 bfas_partner_53 bfas_partner_54 bfas_partner_55 bfas_partner_56 bfas_partner_57 bfas_partner_58 bfas_partner_59 bfas_partner_60 bfas_partner_61 bfas_partner_62 bfas_partner_63 bfas_partner_64 bfas_partner_65 bfas_partner_66 bfas_partner_67 bfas_partner_68 bfas_partner_69 bfas_partner_70 bfas_partner_71 bfas_partner_72 bfas_partner_73 bfas_partner_74 bfas_partner_75 bfas_partner_76 bfas_partner_77 bfas_partner_78 bfas_partner_79 bfas_partner_80 bfas_partner_81 bfas_partner_82 bfas_partner_83 bfas_partner_84 bfas_partner_85 bfas_partner_86 bfas_partner_87 bfas_partner_88 bfas_partner_89 bfas_partner_90 bfas_partner_91 bfas_partner_92 bfas_partner_93 bfas_partner_94 bfas_partner_95 bfas_partner_96 bfas_partner_97 bfas_partner_98 bfas_partner_99 bfas_partner_100 panas_self_1 panas_self_2 panas_self_3 panas_self_4 panas_self_5 panas_self_6 panas_self_7 panas_self_8 panas_self_9 panas_self_10 panas_self_11 panas_self_12 panas_self_13 panas_self_14 panas_self_15 panas_self_16 panas_self_17 panas_self_18 panas_self_19 panas_self_20 panas_partner_1 panas_partner_2 panas_partner_3 panas_partner_4 panas_partner_5 panas_partner_6 panas_partner_7 panas_partner_8 panas_partner_9 panas_partner_10 panas_partner_11 panas_partner_12 panas_partner_13 panas_partner_14 panas_partner_15 panas_partner_16 panas_partner_17 panas_partner_18 panas_partner_19 panas_partner_20 csi_happiness csi_agreement_1 csi_agreement_2 csi_agreement_3 csi_frequency_1 csi_frequency_2 csi_general_1 csi_general_2 csi_general_3 csi_general_4 csi_general_5 csi_general_6 csi_general_7 csi_general_8 csi_general_9 csi_general_10 csi_general_11 csi_general_12 csi_satisfaction_1 csi_satisfaction_2 csi_satisfaction_3 csi_satisfaction_4 csi_compare csi_enjoyment_1 csi_enjoyment_2 csi_feeling_1 csi_feeling_2 csi_feeling_3 csi_feeling_4 csi_feeling_5 csi_feeling_6 csi_feeling_7 age sex sex_3_TEXT gender gender_6_TEXT sexuality sexuality_5_TEXT duration race edu ses politics religion race_cat P_num self_neuro self_agree self_consci self_extra self_open partner_neuro partner_agree partner_consci partner_extra partner_open self_pa self_na partner_pa partner_na csi_overall self_withd self_compa self_indus self_enthu self_intel self_volat self_polit self_order self_assert self_opena partner_withd partner_compa partner_indus partner_enthu partner_intel partner_volat partner_polit partner_order partner_assert partner_opena
1002 1002001 3 4 3 3 2 4 3 1 2 5 5 3 2 3 1 4 3 5 2 5 3 5 2 5 2 4 5 4 1 5 4 4 2 5 4 5 4 3 3 5 4 5 2 4 5 5 4 3 1 4 5 5 3 2 4 4 3 5 3 5 4 3 2 4 4 5 5 4 3 5 4 5 1 4 3 3 5 5 2 5 5 5 1 4 2 3 4 4 1 5 4 3 1 5 2 5 4 5 2 5 3 5 5 3 5 1 2 3 4 5 2 4 5 4 2 2 4 3 3 5 3 5 4 4 4 1 4 4 4 3 1 5 5 4 5 1 5 2 3 2 3 5 4 3 1 2 4 3 3 2 3 5 5 1 4 1 5 2 3 4 2 5 4 4 4 2 5 3 4 4 3 4 4 2 5 1 5 4 4 3 5 5 4 4 3 1 4 2 4 4 1 5 4 4 5 2 5 3 3 5 3 2 3 2 1 3 3 2 4 2 2 3 2 5 4 3 1 2 3 2 4 1 3 2 4 2 1 1 4 3 1 5 1 3 2 4 5 1 4 2 6 5 3 4 5 5 5 5 5 2 5 5 4 5 5 5 5 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 22 0 NA 5 4 51 White 2 4 1 1 1 1 4.15 4.10 2.90 2.95 3.90 2.00 4.55 3.65 3.40 3.75 2.8 2.4 3.9 1.4 153 4.1 4.2 1.9 3.9 2.9 4.2 4.0 3.9 2.0 4.9 2.6 4.8 4.4 3.3 3.8 1.4 4.3 2.9 3.5 3.7
1002 1002002 4 4 2 1 5 1 2 1 4 5 4 2 1 2 4 2 4 3 2 4 2 4 2 2 5 1 4 2 1 2 1 5 4 2 5 1 5 2 1 4 4 4 2 1 2 1 4 1 4 2 4 4 2 2 4 1 4 2 2 2 2 4 2 1 4 1 4 2 1 4 4 4 1 2 4 1 5 4 4 5 4 4 2 3 4 1 5 1 4 4 2 5 2 3 4 1 4 4 2 4 4 5 2 3 4 1 2 4 2 4 5 2 2 5 4 4 5 4 4 5 4 4 2 4 4 4 4 5 2 5 1 5 4 5 4 4 5 2 4 5 2 4 2 4 5 2 4 2 1 5 5 5 2 4 4 2 5 2 2 4 4 5 2 4 4 2 5 4 3 5 2 3 2 5 2 2 5 4 4 5 5 5 2 3 4 4 5 1 1 5 4 4 1 4 4 4 5 2 1 4 4 3 2 2 1 1 1 1 1 1 1 2 1 2 2 1 3 1 1 1 4 2 3 2 1 2 2 1 3 2 2 1 1 2 3 2 3 1 1 2 6 5 4 5 5 5 5 4 5 4 5 5 4 5 5 4 4 5 5 4 5 5 5 5 5 3 5 5 5 5 4 5 22 1 NA 3 2 51 White 4 3 1 1 1 2 2.10 4.05 2.10 2.20 3.85 3.25 4.35 2.55 3.25 4.30 1.8 1.4 2.2 1.8 151 3.1 4.0 2.0 1.9 4.1 1.1 4.1 2.2 2.5 3.6 3.6 4.2 2.1 4.1 3.9 2.9 4.5 3.0 2.4 4.7
1003 1003001 4 5 4 2 4 2 4 2 5 5 5 5 4 4 2 4 3 4 4 4 5 4 4 4 4 2 5 4 2 2 4 5 2 4 4 4 2 4 2 2 4 5 4 4 4 4 4 4 2 4 5 5 4 4 2 2 2 4 4 2 4 5 2 4 5 4 4 4 2 2 5 5 4 4 4 4 5 4 2 2 2 4 2 4 5 2 5 4 2 2 4 5 4 4 4 4 4 4 2 5 4 4 2 2 2 4 4 2 4 5 4 4 2 4 5 4 5 1 5 4 5 4 1 4 2 4 2 2 4 4 2 4 2 4 2 2 4 2 4 5 4 5 2 4 4 2 2 2 4 4 4 5 5 4 2 1 2 4 1 5 4 4 2 4 5 2 5 4 4 4 4 4 2 5 2 2 4 2 4 4 4 4 4 4 2 3 4 4 4 4 2 4 1 4 4 2 5 2 4 4 4 2 3 2 3 4 4 1 2 2 2 3 3 1 5 4 3 1 2 3 2 3 2 2 2 2 1 1 3 2 2 2 2 3 3 2 4 2 1 2 5 5 5 3 4 5 5 5 5 2 5 5 5 5 5 3 5 5 5 4 5 4 5 5 5 4 5 5 5 4 5 5 23 1 NA 5 4 35 White 4 1 1 1 1 1 3.70 4.30 3.60 3.25 3.40 3.15 3.95 2.40 3.85 3.65 2.7 2.7 2.3 2.0 148 4.2 4.8 3.4 3.8 3.8 3.2 3.8 3.8 2.7 3.0 3.7 4.2 2.3 3.9 3.0 2.6 3.7 2.5 3.8 4.3
1003 1003002 4 4 2 3 4 3 2 2 3 5 5 4 1 4 5 3 3 4 4 4 4 5 1 4 5 3 3 2 3 5 3 4 2 4 4 3 2 4 3 5 5 4 2 5 5 3 2 2 3 4 5 4 2 3 4 3 3 3 3 4 5 4 1 4 4 3 3 3 4 5 4 4 2 5 4 3 4 3 4 5 4 5 1 4 2 4 3 3 3 5 4 5 1 5 3 3 4 2 3 4 5 5 4 4 4 3 3 2 3 4 5 5 4 3 4 3 3 4 3 3 5 5 3 2 4 3 5 4 2 3 4 5 3 3 4 4 5 5 3 3 5 4 3 3 4 5 5 3 2 3 5 5 4 4 5 4 3 2 3 3 4 4 3 4 5 5 3 4 4 3 5 4 3 5 4 3 5 4 1 4 5 5 3 4 4 3 3 3 3 3 5 5 2 4 3 4 4 3 2 3 4 4 3 3 2 4 3 2 3 1 3 3 4 4 4 3 4 2 3 4 4 4 3 2 3 5 5 1 4 2 2 5 4 3 4 4 3 3 4 4 4 4 4 4 4 5 5 4 4 3 4 5 5 4 5 4 5 4 4 4 5 4 5 5 5 4 4 4 5 4 4 4 22 0 NA 2 4 35 White 2 1 1 1 1 2 3.70 3.60 2.15 3.70 4.30 4.25 4.30 3.30 3.10 3.65 3.0 3.3 3.5 3.4 138 4.3 4.3 1.5 4.1 4.0 3.1 2.9 2.8 3.3 4.6 4.8 4.7 3.2 3.6 4.1 3.7 3.9 3.4 2.6 3.2
1004 1004001 2 5 4 4 4 2 4 4 4 5 2 5 4 5 4 3 4 4 5 5 2 4 3 3 5 4 5 4 5 5 4 4 4 3 4 3 4 4 4 4 2 5 4 4 5 4 2 5 5 5 4 4 4 4 4 2 4 3 4 2 2 4 3 3 3 3 4 2 3 4 2 4 4 5 5 4 4 4 5 2 2 5 2 5 3 4 5 4 4 2 2 5 1 5 4 4 4 4 5 5 4 4 5 3 4 1 5 5 2 5 4 5 4 5 5 1 5 5 5 4 1 4 4 5 2 1 5 5 4 5 3 5 2 5 5 1 5 4 1 5 2 4 4 5 5 2 5 5 2 3 4 4 4 4 4 2 5 2 2 1 4 4 2 4 4 2 5 2 1 2 2 4 2 4 4 2 5 5 2 2 5 5 4 4 5 2 5 4 4 2 2 4 4 4 5 1 2 3 5 5 3 2 4 4 4 1 1 1 3 5 2 3 1 5 2 4 4 4 4 1 4 4 3 1 4 2 2 1 3 5 1 3 1 5 4 5 5 2 4 1 4 5 5 5 4 5 5 5 4 5 5 5 4 5 4 5 5 5 4 4 5 5 5 4 3 4 5 5 5 3 5 5 18 1 NA 1 1 15 Asian/Hmong 4 3 4 3 3 1 2.85 4.25 3.55 4.25 4.00 2.30 4.50 3.75 3.55 3.85 3.9 1.9 4.1 1.9 147 2.4 4.5 3.3 4.1 4.1 3.3 4.0 3.8 4.4 3.9 3.1 4.3 3.5 4.3 4.3 1.5 4.7 4.0 2.8 3.4
1004 1004002 3 3 4 2 3 3 4 5 3 5 3 3 3 2 2 3 5 4 4 3 2 4 4 3 3 3 4 3 2 3 3 3 2 2 3 1 5 4 3 4 2 4 4 3 3 1 4 3 3 3 4 3 3 2 4 2 3 3 3 4 2 4 3 3 4 1 4 3 2 3 2 3 3 4 3 3 5 4 2 2 4 5 2 4 3 2 5 3 3 3 2 4 2 3 3 3 3 2 2 4 3 4 4 4 3 4 3 2 4 4 4 3 4 3 4 3 5 4 4 5 2 4 2 3 3 3 4 4 3 3 2 3 3 4 2 2 4 4 3 3 3 3 3 3 3 4 3 3 3 5 3 3 3 4 4 2 3 3 3 2 3 5 4 4 4 4 4 4 3 3 3 3 3 5 3 3 5 4 3 3 4 5 3 4 3 3 3 3 3 3 3 5 2 4 3 3 5 3 3 5 4 3 3 1 3 3 2 1 3 4 2 2 1 2 3 3 3 4 2 2 3 2 3 2 3 3 2 1 3 4 1 2 1 3 2 3 3 2 3 2 5 3 3 5 3 5 5 5 5 5 5 5 5 5 5 5 4 5 5 5 5 5 5 5 3 4 5 4 5 5 5 5 23 0 NA 2 1 15 asian american/hmong 4 2 6 2 3 2 2.45 3.90 3.20 2.75 3.25 3.05 3.85 3.25 3.50 3.40 2.9 2.2 3.0 1.8 149 2.7 3.6 3.0 2.8 3.1 2.2 4.2 3.4 2.7 3.4 3.0 3.8 3.1 3.8 3.2 3.1 3.9 3.4 3.2 3.6
head(esm %>% filter(Participant_ID == "1002001") %>% arrange(time_idx)) %>%
  knitr::kable(caption = "Example ESM data") %>%
  kable_styling() %>%
  column_spec(4, width_min = "1in") %>%
  scroll_box(width = "900px")
Example ESM data
Couple_ID Participant_ID time day time_idx day_idx mpa mna tipi_1 tipi_2 tipi_3 tipi_4 tipi_5 tipi_6 tipi_7 tipi_8 tipi_9 tipi_10 csi_happiness csi_general_6 csi_satisfaction_1 csi_satisfaction_4 partner_presence P_num tipi_extra tipi_agree tipi_consci tipi_neuro tipi_open csi_short
1002 1002001 0 2023-10-07 0 0 60 25 2 6 2 4 3 2 5 4 3 4 5 5 5 5 1 1 2.0 5.5 3.0 3.5 3.5 20
1002 1002001 1 2023-10-07 1 0 50 20 1 7 1 5 4 2 6 4 6 5 5 5 5 5 1 1 1.5 6.5 2.5 5.5 4.5 20
1002 1002001 2 2023-10-07 2 0 45 30 1 7 1 6 3 1 6 4 5 6 5 5 5 5 1 1 1.0 6.5 2.5 5.5 4.5 20
1002 1002001 3 2023-10-07 3 0 71 17 5 6 3 5 5 1 4 5 4 5 5 5 5 5 1 1 3.0 5.0 4.0 4.5 5.0 20
1002 1002001 4 2023-10-07 4 0 40 20 5 7 3 6 5 2 6 2 5 6 5 5 5 5 1 1 3.5 6.5 2.5 5.5 5.5 20
1002 1002001 0 2023-10-08 5 1 80 20 5 5 4 5 4 3 6 4 4 6 5 5 5 5 0 1 4.0 5.5 4.0 4.5 5.0 20

II. Baseline Data

1. Scale Items and Labels

# self-reported bfas domains and panas
for(iscale in c("Agreeableness", "Conscientiousness",
                "Extraversion", "Neuroticism", "Openness Domain",
                "Positive Affect", "Negative Affect")) {
  
  # grab scale items in the dictionary
  self_dict <- dict %>% 
    filter(data == "baseline" &
           scale == paste("Self", iscale)) %>%
    select(var, var_label, value_label, subscale, key)
  self_dict[self_dict=="NA"] <- NA
  partner_dict <- dict %>% 
    filter(data == "baseline" &
           scale == paste("Partner", iscale))
  
  # calculate alpha
  self_alpha <- as.numeric(psych::alpha(baseline[self_dict$var])$total["raw_alpha"])
  partner_alpha <- as.numeric(psych::alpha(baseline[partner_dict$var])$total["raw_alpha"])
  
  # add subscale alphas
  if(!any(is.na(self_dict$subscale))) {
    for(subscale in sort(unique(self_dict$subscale))) {
      self_alpha <- c(self_alpha, 
                      as.numeric(psych::alpha(baseline[
                        self_dict[self_dict$subscale == subscale,"var"]])$total
                        ["raw_alpha"]))
      partner_alpha <- c(partner_alpha, 
                         as.numeric(psych::alpha(baseline[
                           self_dict[self_dict$subscale == subscale,"var"]])$total
                           ["raw_alpha"]))
    } # END for subscale LOOP
  }
  
  # print dictionary
  self_dict %>%
    knitr::kable(caption = paste("Scale items for", iscale,
                                 "- Cronbach's alphas self =", 
                                 paste0(round(self_alpha, 2), collapse = ", "),
                                 "and partner =", 
                                 paste0(round(partner_alpha, 2), collapse = ", "))) %>%
    kable_styling() %>%
    scroll_box(height = "300px") %>%
    print()
}
Scale items for Agreeableness - Cronbach’s alphas self = 0.81, 0.87, 0.68 and partner = 0.88, 0.87, 0.68
var var_label value_label subscale key
bfas_self_2 Am not interested in other people’s problems 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion -1
bfas_self_7 Respect authority 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness 1
bfas_self_12 Feel others’ emotions 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion 1
bfas_self_17 Believe that I am better than others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
bfas_self_22 Inquire about others’ well-being 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion 1
bfas_self_27 Hate to seem pushy 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness 1
bfas_self_32 Can’t be bothered with other’s needs 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion -1
bfas_self_37 Take advantage of others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
bfas_self_42 Sympathize with others’ feelings 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion 1
bfas_self_47 Avoid imposing my will on others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness 1
bfas_self_52 Am indifferent to the feelings of others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion -1
bfas_self_57 Rarely put people under pressure 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness 1
bfas_self_62 Take no time for others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion -1
bfas_self_67 Insult people 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
bfas_self_72 Take an interest in other people’s lives 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion 1
bfas_self_77 Seek conflict 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
bfas_self_82 Don’t have a soft side 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion -1
bfas_self_87 Love a good fight 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
bfas_self_92 Like to do things for others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Compassion 1
bfas_self_97 Am out for my own personal gain 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Politeness -1
Scale items for Conscientiousness - Cronbach’s alphas self = 0.85, 0.84, 0.77 and partner = 0.89, 0.84, 0.77
var var_label value_label subscale key
bfas_self_3 Carry out my plans 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness 1
bfas_self_8 Leave my belongings around 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness -1
bfas_self_13 Waste my time 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_18 Like order 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
bfas_self_23 Find it difficult to get down to work 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_28 Keep things tidy 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
bfas_self_33 Mess things up 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_38 Follow a schedule 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
bfas_self_43 Finish what I start 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness 1
bfas_self_48 Am not bothered by messy people 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness -1
bfas_self_53 Don’t put my mind on the task at hand 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_58 Want everything to be “just right” 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
bfas_self_63 Get things done quickly 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness 1
bfas_self_68 Am not bothered by disorder 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness -1
bfas_self_73 Always know what I am doing 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness 1
bfas_self_78 Dislike routine 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness -1
bfas_self_83 Postpone decisions 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_88 See that rules are observed 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
bfas_self_93 Am easily distracted 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Industriousness -1
bfas_self_98 Want every detail taken care of 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Orderliness 1
Scale items for Extraversion - Cronbach’s alphas self = 0.87, 0.85, 0.83 and partner = 0.86, 0.85, 0.83
var var_label value_label subscale key
bfas_self_4 Make friends easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm 1
bfas_self_9 Take charge 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_14 Am hard to get to know 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm -1
bfas_self_19 Have a strong personality 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_24 Keep others at a distance 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm -1
bfas_self_29 Lack the talent for influencing people 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness -1
bfas_self_34 Reveal little about myself 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm -1
bfas_self_39 Know how to captivate people 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_44 Warm up quickly to others 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm 1
bfas_self_49 Wait for others to lead the way 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness -1
bfas_self_54 Rarely get caught up in the excitement 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm -1
bfas_self_59 See myself as a good leader 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_64 Am not a very enthusiastic person 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm -1
bfas_self_69 Can talk others into doing things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_74 Show my feelings when I’m happy 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm 1
bfas_self_79 Hold back my opinions 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness -1
bfas_self_84 Have a lot of fun 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm 1
bfas_self_89 Am the first to act 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness 1
bfas_self_94 Laugh a lot 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Enthusiasm 1
bfas_self_99 Do not have an assertive personality 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Assertiveness -1
Scale items for Neuroticism - Cronbach’s alphas self = 0.91, 0.91, 0.85 and partner = 0.92, 0.91, 0.85
var var_label value_label subscale key
bfas_self_1 Seldom feel blue 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal -1
bfas_self_6 Get angry easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
bfas_self_11 Am filled with doubts about things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_16 Rarely get irritated 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility -1
bfas_self_21 Feel comfortable with myself 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal -1
bfas_self_26 Get upset easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
bfas_self_31 Feel threatened easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_36 Keep my emotions under control 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility -1
bfas_self_41 Rarely feel depressed 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal -1
bfas_self_46 Change my mood a lot 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
bfas_self_51 Worry about things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_56 Rarely lose my composure 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility -1
bfas_self_61 Am easily discouraged 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_66 Am a person whose moods go up and down easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
bfas_self_71 Am not embarrassed easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal -1
bfas_self_76 Am not easily annoyed 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility -1
bfas_self_81 Become overwhelmed by events 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_86 Get easily agitated 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
bfas_self_91 Am afraid of many things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Withdrawal 1
bfas_self_96 Can be stirred up easily 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Volatility 1
Scale items for Openness Domain - Cronbach’s alphas self = 0.83, 0.81, 0.81 and partner = 0.84, 0.81, 0.81
var var_label value_label subscale key
bfas_self_5 Am quick to understand things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_10 Enjoy the beauty of nature 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
bfas_self_15 Have difficulty understanding abstract ideas 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect -1
bfas_self_20 Believe in the importance of art 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
bfas_self_25 Can handle a lot of information 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_30 Love to reflect on things 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
bfas_self_35 Like to solve complex problems 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_40 Get deeply immersed in music 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
bfas_self_45 Avoid philosophical discussions 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect -1
bfas_self_50 Do not like poetry 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect -1
bfas_self_55 Avoid difficult reading material 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect -1
bfas_self_60 Seldom notice the emotional aspects of paintings and pictures 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect -1
bfas_self_65 Have a rich vocabulary 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_70 Need a creative outlet 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
bfas_self_75 Think quickly 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_80 Seldom get lost in thought 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect -1
bfas_self_85 Learn things slowly 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect -1
bfas_self_90 Seldom daydream 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect -1
bfas_self_95 Formulate ideas clearly 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Intellect 1
bfas_self_100 See beauty in things that others might not notice 1 = Strongly disagree; 2 = Disagree; 3 = Neither agree nor disagree; 4 = Agree; 5 = Strongly agree Self Openness Aspect 1
Scale items for Positive Affect - Cronbach’s alphas self = 0.79 and partner = 0.83
var var_label value_label subscale key
panas_self_1 Interested 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_3 Excited 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_5 Strong 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_9 Enthusiastic 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_10 Proud 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_12 Alert 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_14 Inspired 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_16 Determined 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_17 Attentive 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_19 Active 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
Scale items for Negative Affect - Cronbach’s alphas self = 0.86 and partner = 0.89
var var_label value_label subscale key
panas_self_2 Distressed 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_4 Upset 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_6 Guilty 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_7 Scared 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_8 Hostile 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_11 Irritable 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_13 Ashamed 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_15 Nervous 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_18 Jittery 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
panas_self_20 Afraid 1 = Very slightly or not at all; 2 = A little; 3 = Moderately; 4 = Quite a bit; 5 = Extremely NA 1
# csi
# grab scale items in the dictionary
current_dict <- dict %>% 
  filter(data == "baseline" &
         scale == "Relationship Quality") %>%
  select(var, var_label, value_label, key)

# calculate alpha
current_alpha <- round(
  psych::alpha(baseline[self_dict$var])$total["raw_alpha"], 
  2)

# print dictionary
current_dict %>%
  knitr::kable(caption = paste("Scale items for Relationship Quality",
                               "- Cronbach's alpha =", current_alpha)) %>%
  kable_styling() %>%
  scroll_box(height = "300px") %>%
  print()
Scale items for Relationship Quality - Cronbach’s alpha = 0.86
var var_label value_label key
csi_happiness Please indicate the degree of happiness, all things considered, of your relationship. 0 = Extremely unhappy; 1 = Fairely unhappy; 2 = A little unhappy; 3 = Happy; 4 = Very happy; 5 = Extremely happy; 6 = Perfect 1
csi_agreement_1 Amount of time spent together 0 = Always disagree; 1 = Almost always disagree; 2 = Occasionally disagree; 3 = Frequently agree; 4 = Almost always agree; 5 = Always agree 1
csi_agreement_2 Making major decisions 0 = Always disagree; 1 = Almost always disagree; 2 = Occasionally disagree; 3 = Frequently agree; 4 = Almost always agree; 5 = Always agree 1
csi_agreement_3 Demonstrations of affection 0 = Always disagree; 1 = Almost always disagree; 2 = Occasionally disagree; 3 = Frequently agree; 4 = Almost always agree; 5 = Always agree 1
csi_frequency_1 In general, how often do you think that things between you and your partner are going well? 0 = Never; 1 = Rarely; 2 = Occasionally; 3 = More often than not; 4 = Most of the time; 5 = All the time 1
csi_frequency_2 How often do you wish you hadn’t gotten into this relationship? 5 = Never; 4 = Rarely; 3 = Occasionally; 2 = More often than not; 1 = Most of the time; 0 = All the time 1
csi_general_1 I still feel a strong connection with my partner 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_2 If I had my life to live over, I would marry (or live with/date) the same person 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_3 Our relationship is strong 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_4 I sometimes wonder if there is someone else out there for me 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true -1
csi_general_5 My relationship with my partner makes me happy 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_6 I have a warm and comfortable relationship with my partner 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_7 I can’t imagine ending my relationship with my partner 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_8 I feel that I can confide in my partner about virtually anything 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_9 I have had second thoughts about this relationship recently 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true -1
csi_general_10 For me, my partner is the perfect romantic partner 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_11 I really feel like part of a team with my partner 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_general_12 I cannot imagine another person making me as happy as my partner does 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_satisfaction_1 How rewarding is your relationship with your partner? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
csi_satisfaction_2 How well does your partner meet your needs? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
csi_satisfaction_3 To what extent has your relationship met your original expectations? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
csi_satisfaction_4 In general, how satisfied are your with your relationship? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
csi_compare How good is your relationship compared to most? 0 = Worse than all others (extremely bad); … ; 5 = Better than all others (extremely good) 1
csi_enjoyment_1 Do you enjoy your partner’s company? 0 = Never; 1 = Less than once a month; 2 = Once or twice a month; 3 = Once or twice a week; 4 = Once a day; 5 = More often 1
csi_enjoyment_2 How often do you and your partner have fun together? 0 = Never; 1 = Less than once a month; 2 = Once or twice a month; 3 = Once or twice a week; 4 = Once a day; 5 = More often 1
csi_feeling_1 Interesting:Boring 5 = 1; 4 = 2; 3 = 3; 2 = 4; 1 = 5; 0 = 6 1
csi_feeling_2 Bad:Good 0 = 1; 1 = 2; 2 = 3; 3 = 4; 4 = 5; 5 = 6 1
csi_feeling_3 Full:Empty 5 = 1; 4 = 2; 3 = 3; 2 = 4; 1 = 5; 0 = 6 1
csi_feeling_4 Lonely:Friendly 0 = 1; 1 = 2; 2 = 3; 3 = 4; 4 = 5; 5 = 6 1
csi_feeling_5 Sturdy:Fragile 5 = 1; 4 = 2; 3 = 3; 2 = 4; 1 = 5; 0 = 6 1
csi_feeling_6 Discouraging:Hopeful 0 = 1; 1 = 2; 2 = 3; 3 = 4; 4 = 5; 5 = 6 1
csi_feeling_7 Enjoyable:Miserable 5 = 1; 4 = 2; 3 = 3; 2 = 4; 1 = 5; 0 = 6 1

2. Demographics

# continuous demographics
baseline %>%
  select(age, sex, duration) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of demographics for all participants") %>%
  kable_styling()
Descriptives of demographics for all participants
age sex duration
Mean 27.59 0.543 62.8
Std.Dev 9.28 0.499 80.3
Min 18.00 0.000 11.0
Median 26.00 1.000 36.0
Max 84.00 1.000 600.0
N.Valid 276.00 276.000 276.0
Pct.Valid 100.00 100.000 100.0
baseline %>%
  filter(P_num == 1) %>%
  select(age, sex, duration) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of demographics for first participants") %>%
  kable_styling()
Descriptives of demographics for first participants
age sex duration
Mean 27.20 0.746 62.3
Std.Dev 8.53 0.437 79.1
Min 18.00 0.000 12.0
Median 25.00 1.000 36.0
Max 72.00 1.000 588.0
N.Valid 138.00 138.000 138.0
Pct.Valid 100.00 100.000 100.0
baseline %>%
  filter(P_num == 2) %>%
  select(age, sex, duration) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of demographics for second participants") %>%
  kable_styling()
Descriptives of demographics for second participants
age sex duration
Mean 27.99 0.341 63.4
Std.Dev 9.99 0.476 81.7
Min 18.00 0.000 11.0
Median 26.00 0.000 36.0
Max 84.00 1.000 600.0
N.Valid 138.00 138.000 138.0
Pct.Valid 100.00 100.000 100.0
# categorical demographics
dict %>%
  filter(data == "baseline" &
         var %in% c("sex", "gender", "sexuality", "race_cat", 
                    "edu", "ses", "politics", "religion")) %>%
  select(var, var_label, value_label) %>%
  knitr::kable(caption = "Coding for categorical demographic variables") %>%
  kable_styling()
Coding for categorical demographic variables
var var_label value_label
sex What is your sex assigned at birth? - Selected Choice 0 = Male; 1 = Female; NA = Other (please specify)
gender How do you describe yourself? - Selected Choice 1 = Cisgender Woman; 2 = Cisgender Man; 3 = Trans Man; 4 = Trans Woman; 5 = Gender Non-conforming; 6 = Other (please specify)
sexuality Do you consider yourself to be… - Selected Choice 1 = Heterosexual or straight; 2 = Gay; 3 = Lesbian; 4 = Bisexual; 5 = Other (please specify)
race_cat Race/ethnicity categorized 1 = white; 2 = black; 3 = asian; 4 = hispanic; 5 = mixed; NA = other
edu What is your level of schooling? 1 = Did not complete high school; 2 = High school graduate; 3 = Currently attending 2-year college; 4 = Currently attending 4-year college; 5 = 2-year college graduate (e.g., A.A. degree); 6 = 4-year college graduate (e.g., B.A, B.S. degrees); 7 = Currently pursuing graduate/professional degree; 8 = Graduate/Professional school graduate (e.g., M.A., Ph.D., M.D., J.D. degrees)
ses Which of the following best describes your social class background? 1 = Low-income/Poor; 2 = Working class/Lower middle class; 3 = Middle class; 4 = Upper middle class; 5 = Upper class
politics Which of the following best describes how you would label your political views? 1 = Extremely liberal; 2 = Liberal; 3 = Slightly liberal; 4 = Moderate, middle of the road; 5 = Slightly conservative; 6 = Conservative; 7 = Extremely conservative
religion How would you describe your religious views? 1 = Not at all religious; 2 = A little religious; 3 = Fairly religious; 4 = Very religious
# frequencies of categorical variables
for(inum in c(1,2)){
  cat(paste("\n PARTICIPANT", inum, "\n"))
  baseline %>%
    filter(P_num == inum) %>%
    select(gender, sexuality, race_cat, edu, ses, politics, religion) %>%
    freq() %>%
    print()
}

PARTICIPANT 1 Frequencies
baseline$gender
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 92 66.67 66.67 66.67 66.67
2 30 21.74 88.41 21.74 88.41
3 3 2.17 90.58 2.17 90.58
4 2 1.45 92.03 1.45 92.03
5 6 4.35 96.38 4.35 96.38
6 5 3.62 100.00 3.62 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$sexuality
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 83 60.14 60.14 60.14 60.14
2 2 1.45 61.59 1.45 61.59
3 4 2.90 64.49 2.90 64.49
4 40 28.99 93.48 28.99 93.48
5 9 6.52 100.00 6.52 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$race_cat
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 87 63.04 63.04 63.04 63.04
2 6 4.35 67.39 4.35 67.39
3 24 17.39 84.78 17.39 84.78
4 10 7.25 92.03 7.25 92.03
5 11 7.97 100.00 7.97 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$edu
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
2 5 3.62 3.62 3.62 3.62
4 28 20.29 23.91 20.29 23.91
5 3 2.17 26.09 2.17 26.09
6 21 15.22 41.30 15.22 41.30
7 53 38.41 79.71 38.41 79.71
8 28 20.29 100.00 20.29 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$ses
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 7 5.07 5.07 5.07 5.07
2 31 22.46 27.54 22.46 27.54
3 66 47.83 75.36 47.83 75.36
4 32 23.19 98.55 23.19 98.55
5 2 1.45 100.00 1.45 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$politics
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 37 26.81 26.81 26.81 26.81
2 55 39.86 66.67 39.86 66.67
3 18 13.04 79.71 13.04 79.71
4 20 14.49 94.20 14.49 94.20
5 6 4.35 98.55 4.35 98.55
6 1 0.72 99.28 0.72 99.28
7 1 0.72 100.00 0.72 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$religion
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 70 50.72 50.72 50.72 50.72
2 37 26.81 77.54 26.81 77.54
3 22 15.94 93.48 15.94 93.48
4 9 6.52 100.00 6.52 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

PARTICIPANT 2 Frequencies
baseline$gender
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 38 27.54 27.54 27.54 27.54
2 85 61.59 89.13 61.59 89.13
3 4 2.90 92.03 2.90 92.03
5 5 3.62 95.65 3.62 95.65
6 6 4.35 100.00 4.35 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$sexuality
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 106 76.81 76.81 76.81 76.81
2 3 2.17 78.99 2.17 78.99
3 6 4.35 83.33 4.35 83.33
4 17 12.32 95.65 12.32 95.65
5 6 4.35 100.00 4.35 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$race_cat
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 86 63.70 63.70 62.32 62.32
2 4 2.96 66.67 2.90 65.22
3 26 19.26 85.93 18.84 84.06
4 9 6.67 92.59 6.52 90.58
5 10 7.41 100.00 7.25 97.83
3 2.17 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$edu
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
2 7 5.07 5.07 5.07 5.07
3 4 2.90 7.97 2.90 7.97
4 23 16.67 24.64 16.67 24.64
5 2 1.45 26.09 1.45 26.09
6 44 31.88 57.97 31.88 57.97
7 31 22.46 80.43 22.46 80.43
8 27 19.57 100.00 19.57 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$ses
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 14 10.14 10.14 10.14 10.14
2 24 17.39 27.54 17.39 27.54
3 65 47.10 74.64 47.10 74.64
4 32 23.19 97.83 23.19 97.83
5 3 2.17 100.00 2.17 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$politics
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 35 25.36 25.36 25.36 25.36
2 51 36.96 62.32 36.96 62.32
3 13 9.42 71.74 9.42 71.74
4 27 19.57 91.30 19.57 91.30
5 8 5.80 97.10 5.80 97.10
6 3 2.17 99.28 2.17 99.28
7 1 0.72 100.00 0.72 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00

baseline$religion
Type: Numeric

Freq % Valid % Valid Cum. % Total % Total Cum.
1 66 47.83 47.83 47.83 47.83
2 44 31.88 79.71 31.88 79.71
3 17 12.32 92.03 12.32 92.03
4 11 7.97 100.00 7.97 100.00
0 0.00 100.00
Total 138 100.00 100.00 100.00 100.00
p <- plot_hist(var = "age", 
               var_name = "Age", 
               data = baseline, bin_width = 1)

if(signif(var = "age",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "duration", 
               var_name = "Relationship Duration (in months)", 
               data = baseline, bin_width = 10)

if(signif(var = "duration",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "ses", 
               var_name = "Socioeconomic Status", 
               data = baseline, bin_width = 0.1)

if(signif(var = "ses",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "edu", 
               var_name = "Education", 
               data = baseline, bin_width = 0.1)

if(signif(var = "edu",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "politics", 
               var_name = "Political affiliation", 
               data = baseline, bin_width = 0.1)

if(signif(var = "politics",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "religion", 
               var_name = "Religiosity", 
               data = baseline, bin_width = 0.1)

if(signif(var = "religion",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
print(p)

p <- plot_hist(var = "sexuality", 
               var_name = "Sexuality", 
               data = baseline, bin_width = 0.1)
print(p)

3. Scale Scores

# BFAS self
baseline %>%
  select(all_of(paste0("self_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of self-reported BFAS domains for all participants") %>%
  kable_styling()
Descriptives of self-reported BFAS domains for all participants
self_agree self_consci self_extra self_neuro self_open
Mean 4.016 3.312 3.45 2.910 3.828
Std.Dev 0.417 0.532 0.54 0.674 0.501
Min 2.750 2.100 1.45 1.050 2.500
Median 4.050 3.300 3.50 2.950 3.850
Max 4.850 4.600 4.60 4.550 5.000
N.Valid 276.000 276.000 276.00 276.000 276.000
Pct.Valid 100.000 100.000 100.00 100.000 100.000
baseline %>%
  filter(P_num == 1) %>%
  select(all_of(paste0("self_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of self-reported BFAS domains for first participants") %>%
  kable_styling()
Descriptives of self-reported BFAS domains for first participants
self_agree self_consci self_extra self_neuro self_open
Mean 4.08 3.35 3.498 2.986 3.85
Std.Dev 0.41 0.50 0.489 0.659 0.43
Min 2.85 2.30 1.450 1.050 2.70
Median 4.10 3.35 3.550 3.000 3.90
Max 4.85 4.60 4.500 4.550 5.00
N.Valid 138.00 138.00 138.000 138.000 138.00
Pct.Valid 100.00 100.00 100.000 100.000 100.00
baseline %>%
  filter(P_num == 2) %>%
  select(all_of(paste0("self_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of self-reported BFAS domains for second participants") %>%
  kable_styling()
Descriptives of self-reported BFAS domains for second participants
self_agree self_consci self_extra self_neuro self_open
Mean 3.950 3.272 3.397 2.834 3.805
Std.Dev 0.416 0.562 0.583 0.683 0.564
Min 2.750 2.100 1.450 1.250 2.500
Median 3.975 3.250 3.400 2.850 3.850
Max 4.850 4.550 4.600 4.450 5.000
N.Valid 138.000 138.000 138.000 138.000 138.000
Pct.Valid 100.000 100.000 100.000 100.000 100.000
# BFAS other
baseline %>%
  select(all_of(paste0("partner_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of partner-reported BFAS domains for all participants") %>%
  kable_styling()
Descriptives of partner-reported BFAS domains for all participants
partner_agree partner_consci partner_extra partner_neuro partner_open
Mean 4.107 3.418 3.582 2.757 3.878
Std.Dev 0.533 0.629 0.544 0.733 0.513
Min 2.400 1.600 1.850 1.150 2.400
Median 4.175 3.500 3.600 2.700 3.850
Max 5.000 4.850 4.850 5.000 4.950
N.Valid 276.000 276.000 276.000 276.000 276.000
Pct.Valid 100.000 100.000 100.000 100.000 100.000
baseline %>%
  filter(P_num == 1) %>%
  select(all_of(paste0("partner_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of partner-reported BFAS domains for first participants") %>%
  kable_styling()
Descriptives of partner-reported BFAS domains for first participants
partner_agree partner_consci partner_extra partner_neuro partner_open
Mean 4.060 3.321 3.551 2.61 3.849
Std.Dev 0.547 0.637 0.563 0.68 0.532
Min 2.600 1.900 1.900 1.20 2.400
Median 4.150 3.400 3.600 2.55 3.875
Max 4.950 4.600 4.850 4.20 4.950
N.Valid 138.000 138.000 138.000 138.00 138.000
Pct.Valid 100.000 100.000 100.000 100.00 100.000
baseline %>%
  filter(P_num == 2) %>%
  select(all_of(paste0("partner_", 
                       c("agree", "consci", "extra", "neuro", "open")))) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of partner-reported BFAS domains for second participants") %>%
  kable_styling()
Descriptives of partner-reported BFAS domains for second participants
partner_agree partner_consci partner_extra partner_neuro partner_open
Mean 4.154 3.514 3.613 2.907 3.906
Std.Dev 0.516 0.608 0.524 0.755 0.494
Min 2.400 1.600 1.850 1.150 2.600
Median 4.200 3.525 3.600 2.925 3.850
Max 5.000 4.850 4.800 5.000 4.950
N.Valid 138.000 138.000 138.000 138.000 138.000
Pct.Valid 100.000 100.000 100.000 100.000 100.000
# PANAS
baseline %>%
  select(self_pa, partner_pa, self_na, partner_na) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of PANAS for all participants") %>%
  kable_styling()
Descriptives of PANAS for all participants
self_pa partner_pa self_na partner_na
Mean 3.530 3.596 2.273 2.013
Std.Dev 0.552 0.606 0.714 0.733
Min 1.800 2.000 1.000 1.000
Median 3.600 3.600 2.200 1.800
Max 4.900 4.900 4.600 4.700
N.Valid 276.000 276.000 276.000 276.000
Pct.Valid 100.000 100.000 100.000 100.000
baseline %>%
  filter(P_num == 1) %>%
  select(self_pa, partner_pa, self_na, partner_na) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of PANAS for first participants") %>%
  kable_styling()
Descriptives of PANAS for first participants
self_pa partner_pa self_na partner_na
Mean 3.491 3.553 2.291 1.866
Std.Dev 0.494 0.621 0.747 0.664
Min 2.000 2.000 1.200 1.000
Median 3.500 3.600 2.200 1.700
Max 4.800 4.800 4.600 3.800
N.Valid 138.000 138.000 138.000 138.000
Pct.Valid 100.000 100.000 100.000 100.000
baseline %>%
  filter(P_num == 2) %>%
  select(self_pa, partner_pa, self_na, partner_na) %>%
  descr(stats = "common", order = "p") %>%
  knitr::kable(caption = "Descriptives of PANAS for second participants") %>%
  kable_styling()
Descriptives of PANAS for second participants
self_pa partner_pa self_na partner_na
Mean 3.568 3.639 2.255 2.159
Std.Dev 0.604 0.589 0.682 0.771
Min 1.800 2.000 1.000 1.000
Median 3.600 3.700 2.200 2.100
Max 4.900 4.900 4.100 4.700
N.Valid 138.000 138.000 138.000 138.000
Pct.Valid 100.000 100.000 100.000 100.000
# csi
csi_all <- descr(baseline$csi_overall, stats = "common", order = "p")
csi_p1  <- descr(baseline[baseline$P_num == 1, "csi_overall"], 
                          stats = "common", order = "p")
csi_p2  <- descr(baseline[baseline$P_num == 2, "csi_overall"], 
                          stats = "common", order = "p")
csi_descr <- cbind(csi_all, csi_p1, csi_p2) %>%
  as.data.frame()
names(csi_descr) <- c("all", "P1", "P2")

csi_descr %>%
  knitr::kable(caption = "Descriptives of Relationship Quality") %>%
  kable_styling()
Descriptives of Relationship Quality
all P1 P2
Mean 138 138.7 137.4
Std.Dev 20 19.2 20.7
Min 41 41.0 45.0
Median 144 145.0 143.0
Max 161 161.0 161.0
N.Valid 276 138.0 138.0
Pct.Valid 100 100.0 100.0
# BFAS and PANAS
for(ivar in paste("Self", c("Agreeableness", "Conscientiousness", "Extraversion",
                            "Neuroticism", "Openness Domain",
                            "Positive Affect", "Negative Affect"))){
  
  # extract scale name from dict
  var_name <- unique(dict[dict$scale == ivar, "scale_label"])
  
  # make plot
  p <- plot_hist(var = var_name, 
                 var_name = ivar, 
                 data = baseline, bin_width = 0.1) +
    xlim(1,5)

  if(signif(var = var_name,
            data = baseline)) {
    p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
  }
  print(p)
}

# relationship quality plot
p <- plot_hist(var = "csi_overall", 
               var_name = "Relationship Quality", 
               data = baseline, bin_width = 5)

if(signif(var = "csi_overall",
          data = baseline)) {
  p <- p + labs(subtitle = "Significant participant difference (p < 0.05)")
}
print(p)

III. ESM Data

1. Scale Items and Labels

# tipi and csi
for(iscale in c("Agreeableness", "Conscientiousness",
                "Extraversion", "Neuroticism", "Openness",
                "Relationship Quality")) {
  
  # grab scale items in the dictionary
  current_dict <- dict %>% 
    filter(data == "esm" &
           scale == iscale) %>%
    select(var, var_label, value_label, key)
  
  # grab the first time point for each participant
  df_min <- merge(aggregate(time_idx ~ Participant_ID, data = esm, FUN = min),
                  esm, by = c("Participant_ID", "time_idx"), all.x = TRUE)

  # calculate alpha
  current_alpha <- round(
    psych::alpha(df_min[current_dict$var])$total["raw_alpha"], 
    2)

  # print dictionary
  current_dict %>%
    knitr::kable(caption = paste("Scale items for", iscale,
                                 "- Cronbach's alpha =", current_alpha)) %>%
    kable_styling() %>%
    print()
}
Scale items for Agreeableness - Cronbach’s alpha = 0.18
var var_label value_label key
tipi_2 Critical, quarrelsome 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly -1
tipi_7 Sympathetic, warm 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly 1
Scale items for Conscientiousness - Cronbach’s alpha = 0.48
var var_label value_label key
tipi_3 Dependable, self-disciplined 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly 1
tipi_8 Disorganized, careless 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly -1
Scale items for Extraversion - Cronbach’s alpha = 0.56
var var_label value_label key
tipi_1 Extraverted, enthusiastic 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly 1
tipi_6 Reserved, quiet 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly -1
Scale items for Neuroticism - Cronbach’s alpha = 0.66
var var_label value_label key
tipi_4 Anxious, easily upset 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly 1
tipi_9 Calm, emotionally stable 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly -1
Scale items for Openness - Cronbach’s alpha = 0.37
var var_label value_label key
tipi_5 Open to new experiences, complex 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly 1
tipi_10 Conventional, uncreative 1 = Disagree strongly; 2 = Disagree moderately; 3 = Disagree a little; 4 = Neither agree nor disagree; 5 = Agree a little; 6 = Agree moderately; 7 = Agree strongly -1
Scale items for Relationship Quality - Cronbach’s alpha = 0.85
var var_label value_label key
csi_happiness Please indicate the degree of happiness, all things considered, of your relationship during the previous three hours. 0 = Extremely unhappy; 1 = Fairly unhappy; 2 = A little unhappy; 3 = Happy; 4 = Very happy; 5 = Extremely happy; 6 = Perfect 1
csi_general_6 I have a warm and comfortable relationship with my partner during the previous three hours. 0 = Not at all true; 1 = A little true; 2 = Somewhat true; 3 = Mostly true; 4 = Almost completely true; 5 = Completely true 1
csi_satisfaction_1 How rewarding is your relationship with your partner during the previous three hours? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
csi_satisfaction_4 During the previous three hours, how satisfied are you with your relationship? 0 = Not at all; 1 = A little; 2 = Somewhat; 3 = Mostly; 4 = Almost completely; 5 = Completely 1
# emotions
dict %>%
  filter(var %in% c("mpa", "mna")) %>%
  select(var, var_label, value_label, scale) %>%
  knitr::kable(caption = "Scale items for momentary affects") %>%
  kable_styling()
Scale items for momentary affects
var var_label value_label scale
mpa To what extent do you experience positive emotions right now? 0 = I don’t experience positive emotions right now; 100 = I experience very strong positive emotions right now Positive Affect
mna To what extent do you experience negative emotions right now? 0 = I don’t experience negative emotions right now; 100 = I experience very strong negative emotions right now Negative Affect

2. Descriptives and plots

# create number of assessments completed
esm_count <- as.data.frame(table(esm$Participant_ID)) %>%
  rename(count = Freq) %>%
  mutate(prop = count/35)
esm_count$P_num <- as.numeric(
  substr(esm_count$Var1, 5, 8)
)
total_count <- esm_count %>% select(count_total = count, prop_total = prop) %>% 
  descr(stats="common")
p1_count <- esm_count %>% filter(P_num == 1) %>% 
  select(count_p1 = count, prop_p1 = prop) %>% descr(stats="common")
p2_count <- esm_count %>% filter(P_num == 2) %>%
  select(count_p2 = count, prop_p2 = prop) %>% descr(stats="common")
cbind(total_count, p1_count, p2_count) %>%
  knitr::kable(
    caption = "Completion Rates for All Participants and First/Second Participants"
  ) %>%
  kable_styling()
Completion Rates for All Participants and First/Second Participants
count_total prop_total count_p1 prop_p1 count_p2 prop_p2
Mean 29.48 0.842 29.73 0.849 29.22 0.835
Std.Dev 5.15 0.147 5.25 0.150 5.05 0.144
Min 6.00 0.171 6.00 0.171 8.00 0.229
Median 31.00 0.886 31.00 0.886 30.50 0.871
Max 39.00 1.114 39.00 1.114 35.00 1.000
N.Valid 276.00 276.000 138.00 138.000 138.00 138.000
Pct.Valid 100.00 100.000 100.00 100.000 100.00 100.000
# descriptives of scale scores
esm %>%
  select(tipi_agree, tipi_consci, tipi_extra, tipi_neuro, tipi_open,
         csi_short, mpa, mna, partner_presence) %>%
  descr(stat = "common", order = "p") %>%
  knitr::kable(
    caption = "ESM Descriptives for All Participants"
  ) %>%
  kable_styling()
ESM Descriptives for All Participants
tipi_agree tipi_consci tipi_extra tipi_neuro tipi_open csi_short mpa mna partner_presence
Mean 5.32 4.91 3.95 2.98 4.66 17.27 71.9 19.6 0.444
Std.Dev 1.25 1.28 1.47 1.39 1.25 3.85 21.1 18.5 0.497
Min 1.00 1.00 1.00 1.00 1.00 0.00 0.0 0.0 0.000
Median 5.50 5.00 4.00 3.00 4.50 18.00 76.0 14.0 0.000
Max 7.00 7.00 7.00 7.00 7.00 21.00 100.0 100.0 1.000
N.Valid 8118.00 8117.00 8117.00 8115.00 8114.00 8119.00 8130.0 8130.0 8118.000
Pct.Valid 99.79 99.78 99.78 99.75 99.74 99.80 99.9 99.9 99.791
esm %>%
  filter(P_num == 1) %>%
  select(tipi_agree, tipi_consci, tipi_extra, tipi_neuro, tipi_open,
         csi_short, mpa, mna, partner_presence) %>%
  descr(stat = "common", order = "p") %>%
  knitr::kable(
    caption = "ESM Descriptives for First Participants"
  ) %>%
  kable_styling()
ESM Descriptives for First Participants
tipi_agree tipi_consci tipi_extra tipi_neuro tipi_open csi_short mpa mna partner_presence
Mean 5.39 4.85 3.85 3.08 4.66 17.29 72.0 19.9 0.439
Std.Dev 1.26 1.31 1.51 1.41 1.26 3.86 20.8 18.7 0.496
Min 1.00 1.00 1.00 1.00 1.00 0.00 0.0 0.0 0.000
Median 5.50 5.00 4.00 3.00 4.50 18.00 76.0 15.0 0.000
Max 7.00 7.00 7.00 7.00 7.00 21.00 100.0 100.0 1.000
N.Valid 4094.00 4094.00 4093.00 4093.00 4093.00 4094.00 4100.0 4100.0 4093.000
Pct.Valid 99.78 99.78 99.76 99.76 99.76 99.78 99.9 99.9 99.756
esm %>%
  filter(P_num == 2) %>%
  select(tipi_agree, tipi_consci, tipi_extra, tipi_neuro, tipi_open,
         csi_short, mpa, mna, partner_presence) %>%
  descr(stat = "common", order = "p") %>%
  knitr::kable(
    caption = "ESM Descriptives for Second Participants"
  ) %>%
  kable_styling()
ESM Descriptives for Second Participants
tipi_agree tipi_consci tipi_extra tipi_neuro tipi_open csi_short mpa mna partner_presence
Mean 5.25 4.97 4.06 2.87 4.67 17.25 71.9 19.3 0.450
Std.Dev 1.23 1.23 1.42 1.36 1.25 3.84 21.4 18.2 0.498
Min 1.00 1.00 1.00 1.00 1.00 0.00 0.0 0.0 0.000
Median 5.50 5.00 4.00 2.50 4.50 18.00 76.0 14.0 0.000
Max 7.00 7.00 7.00 7.00 7.00 21.00 100.0 100.0 1.000
N.Valid 4024.00 4023.00 4024.00 4022.00 4021.00 4025.00 4030.0 4030.0 4025.000
Pct.Valid 99.80 99.78 99.80 99.75 99.73 99.83 100.0 100.0 99.826