ReadMe

This document includes an overview of all analyses conducted for the manuscript “How Are Daily Events Related to Subjective Well-Being? A Meta-Analytic Review of Intensive Longitudinal Studies”.

Tabs
To make the document easier to read, you can find tabs in many places where you can choose between different domains of daily events (i.e., daily uplifts or daily hassles), within- or between-person associations, and different types of information (e.g., tables or figures).
Note: Often there are several levels of tabs. For example, at the first level, you select whether you are interested in daily uplifts or daily hassles. At the second level, you choose the specific level of association you want to view (within-person or between-person associations). At the third level, you select whether you wish to view tables or figures.

R Code
This document includes all R code used to perform the analysis and create the tables and figures. The code is hidden by default to enhance readability. If you want to see the code, click on the SHOW button on the right hand side just above the figure or table—you will then see the corresponding codechunk. If you want to show all codechunks by default, click CODE at the very top of the document and select Show all Code.

Preregistration

The present meta-analysis has been preregistered at https://osf.io/g2f4d/overview?view_only=478e62129622422ba63702348d203282. Deviations from this preregistration are described in the following table (see Table 1).

deviations <- tibble::tibble(
  `Preregistered Plan` = c(
    
    "We preregistered to estimate the variance-covariance matrix of the effect sizes using the *rcalc*()-function implemented in the *metafor* package.",
    
    "We preregistered the use of the moderator categories *North America*, *Global South*, *Northern Europe*, *Southern Europe*, and *Asia* to examine potential regional differences in daily event-SWB associations.",
    
    "We preregistered to collapse moderator categories that were assessed in less than 5 studies."
  ),
  `Deviation` = c(
    
    "We estimated the variance-covariance matrix of the effect sizes using the *vcalc*()- instead of *rcalc*()-function implemented in the *metafor* package.",
    
    "We did not use the preregistered *Global South* category and introduced *Australia* as an additional moderator category.",
    
    "We set the *Southern Europe* and *Australia* categories of the moderator *Region*, the *Other* category of the moderator *Daily event measurement*, and the  *Global well-being* category of the moderator *SWB dimension* to *NA* for the within- and between-person associations between daily uplifts and SWB. In addition, we set the *Australia* category of the moderator *Region to *NA* for the within-person associations between daily hassles and SWB and set the *Other* category of the moderator *Daily event measurement* to *NA* for the between-person associations between daily hassles and SWB."
  ),
  `Reason` = c(
    
    "The *rcalc*()-function requires the within-study correlation among the variables underlying the dependent effect sizes to compute the exact covariance between the effect sizes. For example, to account for the dependency between two effect sizes from the same study (e.g., a correlation between daily hassles and positive affect and a correlation between daily hassles and negative affect from the same study), *rcalc*() requires the within-study correlation between positive and negative affect. As this information is not always reported in individual studies, we decided to deviate from the preregistration and used *vcalc*() instead. *vcalc*() approximates the covariance across dependent effect sizes using a working-correlation (uniformly applied across all studies) instead. More details on the estimation of the variance-covariance matrix using *vcalc*() can be found in the manuscript.",
    
    "The preregistered *Global South* category was not used because no studies from countries in the Global South were represented in the present meta-analysis. *Australia* was introduced as an additional moderator category because studies from Australia were represented in the meta-analytic dataset but did not fit well within any of the other preregistered regional categories.",
    
    "These categories were not collapsed with other categories because they were conceptually distinct, and doing so could have obscured interpretation of the results of the moderator analyses."
  )
)

kable(deviations
      , caption="**Deviations from the Preregistration**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 1: Deviations from the Preregistration
Preregistered Plan Deviation Reason
We preregistered to estimate the variance-covariance matrix of the effect sizes using the rcalc()-function implemented in the metafor package. We estimated the variance-covariance matrix of the effect sizes using the vcalc()- instead of rcalc()-function implemented in the metafor package. The rcalc()-function requires the within-study correlation among the variables underlying the dependent effect sizes to compute the exact covariance between the effect sizes. For example, to account for the dependency between two effect sizes from the same study (e.g., a correlation between daily hassles and positive affect and a correlation between daily hassles and negative affect from the same study), rcalc() requires the within-study correlation between positive and negative affect. As this information is not always reported in individual studies, we decided to deviate from the preregistration and used vcalc() instead. vcalc() approximates the covariance across dependent effect sizes using a working-correlation (uniformly applied across all studies) instead. More details on the estimation of the variance-covariance matrix using vcalc() can be found in the manuscript.
We preregistered the use of the moderator categories North America, Global South, Northern Europe, Southern Europe, and Asia to examine potential regional differences in daily event-SWB associations. We did not use the preregistered Global South category and introduced Australia as an additional moderator category. The preregistered Global South category was not used because no studies from countries in the Global South were represented in the present meta-analysis. Australia was introduced as an additional moderator category because studies from Australia were represented in the meta-analytic dataset but did not fit well within any of the other preregistered regional categories.
We preregistered to collapse moderator categories that were assessed in less than 5 studies. We set the Southern Europe and Australia categories of the moderator Region, the Other category of the moderator Daily event measurement, and the Global well-being category of the moderator SWB dimension to NA for the within- and between-person associations between daily uplifts and SWB. In addition, we set the Australia category of the moderator Region to NA* for the within-person associations between daily hassles and SWB and set the Other category of the moderator Daily event measurement to NA for the between-person associations between daily hassles and SWB. These categories were not collapsed with other categories because they were conceptually distinct, and doing so could have obscured interpretation of the results of the moderator analyses.

Section 1: Study Characteristics of Included Studies

Studies Identified Via Review-Screening

Hassles & SWB

studies.review_hassles <- data_included %>%
  filter(source == "3", DeDimension == "hassle") %>%
  mutate(ID = paste0(StudyID, ".", SampleID)) %>%
  select(
    ID, Reference, Country, DeDimension, DeDomainAll,
    WbDimension, N, DeOccDay, DeOccTotal, CorrCoeff
  ) %>%
  mutate(
    DeDimension = recode(
      DeDimension,
      "hassle" = "Daily hassles"
    ),
    DeDomainAll = recode(
      DeDomainAll,
      "work/achievement" = "Work/Achievement",
      "social" = "Social",
      "health" = "Health",
      "other" = "Other",
      "general" = "General"
    ),
    WbDimension = recode(
      WbDimension,
      "life_satisfaction" = "Life satisfaction",
      "positive_affect" = "Positive affect",
      "negative_affect" = "Negative affect",
      "domain_satisfaction" = "Domain satisfaction",
      "global_well-being" = "Global well-being"
    ),
    Country = recode(
      Country,
      "Germany, Austria, Switzerland" = "Germany; Austria; Switzerland",
      "UK" = "United Kingdom",
      "US" = "United States",
      "US & CANADA" = "United States; Canada",
      "US, Canada" = "United States; Canada"
    )
  ) %>%
  group_by(ID) %>%
  summarise(
    Reference = first(Reference),
    Country = first(Country),
    `*N*` = first(N),
    `# Observations (per day)` = first(DeOccDay),
    `# Observations (total)` = first(DeOccTotal),
    `Daily event types` = paste(unique(DeDomainAll), collapse = "; "),
    `Well-being dimensions` = paste(unique(WbDimension), collapse = "; "),
    `Correlation range` = if_else(
      min(CorrCoeff, na.rm = TRUE) == max(CorrCoeff, na.rm = TRUE),
      sprintf("%.2f", min(CorrCoeff, na.rm = TRUE)),
      sprintf(
        "%.2f – %.2f",
        min(CorrCoeff, na.rm = TRUE),
        max(CorrCoeff, na.rm = TRUE)
      )
    ),
    .groups = "drop"
  ) %>%
  arrange(as.numeric(str_remove(ID, "^M"))) %>%
  mutate(across(where(is.character), ~ replace_na(.x, "")))

kable(
  studies.review_hassles,
  caption = "**Overview of Studies on the Association Between Daily Hassles and SWB Identified Via Review-Screening**",
  escape = FALSE,
  label = NA,
  na = ""
) %>%
  kable_styling(
    bootstrap_options = c("striped", "hover", "condensed"),
    fixed_thead = TRUE,
    full_width = TRUE,
    position = "left"
  )
Table 6: Overview of Studies on the Association Between Daily Hassles and SWB Identified Via Review-Screening
ID Reference Country N # Observations (per day) # Observations (total) Daily event types Well-being dimensions Correlation range
R1.1 Fleuren et al. (2023) 402 1 30 Health Positive affect; Negative affect -0.13 – -0.04
R2.1 Almeida et al. (2020) United States 115 6 18 General Negative affect -0.39 – -0.13

Unpublished Studies Identified by the Research Community

Uplifts & SWB

studies.unpub_uplifts <- data_included %>%
  filter(source == "4", DeDimension == "uplift") %>%
  mutate(ID = paste0(StudyID, ".", SampleID)) %>%
  select(
    ID, Reference, Country, DeDimension, DeDomainAll,
    WbDimension, N, DeOccDay, DeOccTotal, CorrCoeff
  ) %>%
  mutate(
    DeDimension = recode(
      DeDimension,
      "uplift" = "Daily uplifts"
    ),
    DeDomainAll = recode(
      DeDomainAll,
      "work/achievement" = "Work/Achievement",
      "social" = "Social",
      "health" = "Health",
      "other" = "Other",
      "general" = "General"
    ),
    WbDimension = recode(
      WbDimension,
      "life_satisfaction" = "Life satisfaction",
      "positive_affect" = "Positive affect",
      "negative_affect" = "Negative affect",
      "domain_satisfaction" = "Domain satisfaction",
      "global_well-being" = "Global well-being"
    ),
    Country = recode(
      Country,
      "Germany, Austria, Switzerland" = "Germany; Austria; Switzerland",
      "UK" = "United Kingdom",
      "US" = "United States",
      "US & CANADA" = "United States; Canada",
      "US, Canada" = "United States; Canada"
    )
  ) %>%
  group_by(ID) %>%
  summarise(
    Reference = first(Reference),
    Country = first(Country),
    `*N*` = first(N),
    `# Observations (per day)` = first(DeOccDay),
    `# Observations (total)` = first(DeOccTotal),
    `Daily event types` = paste(unique(DeDomainAll), collapse = "; "),
    `Well-being dimensions` = paste(unique(WbDimension), collapse = "; "),
    `Correlation range` = if_else(
      min(CorrCoeff, na.rm = TRUE) == max(CorrCoeff, na.rm = TRUE),
      sprintf("%.2f", min(CorrCoeff, na.rm = TRUE)),
      sprintf(
        "%.2f – %.2f",
        min(CorrCoeff, na.rm = TRUE),
        max(CorrCoeff, na.rm = TRUE)
      )
    ),
    .groups = "drop"
  ) %>%
  arrange(as.numeric(str_remove(ID, "^M"))) %>%
  mutate(across(where(is.character), ~ replace_na(.x, "")))

kable(studies.unpub_uplifts
      , caption="**Overview of Unpublished Studies on the Associations Between Daily Uplifts and SWB Identified by the Research Community**"
      , escape=FALSE
      , label = NA
      , na = "") %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 7: Overview of Unpublished Studies on the Associations Between Daily Uplifts and SWB Identified by the Research Community
ID Reference Country N # Observations (per day) # Observations (total) Daily event types Well-being dimensions Correlation range
D4.1 Wright et al. (2026) Germany 951 4 112 General Positive affect; Negative affect 0.07 – 0.25
D5.1 Wang et al. (2013) Germany 92 2 16 Work/Achievement Positive affect; Negative affect; Domain satisfaction; Life satisfaction 0.04 – 0.30
D5.2 Wang et al. (2013) Germany 97 2 16 Work/Achievement Positive affect; Negative affect; Domain satisfaction; Life satisfaction 0.01 – 0.53

Hassles & SWB

studies.unpub_hassles <- data_included %>%
  filter(source == "4", DeDimension == "hassle") %>%
  mutate(ID = paste0(StudyID, ".", SampleID)) %>%
  select(
    ID, Reference, Country, DeDimension, DeDomainAll,
    WbDimension, N, DeOccDay, DeOccTotal, CorrCoeff
  ) %>%
  mutate(
    DeDimension = recode(
      DeDimension,
      "hassle" = "Daily hassles"
    ),
    DeDomainAll = recode(
      DeDomainAll,
      "work/achievement" = "Work/Achievement",
      "social" = "Social",
      "health" = "Health",
      "other" = "Other",
      "general" = "General"
    ),
    WbDimension = recode(
      WbDimension,
      "life_satisfaction" = "Life satisfaction",
      "positive_affect" = "Positive affect",
      "negative_affect" = "Negative affect",
      "domain_satisfaction" = "Domain satisfaction",
      "global_well-being" = "Global well-being"
    ),
    Country = recode(
      Country,
      "Germany, Austria, Switzerland" = "Germany; Austria; Switzerland",
      "UK" = "United Kingdom",
      "US" = "United States",
      "US & CANADA" = "United States; Canada",
      "US, Canada" = "United States; Canada"
    )
  ) %>%
  group_by(ID) %>%
  summarise(
    Reference = first(Reference),
    Country = first(Country),
    `*N*` = first(N),
    `# Observations (per day)` = first(DeOccDay),
    `# Observations (total)` = first(DeOccTotal),
    `Daily event types` = paste(unique(DeDomainAll), collapse = "; "),
    `Well-being dimensions` = paste(unique(WbDimension), collapse = "; "),
    `Correlation range` = if_else(
      min(CorrCoeff, na.rm = TRUE) == max(CorrCoeff, na.rm = TRUE),
      sprintf("%.2f", min(CorrCoeff, na.rm = TRUE)),
      sprintf(
        "%.2f – %.2f",
        min(CorrCoeff, na.rm = TRUE),
        max(CorrCoeff, na.rm = TRUE)
      )
    ),
    .groups = "drop"
  ) %>%
  arrange(as.numeric(str_remove(ID, "^M"))) %>%
  mutate(across(where(is.character), ~ replace_na(.x, "")))

kable(
  studies.unpub_hassles,
  caption = "**Overview of Unpublished Studies on the Associations Between Daily Hassles and SWB Identified by the Research Community**",
  escape = FALSE,
  label = NA,
  na = ""
) %>%
  kable_styling(
    bootstrap_options = c("striped", "hover", "condensed"),
    fixed_thead = TRUE,
    full_width = TRUE,
    position = "left"
  )
Table 8: Overview of Unpublished Studies on the Associations Between Daily Hassles and SWB Identified by the Research Community
ID Reference Country N # Observations (per day) # Observations (total) Daily event types Well-being dimensions Correlation range
D1.1 Haehner et al. (2025) Switzerland 429 3 21 General Positive affect -0.37 – -0.07
D2.1 Haehner et al. (2026) Germany 359 6 84 General Negative affect -0.39 – -0.08
D3.1 Haehner et al. (2024) Germany 574 1 14 General Positive affect; Negative affect -0.56 – 0.02
D4.1 Wright et al. (2026) Germany 823 4 112 General Positive affect; Negative affect -0.32 – -0.10
D5.1 Wang et al. (2013) Germany 92 2 16 Work/Achievement Positive affect; Negative affect; Domain satisfaction; Life satisfaction -0.34 – 0.04
D5.2 Wang et al. (2013) Germany 97 2 16 Work/Achievement Positive affect; Negative affect; Domain satisfaction; Life satisfaction -0.38 – -0.06
D6.1 Paruzel et al. (2025) 74 1 5 Work/Achievement; Social; Health; Other; General Positive affect; Negative affect -0.56 – 0.21

Section 2: Descriptive Statistics

Number of Studies and Effect Sizes

numbers <- data.frame(
  corrtype = c(
    "Within-person",
    "Between-person",
    "Within-person",
    "Between-person",
    ""
  ),

  total_studnum = c(
    length(unique(uplifts_within$StudyID)),
    length(unique(uplifts_between$StudyID)),
    length(unique(hassles_within$StudyID)),
    length(unique(hassles_between$StudyID)),
    length(unique(data_included$StudyID))
  ),

  main_studnum = c(
    length(unique(filter(uplifts_within, source == 1)$StudyID)),
    length(unique(filter(uplifts_between, source == 1)$StudyID)),
    length(unique(filter(hassles_within, source == 1)$StudyID)),
    length(unique(filter(hassles_between, source == 1)$StudyID)),
    length(unique(filter(data_included, source == 1)$StudyID))
  ),

  forward_studnum = c(
    length(unique(filter(uplifts_within, source == 2)$StudyID)),
    length(unique(filter(uplifts_between, source == 2)$StudyID)),
    length(unique(filter(hassles_within, source == 2)$StudyID)),
    length(unique(filter(hassles_between, source == 2)$StudyID)),
    length(unique(filter(data_included, source == 2)$StudyID))
  ),

  review_studnum = c(
    length(unique(filter(uplifts_within, source == 3)$StudyID)),
    length(unique(filter(uplifts_between, source == 3)$StudyID)),
    length(unique(filter(hassles_within, source == 3)$StudyID)),
    length(unique(filter(hassles_between, source == 3)$StudyID)),
    length(unique(filter(data_included, source == 3)$StudyID))
  ),

  unpub_studnum = c(
    length(unique(filter(uplifts_within, source == 4)$StudyID)),
    length(unique(filter(uplifts_between, source == 4)$StudyID)),
    length(unique(filter(hassles_within, source == 4)$StudyID)),
    length(unique(filter(hassles_between, source == 4)$StudyID)),
    length(unique(filter(data_included, source == 4)$StudyID))
  ),

  total_effnum = c(
    nrow(uplifts_within),
    nrow(uplifts_between),
    nrow(hassles_within),
    nrow(hassles_between),
    nrow(data_included)
  ),

  main_effnum = c(
    nrow(filter(uplifts_within, source == 1)),
    nrow(filter(uplifts_between, source == 1)),
    nrow(filter(hassles_within, source == 1)),
    nrow(filter(hassles_between, source == 1)),
    nrow(filter(data_included, source == 1))
  ),

  forward_effnum = c(
    nrow(filter(uplifts_within, source == 2)),
    nrow(filter(uplifts_between, source == 2)),
    nrow(filter(hassles_within, source == 2)),
    nrow(filter(hassles_between, source == 2)),
    nrow(filter(data_included, source == 2))
  ),

  review_effnum = c(
    nrow(filter(uplifts_within, source == 3)),
    nrow(filter(uplifts_between, source == 3)),
    nrow(filter(hassles_within, source == 3)),
    nrow(filter(hassles_between, source == 3)),
    nrow(filter(data_included, source == 3))
  ),

  unpublished_effnum = c(
    nrow(filter(uplifts_within, source == 4)),
    nrow(filter(uplifts_between, source == 4)),
    nrow(filter(hassles_within, source == 4)),
    nrow(filter(hassles_between, source == 4)),
    nrow(filter(data_included, source == 4))
  )
)

names(numbers) <- c("", "Total", "Main search", "Forward search", "Review screening", "Unpublished studies",
                    "Total", "Main search", "Forward search", "Review screening", "Unpublished studies")

kable(numbers
      , caption="**Numbers of Studies and Effect Sizes**"
      , escape=FALSE
      , label = NA) %>%
  pack_rows("Daily uplifts", 1, 2) %>%
  pack_rows("Daily hassles", 3, 4) %>%
  pack_rows("Total", 5, 5) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left") %>% 
  add_header_above(c(" " = 1, "Number of studies" = 5, "Number of effect sizes" = 5))
Table 9: Numbers of Studies and Effect Sizes
Number of studies
Number of effect sizes
Total Main search Forward search Review screening Unpublished studies Total Main search Forward search Review screening Unpublished studies
Daily uplifts
Within-person 50 47 1 0 2 305 285 2 0 18
Between-person 74 65 7 0 2 270 231 29 0 10
Daily hassles
Within-person 119 102 9 2 6 531 472 15 3 41
Between-person 191 164 19 2 6 627 550 45 3 29
Total
217 187 22 2 6 1733 1538 91 6 98

Descriptive Statistics for Moderators

Respective Levels

Overall

Continuous Moderators
# Study-Level

overall_cont_study_level <- data_included %>%
  distinct(StudyID, .keep_all = TRUE) %>%
  select(Year) %>%
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Study")

# Sample-Level

overall_cont_sample_level <- data_included %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup() %>%
  select(Female, AgeM) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Sample")

# Effect Size-Level

overall_cont_es_level <- data_included %>%
  select(N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

# Combine

mod_metric_overall <-
  rbind(
    overall_cont_study_level,
    overall_cont_sample_level,
    overall_cont_es_level
  )

# Re-order columns for table

mod_metric_overall <- mod_metric_overall[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall) <- c("Publication year", "% Female", "Mean age", "Sample size", 
                                   "Number of observations", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_overall) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall
      , caption="**Descriptive Statistics for Continuous Moderators at Their Respective Levels**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 10: Descriptive Statistics for Continuous Moderators at Their Respective Levels
Level n M SD Min Max
Publication year Study 217 2017.67 7.10 1991.00 2026.00
% Female Sample 259 62.32 25.25 0.00 100.00
Mean age Sample 255 31.70 15.65 10.77 80.30
Sample size Effect size 1733 175.14 208.46 18.00 1982.00
Number of observations Effect size 862 3054.35 7884.17 107.00 77474.00
Assessments per day Effect size 1729 1.51 1.41 1.00 13.60
Total assessments Effect size 1729 20.61 23.30 3.00 150.00
SWB reliability Effect size 1339 0.80 0.11 0.54 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
# Recode categorical moderator variables and arrange factor levels

data_included <- data_included %>%
  mutate(
    country_region = case_when(
      Country == "Australia" ~ "Australia",
      
      Country %in% c("Canada", "US", "US & CANADA", "US, Canada") ~ "North America",

      Country %in% c("China", "Israel", "Japan", "Singapore",
                     "Turkey") ~ "Asia",

      Country %in% c("Austria", "France", "Germany",
                     "Germany, Austria, Switzerland",
                     "Netherlands", "Poland",
                     "Switzerland", "UK") ~ "Northern Europe",

      Country %in% c("Croatia", "Romania", "Spain") ~ "Southern Europe",

      TRUE ~ NA_character_
    )
  )

data_included$SampleType <- factor(
  data_included$SampleType,
  levels = c("convenience", "college", "representative")
)

data_included$country_region <- factor(
  data_included$country_region,
  levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
)

data_included$StudyDesign <- factor(
  data_included$StudyDesign,
  levels = c("daily_diary", "esm")
)

data_included$DeDomainAll <- factor(
  data_included$DeDomainAll,
  levels = c("general", "work/achievement", "social", "health", "other")
)

data_included$TypeDeMeasure <- factor(
  data_included$TypeDeMeasure,
  levels = c("checklist/questionnaire", "open_response", "interview", "other")
)

data_included$DeDataType <- factor(
  data_included$DeDataType,
  levels = c("dichotomous", "numeric_count", "scale_score", "other")
)

data_included$WbDimension <- factor(
  data_included$WbDimension,
  levels = c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being")
)

data_included$CorrLag <- factor(
  data_included$CorrLag,
  levels = c("concurrent", "prospective")
)

# Create dataset for computation of descriptive statistics for moderator on sample-level

overall_cat_sample_level_data <- data_included %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup()

# Compute descriptive statistics for categorical moderator variables

mod_cat_overall <-
  rbind(
    as.data.frame(cbind(Level = "Sample",
                        table(overall_cat_sample_level_data$SampleType),
                        round(prop.table(table(overall_cat_sample_level_data$SampleType)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(overall_cat_sample_level_data$country_region), 
                        round(prop.table(table(overall_cat_sample_level_data$country_region)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(data_included$DeDomainAll), 
                        round(prop.table(table(data_included$DeDomainAll)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(data_included$TypeDeMeasure), 
                        round(prop.table(table(data_included$TypeDeMeasure)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(data_included$DeDataType), 
                        round(prop.table(table(data_included$DeDataType)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(data_included$WbDimension), 
                        round(prop.table(table(data_included$WbDimension)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
      table(overall_cat_sample_level_data$StudyDesign),
                        round(prop.table(table(overall_cat_sample_level_data$StudyDesign)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(data_included$CorrLag), 
                        round(prop.table(table(data_included$CorrLag)),4) * 100)))

names(mod_cat_overall) <- c("Level", "*n*", "% *n*")

rownames(mod_cat_overall) <- c("Convenience", "College", "Representative", 
                               "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                               "General", "Work/Achievement", "Social", "Health", "Other event",
                               "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                               "Dichotomous", "Numeric count", "Scale score", "Other type",
                               "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                               "Daily diary", "Experience sampling",
                               "Concurrent", "Prospective")

kable(mod_cat_overall
      , caption="**Descriptive Statistics for Categorical Moderators at Their Respective Levels**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 11: Descriptive Statistics for Categorical Moderators at Their Respective Levels
Level n % n
Sample type
Convenience Sample 182 70
College Sample 77 29.62
Representative Sample 1 0.38
Country
North America Sample 146 65.47
Northern Europe Sample 39 17.49
Southern Europe Sample 6 2.69
Asia Sample 26 11.66
Australia Sample 6 2.69
Daily event domain
General Effect size 607 35.03
Work/Achievement Effect size 419 24.18
Social Effect size 565 32.6
Health Effect size 58 3.35
Other event Effect size 84 4.85
Daily event measurement
Checklist/questionnaire Effect size 1572 91.18
Open-response Effect size 74 4.29
Interview Effect size 72 4.18
Other measure Effect size 6 0.35
Daily event data type
Dichotomous Effect size 392 22.63
Numeric count Effect size 304 17.55
Scale score Effect size 1023 59.06
Other type Effect size 13 0.75
Well-being dimension
Life satisfaction Effect size 134 7.73
Domain satisfaction Effect size 61 3.52
Positive affect Effect size 699 40.33
Negative affect Effect size 811 46.8
Global well-being Effect size 28 1.62
Study design
Daily diary Sample 206 79.23
Experience sampling Sample 54 20.77
Correlation lag
Concurrent Effect size 1481 85.46
Prospective Effect size 252 14.54

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Uplifts & SWB

Within-Person
Continuous Moderators
# Study-Level

overall_cont_study_level_uplifts_within <- uplifts_within %>%
  distinct(StudyID, .keep_all = TRUE) %>%
  select(Year) %>%
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Study")

# Sample-Level

overall_cont_sample_level_uplifts_within <- uplifts_within %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup() %>%
  select(Female, AgeM) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Sample")

# Effect Size-Level

overall_cont_es_level_uplifts_within <- uplifts_within %>%
  select(N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

# Combine

mod_metric_overall_uplifts_within <-
  rbind(
    overall_cont_study_level_uplifts_within,
    overall_cont_sample_level_uplifts_within,
    overall_cont_es_level_uplifts_within
  )

# Re-order columns for table

mod_metric_overall_uplifts_within <- mod_metric_overall_uplifts_within[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall_uplifts_within) <- c("Publication year", "% Female", "Mean age", "Sample size", 
                                                  "Number of observations", "Assessments per day", 
                                                  "Total assessments", "SWB reliability")

names(mod_metric_overall_uplifts_within) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall_uplifts_within
      , caption="**Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Within-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 12: Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Within-Person Association Between Daily Uplifts and SWB
Level n M SD Min Max
Publication year Study 50 2018.20 7.21 1992.00 2026.00
% Female Sample 67 61.54 24.69 0.00 100.00
Mean age Sample 66 29.19 12.02 10.79 64.47
Sample size Effect size 305 164.79 201.81 20.00 1982.00
Number of observations Effect size 304 2588.26 7487.29 150.00 76594.00
Assessments per day Effect size 305 1.20 0.88 1.00 12.51
Total assessments Effect size 305 17.01 19.11 4.00 120.00
SWB reliability Effect size 252 0.75 0.11 0.55 0.98

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
uplifts_within <- uplifts_within %>%
  mutate(
    country_region = case_when(
      Country == "Australia" ~ "Australia",
      
      Country %in% c("Canada", "US", "US & CANADA", "US, Canada") ~ "North America",

      Country %in% c("China", "Israel", "Japan", "Singapore",
                     "Turkey") ~ "Asia",

      Country %in% c("Austria", "France", "Germany",
                     "Germany, Austria, Switzerland",
                     "Netherlands", "Poland",
                     "Switzerland", "UK") ~ "Northern Europe",

      Country %in% c("Croatia", "Romania", "Spain") ~ "Southern Europe",

      TRUE ~ NA_character_
    )
  )

uplifts_within$SampleType <- factor(
  uplifts_within$SampleType,
  levels = c("convenience", "college", "representative")
)

uplifts_within$country_region <- factor(
  uplifts_within$country_region,
  levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
)

uplifts_within$StudyDesign <- factor(
  uplifts_within$StudyDesign,
  levels = c("daily_diary", "esm")
)

uplifts_within$DeDomainAll <- factor(
  uplifts_within$DeDomainAll,
  levels = c("general", "work/achievement", "social", "health", "other")
)

uplifts_within$TypeDeMeasure <- factor(
  uplifts_within$TypeDeMeasure,
  levels = c("checklist/questionnaire", "open_response", "interview", "other")
)

uplifts_within$DeDataType <- factor(
  uplifts_within$DeDataType,
  levels = c("dichotomous", "numeric_count", "scale_score", "other")
)

uplifts_within$WbDimension <- factor(
  uplifts_within$WbDimension,
  levels = c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being")
)

uplifts_within$CorrLag <- factor(
  uplifts_within$CorrLag,
  levels = c("concurrent", "prospective")
)

# Create dataset for computation of descriptive statistics for moderator on sample-level

cat_sample_level_data_uplifts_within <- uplifts_within %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup()

# Compute descriptive statistics for categorical moderator variables

mod_cat_uplifts_within <-
  rbind(
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_uplifts_within$SampleType),
                        round(prop.table(table(cat_sample_level_data_uplifts_within$SampleType)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_uplifts_within$country_region), 
                        round(prop.table(table(cat_sample_level_data_uplifts_within$country_region)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(uplifts_within$DeDomainAll), 
                        round(prop.table(table(uplifts_within$DeDomainAll)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_within$TypeDeMeasure), 
                        round(prop.table(table(uplifts_within$TypeDeMeasure)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_within$DeDataType), 
                        round(prop.table(table(uplifts_within$DeDataType)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_within$WbDimension), 
                        round(prop.table(table(uplifts_within$WbDimension)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
      table(cat_sample_level_data_uplifts_within$StudyDesign),
                        round(prop.table(table(cat_sample_level_data_uplifts_within$StudyDesign)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(uplifts_within$CorrLag), 
                        round(prop.table(table(uplifts_within$CorrLag)),4) * 100)))

names(mod_cat_uplifts_within) <- c("Level", "*n*", "% *n*")

rownames(mod_cat_uplifts_within) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling",
                                     "Concurrent", "Prospective")

kable(mod_cat_uplifts_within
      , caption="**Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Within-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 13: Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Within-Person Association Between Daily Uplifts and SWB
Level n % n
Sample type
Convenience Sample 43 64.18
College Sample 23 34.33
Representative Sample 1 1.49
Country
North America Sample 41 74.55
Northern Europe Sample 9 16.36
Southern Europe Sample 2 3.64
Asia Sample 2 3.64
Australia Sample 1 1.82
Daily event domain
General Effect size 70 22.95
Work/Achievement Effect size 111 36.39
Social Effect size 116 38.03
Health Effect size 0 0
Other event Effect size 8 2.62
Daily event measurement
Checklist/questionnaire Effect size 275 90.16
Open-response Effect size 12 3.93
Interview Effect size 18 5.9
Other measure Effect size 0 0
Daily event data type
Dichotomous Effect size 68 22.3
Numeric count Effect size 38 12.46
Scale score Effect size 196 64.26
Other type Effect size 3 0.98
Well-being dimension
Life satisfaction Effect size 35 11.48
Domain satisfaction Effect size 16 5.25
Positive affect Effect size 127 41.64
Negative affect Effect size 123 40.33
Global well-being Effect size 4 1.31
Study design
Daily diary Sample 58 86.57
Experience sampling Sample 9 13.43
Correlation lag
Concurrent Effect size 193 63.28
Prospective Effect size 112 36.72

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Between-Person
Continuous Moderators
# Study-Level

overall_cont_study_level_uplifts_between <- uplifts_between %>%
  distinct(StudyID, .keep_all = TRUE) %>%
  select(Year) %>%
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Study")

# Sample-Level

overall_cont_sample_level_uplifts_between <- uplifts_between %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup() %>%
  select(Female, AgeM) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Sample")

# Effect Size-Level

overall_cont_es_level_uplifts_between <- uplifts_between %>%
  select(N, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

# Combine

mod_metric_overall_uplifts_between <-
  rbind(
    overall_cont_study_level_uplifts_between,
    overall_cont_sample_level_uplifts_between,
    overall_cont_es_level_uplifts_between
  )

# Re-order columns for table

mod_metric_overall_uplifts_between <- mod_metric_overall_uplifts_between[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall_uplifts_between) <- c("Publication year", "% Female", "Mean age", "Sample size", 
                                                   "Assessments per day", "Total assessments", "SWB reliability")

names(mod_metric_overall_uplifts_between) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall_uplifts_between
      , caption="**Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Between-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 14: Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Between-Person Association Between Daily Uplifts and SWB
Level n M SD Min Max
Publication year Study 74 2017.34 6.83 1991.00 2026.00
% Female Sample 96 61.27 26.89 0.00 100.00
Mean age Sample 95 30.22 14.24 10.79 74.36
Sample size Effect size 270 181.51 233.32 18.00 1982.00
Assessments per day Effect size 270 1.26 1.08 1.00 12.51
Total assessments Effect size 270 17.05 16.61 3.00 120.00
SWB reliability Effect size 202 0.80 0.11 0.55 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
uplifts_between <- uplifts_between %>%
  mutate(
    country_region = case_when(
      Country == "Australia" ~ "Australia",
      
      Country %in% c("Canada", "US", "US & CANADA", "US, Canada") ~ "North America",

      Country %in% c("China", "Israel", "Japan", "Singapore",
                     "Turkey") ~ "Asia",

      Country %in% c("Austria", "France", "Germany",
                     "Germany, Austria, Switzerland",
                     "Netherlands", "Poland",
                     "Switzerland", "UK") ~ "Northern Europe",

      Country %in% c("Croatia", "Romania", "Spain") ~ "Southern Europe",

      TRUE ~ NA_character_
    )
  )

uplifts_between$SampleType <- factor(
  uplifts_between$SampleType,
  levels = c("convenience", "college", "representative")
)

uplifts_between$country_region <- factor(
  uplifts_between$country_region,
  levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
)

uplifts_between$StudyDesign <- factor(
  uplifts_between$StudyDesign,
  levels = c("daily_diary", "esm")
)

uplifts_between$DeDomainAll <- factor(
  uplifts_between$DeDomainAll,
  levels = c("general", "work/achievement", "social", "health", "other")
)

uplifts_between$TypeDeMeasure <- factor(
  uplifts_between$TypeDeMeasure,
  levels = c("checklist/questionnaire", "open_response", "interview", "other")
)

uplifts_between$DeDataType <- factor(
  uplifts_between$DeDataType,
  levels = c("dichotomous", "numeric_count", "scale_score", "other")
)

uplifts_between$WbDimension <- factor(
  uplifts_between$WbDimension,
  levels = c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being")
)

uplifts_between$CorrLag <- factor(
  uplifts_between$CorrLag,
  levels = c("concurrent", "prospective")
)

# Create dataset for computation of descriptive statistics for moderator on sample-level

cat_sample_level_data_uplifts_between <- uplifts_between %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup()

# Compute descriptive statistics for categorical moderator variables

mod_cat_uplifts_between <-
  rbind(
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_uplifts_between$SampleType),
                        round(prop.table(table(cat_sample_level_data_uplifts_between$SampleType)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_uplifts_between$country_region), 
                        round(prop.table(table(cat_sample_level_data_uplifts_between$country_region)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(uplifts_between$DeDomainAll), 
                        round(prop.table(table(uplifts_between$DeDomainAll)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_between$TypeDeMeasure), 
                        round(prop.table(table(uplifts_between$TypeDeMeasure)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_between$DeDataType), 
                        round(prop.table(table(uplifts_between$DeDataType)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
      table(uplifts_between$WbDimension), 
                        round(prop.table(table(uplifts_between$WbDimension)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
      table(cat_sample_level_data_uplifts_between$StudyDesign),
                        round(prop.table(table(cat_sample_level_data_uplifts_between$StudyDesign)),4) * 100)))

names(mod_cat_uplifts_between) <- c("Level", "*n*", "% *n*")

rownames(mod_cat_uplifts_between) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling")

kable(mod_cat_uplifts_between
      , caption="**Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Between-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 15: Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Between-Person Association Between Daily Uplifts and SWB
Level n % n
Sample type
Convenience Sample 60 62.5
College Sample 35 36.46
Representative Sample 1 1.04
Country
North America Sample 55 68.75
Northern Europe Sample 14 17.5
Southern Europe Sample 2 2.5
Asia Sample 7 8.75
Australia Sample 2 2.5
Daily event domain
General Effect size 77 28.52
Work/Achievement Effect size 73 27.04
Social Effect size 108 40
Health Effect size 0 0
Other event Effect size 12 4.44
Daily event measurement
Checklist/questionnaire Effect size 241 89.59
Open-response Effect size 16 5.95
Interview Effect size 10 3.72
Other measure Effect size 2 0.74
Daily event data type
Dichotomous Effect size 58 21.56
Numeric count Effect size 44 16.36
Scale score Effect size 162 60.22
Other type Effect size 5 1.86
Well-being dimension
Life satisfaction Effect size 28 10.37
Domain satisfaction Effect size 11 4.07
Positive affect Effect size 119 44.07
Negative affect Effect size 109 40.37
Global well-being Effect size 3 1.11
Study design
Daily diary Sample 83 86.46
Experience sampling Sample 13 13.54

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Hassles & SWB

Within-Person
Continuous Moderators
# Study-Level

overall_cont_study_level_hassles_within <- hassles_within %>%
  distinct(StudyID, .keep_all = TRUE) %>%
  select(Year) %>%
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Study")

# Sample-Level

overall_cont_sample_level_hassles_within <- hassles_within %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup() %>%
  select(Female, AgeM) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Sample")

# Effect Size-Level

overall_cont_es_level_hassles_within <- hassles_within %>%
  select(N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

# Combine

mod_metric_overall_hassles_within <-
  rbind(
    overall_cont_study_level_hassles_within,
    overall_cont_sample_level_hassles_within,
    overall_cont_es_level_hassles_within
  )

# Re-order columns for table

mod_metric_overall_hassles_within <- mod_metric_overall_hassles_within[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall_hassles_within) <- c("Publication year", "% Female", "Mean age", "Sample size", 
                                                  "Number of observations", "Assessments per day", 
                                                  "Total assessments", "SWB reliability")

names(mod_metric_overall_hassles_within) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall_hassles_within
      , caption="**Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Within-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 16: Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Within-Person Association Between Daily Hassles and SWB
Level n M SD Min Max
Publication year Study 119 2019.15 6.56 1992.00 2026.00
% Female Sample 138 64.28 21.81 0.00 100.00
Mean age Sample 135 30.86 13.22 10.77 73.50
Sample size Effect size 531 172.87 201.12 38.00 1982.00
Number of observations Effect size 530 3322.65 8287.27 107.00 77474.00
Assessments per day Effect size 531 1.59 1.46 1.00 8.00
Total assessments Effect size 531 22.27 26.19 4.00 150.00
SWB reliability Effect size 419 0.78 0.11 0.54 0.98

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
hassles_within <- hassles_within %>%
  mutate(
    country_region = case_when(
      Country == "Australia" ~ "Australia",
      
      Country %in% c("Canada", "US", "US & CANADA", "US, Canada") ~ "North America",

      Country %in% c("China", "Israel", "Japan", "Singapore",
                     "Turkey") ~ "Asia",

      Country %in% c("Austria", "France", "Germany",
                     "Germany, Austria, Switzerland",
                     "Netherlands", "Poland",
                     "Switzerland", "UK") ~ "Northern Europe",

      Country %in% c("Croatia", "Romania", "Spain") ~ "Southern Europe",

      TRUE ~ NA_character_
    )
  )

hassles_within$SampleType <- factor(
  hassles_within$SampleType,
  levels = c("convenience", "college", "representative")
)

hassles_within$country_region <- factor(
  hassles_within$country_region,
  levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
)

hassles_within$StudyDesign <- factor(
  hassles_within$StudyDesign,
  levels = c("daily_diary", "esm")
)

hassles_within$DeDomainAll <- factor(
  hassles_within$DeDomainAll,
  levels = c("general", "work/achievement", "social", "health", "other")
)

hassles_within$TypeDeMeasure <- factor(
  hassles_within$TypeDeMeasure,
  levels = c("checklist/questionnaire", "open_response", "interview", "other")
)

hassles_within$DeDataType <- factor(
  hassles_within$DeDataType,
  levels = c("dichotomous", "numeric_count", "scale_score", "other")
)

hassles_within$WbDimension <- factor(
  hassles_within$WbDimension,
  levels = c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being")
)

hassles_within$CorrLag <- factor(
  hassles_within$CorrLag,
  levels = c("concurrent", "prospective")
)

# Create dataset for computation of descriptive statistics for moderator on sample-level

cat_sample_level_data_hassles_within <- hassles_within %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup()

# Compute descriptive statistics for categorical moderator variables

mod_cat_hassles_within <-
  rbind(
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_hassles_within$SampleType),
                        round(prop.table(table(cat_sample_level_data_hassles_within$SampleType)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_hassles_within$country_region), 
                        round(prop.table(table(cat_sample_level_data_hassles_within$country_region)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_within$DeDomainAll), 
                        round(prop.table(table(hassles_within$DeDomainAll)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_within$TypeDeMeasure), 
                        round(prop.table(table(hassles_within$TypeDeMeasure)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_within$DeDataType), 
                        round(prop.table(table(hassles_within$DeDataType)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_within$WbDimension), 
                        round(prop.table(table(hassles_within$WbDimension)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
      table(cat_sample_level_data_hassles_within$StudyDesign),
                        round(prop.table(table(cat_sample_level_data_hassles_within$StudyDesign)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_within$CorrLag), 
                        round(prop.table(table(hassles_within$CorrLag)),4) * 100)))

names(mod_cat_hassles_within) <- c("Level", "*n*", "% *n*")

rownames(mod_cat_hassles_within) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling",
                                     "Concurrent", "Prospective")

kable(mod_cat_hassles_within
      , caption="**Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Within-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 17: Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Within-Person Association Between Daily Hassles and SWB
Level n % n
Sample type
Convenience Sample 100 72.46
College Sample 37 26.81
Representative Sample 1 0.72
Country
North America Sample 74 60.66
Northern Europe Sample 31 25.41
Southern Europe Sample 5 4.1
Asia Sample 11 9.02
Australia Sample 1 0.82
Daily event domain
General Effect size 184 34.65
Work/Achievement Effect size 139 26.18
Social Effect size 159 29.94
Health Effect size 23 4.33
Other event Effect size 26 4.9
Daily event measurement
Checklist/questionnaire Effect size 491 92.99
Open-response Effect size 13 2.46
Interview Effect size 24 4.55
Other measure Effect size 0 0
Daily event data type
Dichotomous Effect size 115 21.66
Numeric count Effect size 94 17.7
Scale score Effect size 322 60.64
Other type Effect size 0 0
Well-being dimension
Life satisfaction Effect size 38 7.16
Domain satisfaction Effect size 14 2.64
Positive affect Effect size 206 38.79
Negative affect Effect size 265 49.91
Global well-being Effect size 8 1.51
Study design
Daily diary Sample 107 77.54
Experience sampling Sample 31 22.46
Correlation lag
Concurrent Effect size 391 73.63
Prospective Effect size 140 26.37

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Between-Person
Continuous Moderators
# Study-Level

overall_cont_study_level_hassles_between <- hassles_between %>%
  distinct(StudyID, .keep_all = TRUE) %>%
  select(Year) %>%
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Study")

# Sample-Level

overall_cont_sample_level_hassles_between <- hassles_between %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup() %>%
  select(Female, AgeM) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Sample")

# Effect Size-Level

overall_cont_es_level_hassles_between <- hassles_between %>%
  select(N, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

# Combine

mod_metric_overall_hassles_between <-
  rbind(
    overall_cont_study_level_hassles_between,
    overall_cont_sample_level_hassles_between,
    overall_cont_es_level_hassles_between
  )

# Re-order columns for table

mod_metric_overall_hassles_between <- mod_metric_overall_hassles_between[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall_hassles_between) <- c("Publication year", "% Female", "Mean age", "Sample size", 
                                                   "Assessments per day", "Total assessments", "SWB reliability")

names(mod_metric_overall_hassles_between) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall_hassles_between
      , caption="**Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Between-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 18: Descriptive Statistics for Continuous Moderators at Their Respective Levels for the Between-Person Association Between Daily Hassles and SWB
Level n M SD Min Max
Publication year Study 191 2017.79 6.88 1991.00 2026.00
% Female Sample 223 63.07 23.83 0.00 100.00
Mean age Sample 219 31.54 16.13 10.77 80.30
Sample size Effect size 627 179.35 206.70 18.00 1982.00
Assessments per day Effect size 623 1.71 1.64 1.00 13.60
Total assessments Effect size 623 22.51 24.67 3.00 150.00
SWB reliability Effect size 466 0.84 0.10 0.55 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
hassles_between <- hassles_between %>%
  mutate(
    country_region = case_when(
      Country == "Australia" ~ "Australia",
      
      Country %in% c("Canada", "US", "US & CANADA", "US, Canada") ~ "North America",

      Country %in% c("China", "Israel", "Japan", "Singapore",
                     "Turkey") ~ "Asia",

      Country %in% c("Austria", "France", "Germany",
                     "Germany, Austria, Switzerland",
                     "Netherlands", "Poland",
                     "Switzerland", "UK") ~ "Northern Europe",

      Country %in% c("Croatia", "Romania", "Spain") ~ "Southern Europe",

      TRUE ~ NA_character_
    )
  )

hassles_between$SampleType <- factor(
  hassles_between$SampleType,
  levels = c("convenience", "college", "representative")
)

hassles_between$country_region <- factor(
  hassles_between$country_region,
  levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
)

hassles_between$StudyDesign <- factor(
  hassles_between$StudyDesign,
  levels = c("daily_diary", "esm")
)

hassles_between$DeDomainAll <- factor(
  hassles_between$DeDomainAll,
  levels = c("general", "work/achievement", "social", "health", "other")
)

hassles_between$TypeDeMeasure <- factor(
  hassles_between$TypeDeMeasure,
  levels = c("checklist/questionnaire", "open_response", "interview", "other")
)

hassles_between$DeDataType <- factor(
  hassles_between$DeDataType,
  levels = c("dichotomous", "numeric_count", "scale_score", "other")
)

hassles_between$WbDimension <- factor(
  hassles_between$WbDimension,
  levels = c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being")
)

hassles_between$CorrLag <- factor(
  hassles_between$CorrLag,
  levels = c("concurrent", "prospective")
)

# Create dataset for computation of descriptive statistics for moderator on sample-level

cat_sample_level_data_hassles_between <- hassles_between %>% 
  group_by(StudyID) %>%
  distinct(SampleID, .keep_all = TRUE) %>%
  ungroup()

# Compute descriptive statistics for categorical moderator variables

mod_cat_hassles_between <-
  rbind(
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_hassles_between$SampleType),
                        round(prop.table(table(cat_sample_level_data_hassles_between$SampleType)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_hassles_between$country_region), 
                        round(prop.table(table(cat_sample_level_data_hassles_between$country_region)),4) * 100)),
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_between$DeDomainAll), 
                        round(prop.table(table(hassles_between$DeDomainAll)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_between$TypeDeMeasure), 
                        round(prop.table(table(hassles_between$TypeDeMeasure)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_between$DeDataType), 
                        round(prop.table(table(hassles_between$DeDataType)),4) * 100)), 
    as.data.frame(cbind(Level = "Effect size",
                        table(hassles_between$WbDimension), 
                        round(prop.table(table(hassles_between$WbDimension)),4) * 100)), 
    as.data.frame(cbind(Level = "Sample",
                        table(cat_sample_level_data_hassles_between$StudyDesign),
                        round(prop.table(table(cat_sample_level_data_hassles_between$StudyDesign)),4) * 100)))

names(mod_cat_hassles_between) <- c("Level", "*n*", "% *n*")

rownames(mod_cat_hassles_between) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling")

kable(mod_cat_hassles_between
      , caption="**Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Between-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 19: Descriptive Statistics for Categorical Moderators at Their Respective Levels for the Between-Person Association Between Daily Hassles and SWB
Level n % n
Sample type
Convenience Sample 151 67.41
College Sample 72 32.14
Representative Sample 1 0.45
Country
North America Sample 132 67.69
Northern Europe Sample 34 17.44
Southern Europe Sample 4 2.05
Asia Sample 19 9.74
Australia Sample 6 3.08
Daily event domain
General Effect size 276 44.02
Work/Achievement Effect size 96 15.31
Social Effect size 182 29.03
Health Effect size 35 5.58
Other event Effect size 38 6.06
Daily event measurement
Checklist/questionnaire Effect size 565 90.84
Open-response Effect size 33 5.31
Interview Effect size 20 3.22
Other measure Effect size 4 0.64
Daily event data type
Dichotomous Effect size 151 24.08
Numeric count Effect size 128 20.41
Scale score Effect size 343 54.7
Other type Effect size 5 0.8
Well-being dimension
Life satisfaction Effect size 33 5.26
Domain satisfaction Effect size 20 3.19
Positive affect Effect size 247 39.39
Negative affect Effect size 314 50.08
Global well-being Effect size 13 2.07
Study design
Daily diary Sample 173 77.23
Experience sampling Sample 51 22.77

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Effect Size Level

Overall

Continuous Moderators
mod_metric_overall_es <- data_included %>% 
  select(Year, Female, AgeM, N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

mod_metric_overall_es <- mod_metric_overall_es[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_overall_es) <- c("Publication year", "% Female", "Mean age", "Sample size", "Number of observations", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_overall_es) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_overall_es
      , caption="**Descriptive Statistics for Continuous Moderators at the Effect Size Level**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 20: Descriptive Statistics for Continuous Moderators at the Effect Size Level
Level n M SD Min Max
Publication year Effect size 1733 2017.73 6.61 1991.00 2026.00
% Female Effect size 1731 63.51 22.60 0.00 100.00
Mean age Effect size 1709 29.39 13.94 10.77 80.30
Sample size Effect size 1733 175.14 208.46 18.00 1982.00
Number of observations Effect size 862 3054.35 7884.17 107.00 77474.00
Assessments per day Effect size 1729 1.51 1.41 1.00 13.60
Total assessments Effect size 1729 20.61 23.30 3.00 150.00
SWB reliability Effect size 1339 0.80 0.11 0.54 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
mod_cat_overall_es <-
  rbind(as.data.frame(cbind(table(data_included$SampleType), 
                                     round(prop.table(table(data_included$SampleType)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$country_region), 
                                     round(prop.table(table(data_included$country_region)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$StudyDesign),
                                     round(prop.table(table(data_included$StudyDesign)),4) * 100)),
                 as.data.frame(cbind(table(data_included$DeDomainAll), 
                                     round(prop.table(table(data_included$DeDomainAll)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$TypeDeMeasure), 
                                     round(prop.table(table(data_included$TypeDeMeasure)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$DeDataType), 
                                     round(prop.table(table(data_included$DeDataType)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$WbDimension), 
                                     round(prop.table(table(data_included$WbDimension)),4) * 100)), 
                 as.data.frame(cbind(table(data_included$CorrLag), 
                                     round(prop.table(table(data_included$CorrLag)),4) * 100)))

mod_cat_overall_es <- mod_cat_overall_es %>%
  mutate(level = "Effect size")

names(mod_cat_overall_es) <- c("*n*", "% *n*", "Level")

mod_cat_overall_es <- mod_cat_overall_es[, c("Level", "*n*", "% *n*")]

rownames(mod_cat_overall_es) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling",
                                     "Concurrent", "Prospective")

kable(mod_cat_overall_es
      , caption="**Descriptive Statistics for Categorical Moderators at the Effect Size Level**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 21: Descriptive Statistics for Categorical Moderators at the Effect Size Level
Level n % n
Sample type
Convenience Effect size 981 56.61
College Effect size 744 42.93
Representative Effect size 8 0.46
Country
North America Effect size 1115 73.55
Northern Europe Effect size 238 15.70
Southern Europe Effect size 24 1.58
Asia Effect size 114 7.52
Australia Effect size 25 1.65
Daily event domain
General Effect size 1402 80.90
Work/Achievement Effect size 331 19.10
Social Effect size 607 35.03
Health Effect size 419 24.18
Other event Effect size 565 32.60
Daily event measurement
Checklist/questionnaire Effect size 58 3.35
Open-response Effect size 84 4.85
Interview Effect size 1572 91.18
Other measure Effect size 74 4.29
Daily event data type
Dichotomous Effect size 72 4.18
Numeric count Effect size 6 0.35
Scale score Effect size 392 22.63
Other type Effect size 304 17.55
Well-being dimension
Life satisfaction Effect size 1023 59.06
Domain satisfaction Effect size 13 0.75
Positive affect Effect size 134 7.73
Negative affect Effect size 61 3.52
Global well-being Effect size 699 40.33
Study design
Daily diary Effect size 811 46.80
Experience sampling Effect size 28 1.62
Correlation lag
Concurrent Effect size 1481 85.46
Prospective Effect size 252 14.54

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Uplifts & SWB

Within-Person
Continuous Moderators
mod_metric_uplifts_within_es <- uplifts_within %>% 
  select(Year, Female, AgeM, N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

mod_metric_uplifts_within_es <- mod_metric_uplifts_within_es[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_uplifts_within_es) <- c("Publication year", "% Female", "Mean age", "Sample size", "Number of observations", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_uplifts_within_es) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_uplifts_within_es
      , caption="**Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Within-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 22: Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Within-Person Association Between Daily Uplifts and SWB
Level n M SD Min Max
Publication year Effect size 305 2017.35 6.60 1992.00 2026.00
% Female Effect size 305 63.67 22.98 0.00 100.00
Mean age Effect size 301 26.36 10.97 10.79 64.47
Sample size Effect size 305 164.79 201.81 20.00 1982.00
Number of observations Effect size 304 2588.26 7487.29 150.00 76594.00
Assessments per day Effect size 305 1.20 0.88 1.00 12.51
Total assessments Effect size 305 17.01 19.11 4.00 120.00
SWB reliability Effect size 252 0.75 0.11 0.55 0.98

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
mod_cat_uplifts_within_es <- rbind(as.data.frame(cbind(table(uplifts_within$SampleType), 
                                                    round(prop.table(table(uplifts_within$SampleType)),4) * 100)),
                                as.data.frame(cbind(table(uplifts_within$country_region), 
                                                    round(prop.table(table(uplifts_within$country_region)),4) * 100)), 
                                as.data.frame(cbind(table(uplifts_within$StudyDesign),
                                                    round(prop.table(table(uplifts_within$StudyDesign)),4) * 100)),
                                as.data.frame(cbind(table(uplifts_within$DeDomainAll), 
                                                    round(prop.table(table(uplifts_within$DeDomainAll)),4) * 100)), 
                                as.data.frame(cbind(table(uplifts_within$TypeDeMeasure), 
                                                    round(prop.table(table(uplifts_within$TypeDeMeasure)),4) * 100)), 
                                as.data.frame(cbind(table(uplifts_within$DeDataType), 
                                                    round(prop.table(table(uplifts_within$DeDataType)),4) * 100)), 
                                as.data.frame(cbind(table(uplifts_within$WbDimension), 
                                                    round(prop.table(table(uplifts_within$WbDimension)),4) * 100)), 
                                as.data.frame(cbind(table(uplifts_within$CorrLag), 
                                                    round(prop.table(table(uplifts_within$CorrLag)),4) * 100)))

mod_cat_uplifts_within_es <- mod_cat_uplifts_within_es %>%
  mutate(level = "Effect size")

names(mod_cat_uplifts_within_es) <- c("*n*", "% *n*", "Level")

mod_cat_uplifts_within_es <- mod_cat_uplifts_within_es[, c("Level", "*n*", "% *n*")]

rownames(mod_cat_uplifts_within_es) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling",
                                     "Concurrent", "Prospective")

kable(mod_cat_uplifts_within_es
      , caption="**Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Within-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 23: Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Within-Person Association Between Daily Uplifts and SWB
Level n % n
Sample type
Convenience Effect size 132 43.28
College Effect size 171 56.07
Representative Effect size 2 0.66
Country
North America Effect size 235 83.04
Northern Europe Effect size 34 12.01
Southern Europe Effect size 3 1.06
Asia Effect size 9 3.18
Australia Effect size 2 0.71
Daily event domain
General Effect size 267 87.54
Work/Achievement Effect size 38 12.46
Social Effect size 70 22.95
Health Effect size 111 36.39
Other event Effect size 116 38.03
Daily event measurement
Checklist/questionnaire Effect size 0 0.00
Open-response Effect size 8 2.62
Interview Effect size 275 90.16
Other measure Effect size 12 3.93
Daily event data type
Dichotomous Effect size 18 5.90
Numeric count Effect size 0 0.00
Scale score Effect size 68 22.30
Other type Effect size 38 12.46
Well-being dimension
Life satisfaction Effect size 196 64.26
Domain satisfaction Effect size 3 0.98
Positive affect Effect size 35 11.48
Negative affect Effect size 16 5.25
Global well-being Effect size 127 41.64
Study design
Daily diary Effect size 123 40.33
Experience sampling Effect size 4 1.31
Correlation lag
Concurrent Effect size 193 63.28
Prospective Effect size 112 36.72

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Between-Person
Continuous Moderators
mod_metric_uplifts_between_es <- uplifts_between %>% 
  select(Year, Female, AgeM, N, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

mod_metric_uplifts_between_es <- mod_metric_uplifts_between_es[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_uplifts_between_es) <- c("Publication year", "% Female", "Mean age", "Sample size", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_uplifts_between_es) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_uplifts_between_es
      , caption="**Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Between-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 24: Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Between-Person Association Between Daily Uplifts and SWB
Level n M SD Min Max
Publication year Effect size 270 2016.37 7.00 1991.00 2026.00
% Female Effect size 270 61.24 26.20 0.00 100.00
Mean age Effect size 268 28.55 13.22 10.79 74.36
Sample size Effect size 270 181.51 233.32 18.00 1982.00
Assessments per day Effect size 270 1.26 1.08 1.00 12.51
Total assessments Effect size 270 17.05 16.61 3.00 120.00
SWB reliability Effect size 202 0.80 0.11 0.55 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
mod_cat_uplifts_between_es <- rbind(as.data.frame(cbind(table(uplifts_between$SampleType), 
                                                    round(prop.table(table(uplifts_between$SampleType)),4) * 100)), 
                 as.data.frame(cbind(table(uplifts_between$country_region), 
                                     round(prop.table(table(uplifts_between$country_region)),4) * 100)), 
                 as.data.frame(cbind(table(uplifts_between$StudyDesign), round(prop.table(table(uplifts_between$StudyDesign)),4) * 100)),
                 as.data.frame(cbind(table(uplifts_between$DeDomainAll), 
                                     round(prop.table(table(uplifts_between$DeDomainAll)),4) * 100)), 
                 as.data.frame(cbind(table(uplifts_between$TypeDeMeasure), 
                                     round(prop.table(table(uplifts_between$TypeDeMeasure)),4) * 100)), 
                 as.data.frame(cbind(table(uplifts_between$DeDataType), 
                                     round(prop.table(table(uplifts_between$DeDataType)),4) * 100)), 
                 as.data.frame(cbind(table(uplifts_between$WbDimension), 
                                     round(prop.table(table(uplifts_between$WbDimension)),4) * 100)))

mod_cat_uplifts_between_es <- mod_cat_uplifts_between_es %>%
  mutate(level = "Effect size")

names(mod_cat_uplifts_between_es) <- c("*n*", "% *n*", "Level")

mod_cat_uplifts_between_es <- mod_cat_uplifts_between_es[, c("Level", "*n*", "% *n*")]

rownames(mod_cat_uplifts_between_es) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling")

kable(mod_cat_uplifts_between_es
      , caption="**Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Between-Person Association Between Daily Uplifts and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 25: Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Between-Person Association Between Daily Uplifts and SWB
Level n % n
Sample type
Convenience Effect size 139 51.48
College Effect size 129 47.78
Representative Effect size 2 0.74
Country
North America Effect size 177 75.32
Northern Europe Effect size 32 13.62
Southern Europe Effect size 3 1.28
Asia Effect size 19 8.09
Australia Effect size 4 1.70
Daily event domain
General Effect size 241 89.26
Work/Achievement Effect size 29 10.74
Social Effect size 77 28.52
Health Effect size 73 27.04
Other event Effect size 108 40.00
Daily event measurement
Checklist/questionnaire Effect size 0 0.00
Open-response Effect size 12 4.44
Interview Effect size 241 89.59
Other measure Effect size 16 5.95
Daily event data type
Dichotomous Effect size 10 3.72
Numeric count Effect size 2 0.74
Scale score Effect size 58 21.56
Other type Effect size 44 16.36
Well-being dimension
Life satisfaction Effect size 162 60.22
Domain satisfaction Effect size 5 1.86
Positive affect Effect size 28 10.37
Negative affect Effect size 11 4.07
Global well-being Effect size 119 44.07
Study design
Daily diary Effect size 109 40.37
Experience sampling Effect size 3 1.11

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Hassles & SWB

Within-Person
Continuous Moderators
mod_metric_hassles_within_es <- hassles_within %>% 
  select(Year, Female, AgeM, N, Observations, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

mod_metric_hassles_within_es <- mod_metric_hassles_within_es[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_hassles_within_es) <- c("Publication year", "% Female", "Mean age", "Sample size", "Number of observations", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_hassles_within_es) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_hassles_within_es
      , caption="**Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Within-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 26: Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Within-Person Association Between Daily Hassles and SWB
Level n M SD Min Max
Publication year Effect size 531 2018.86 6.07 1992.00 2026.00
% Female Effect size 531 65.26 19.56 0.00 100.00
Mean age Effect size 524 29.46 13.04 10.77 73.50
Sample size Effect size 531 172.87 201.12 38.00 1982.00
Number of observations Effect size 530 3322.65 8287.27 107.00 77474.00
Assessments per day Effect size 531 1.59 1.46 1.00 8.00
Total assessments Effect size 531 22.27 26.19 4.00 150.00
SWB reliability Effect size 419 0.78 0.11 0.54 0.98

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
mod_cat_hassles_within_es <- rbind(as.data.frame(cbind(table(hassles_within$SampleType), 
                                                    round(prop.table(table(hassles_within$SampleType)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$country_region), 
                                     round(prop.table(table(hassles_within$country_region)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$StudyDesign), round(prop.table(table(hassles_within$StudyDesign)),4) * 100)),
                 as.data.frame(cbind(table(hassles_within$DeDomainAll), 
                                     round(prop.table(table(hassles_within$DeDomainAll)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$TypeDeMeasure), 
                                     round(prop.table(table(hassles_within$TypeDeMeasure)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$DeDataType), 
                                     round(prop.table(table(hassles_within$DeDataType)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$WbDimension), 
                                     round(prop.table(table(hassles_within$WbDimension)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_within$CorrLag), 
                                     round(prop.table(table(hassles_within$CorrLag)),4) * 100)))

mod_cat_hassles_within_es <- mod_cat_hassles_within_es %>%
  mutate(level = "Effect size")

names(mod_cat_hassles_within_es) <- c("*n*", "% *n*", "Level")

mod_cat_hassles_within_es <- mod_cat_hassles_within_es[, c("Level", "*n*", "% *n*")]

rownames(mod_cat_hassles_within_es) <- c("Convenience", "College", "Representative", 
                                     "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                     "General", "Work/Achievement", "Social", "Health", "Other event",
                                     "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                     "Dichotomous", "Numeric count", "Scale score", "Other type",
                                     "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                     "Daily diary", "Experience sampling",
                                     "Concurrent", "Prospective")

kable(mod_cat_hassles_within_es
      , caption="**Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Within-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2,
                      "Correlation lag" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 27: Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Within-Person Association Between Daily Hassles and SWB
Level n % n
Sample type
Convenience Effect size 308 58.00
College Effect size 221 41.62
Representative Effect size 2 0.38
Country
North America Effect size 328 70.24
Northern Europe Effect size 89 19.06
Southern Europe Effect size 10 2.14
Asia Effect size 38 8.14
Australia Effect size 2 0.43
Daily event domain
General Effect size 410 77.21
Work/Achievement Effect size 121 22.79
Social Effect size 184 34.65
Health Effect size 139 26.18
Other event Effect size 159 29.94
Daily event measurement
Checklist/questionnaire Effect size 23 4.33
Open-response Effect size 26 4.90
Interview Effect size 491 92.99
Other measure Effect size 13 2.46
Daily event data type
Dichotomous Effect size 24 4.55
Numeric count Effect size 0 0.00
Scale score Effect size 115 21.66
Other type Effect size 94 17.70
Well-being dimension
Life satisfaction Effect size 322 60.64
Domain satisfaction Effect size 0 0.00
Positive affect Effect size 38 7.16
Negative affect Effect size 14 2.64
Global well-being Effect size 206 38.79
Study design
Daily diary Effect size 265 49.91
Experience sampling Effect size 8 1.51
Correlation lag
Concurrent Effect size 391 73.63
Prospective Effect size 140 26.37

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Between-Person
Continuous Moderators
mod_metric_hassles_between_es <- hassles_between %>% 
  select(Year, Female, AgeM, N, DeOccDay, DeOccTotal, WbReliability) %>% 
  describe() %>% 
  select(c(2:4, 8, 9)) %>% 
  round(2) %>%
  mutate(level = "Effect size")

mod_metric_hassles_between_es <- mod_metric_hassles_between_es[, c("level", "n", "mean", "sd", "min", "max")]

row.names(mod_metric_hassles_between_es) <- c("Publication year", "% Female", "Mean age", "Sample size", "Assessments per day", 
                                   "Total assessments", "SWB reliability")

names(mod_metric_hassles_between_es) <- c("Level", "*n*", "*M*", "*SD*", "Min", "Max")

kable(mod_metric_hassles_between_es
      , caption="**Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Between-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 28: Descriptive Statistics for Continuous Moderators at the Effect Size Level for the Between-Person Association Between Daily Hassles and SWB
Level n M SD Min Max
Publication year Effect size 627 2017.55 6.76 1991.00 2026.00
% Female Effect size 625 62.92 23.07 0.00 100.00
Mean age Effect size 616 31.17 15.90 10.77 80.30
Sample size Effect size 627 179.35 206.70 18.00 1982.00
Assessments per day Effect size 623 1.71 1.64 1.00 13.60
Total assessments Effect size 623 22.51 24.67 3.00 150.00
SWB reliability Effect size 466 0.84 0.10 0.55 0.99

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes).

Categorical Moderators
mod_cat_hassles_between_es <- rbind(as.data.frame(cbind(table(hassles_between$SampleType), 
                                                    round(prop.table(table(hassles_between$SampleType)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_between$country_region), 
                                     round(prop.table(table(hassles_between$country_region)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_between$StudyDesign), round(prop.table(table(hassles_between$StudyDesign)),4) * 100)),
                 as.data.frame(cbind(table(hassles_between$DeDomainAll), 
                                     round(prop.table(table(hassles_between$DeDomainAll)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_between$TypeDeMeasure), 
                                     round(prop.table(table(hassles_between$TypeDeMeasure)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_between$DeDataType), 
                                     round(prop.table(table(hassles_between$DeDataType)),4) * 100)), 
                 as.data.frame(cbind(table(hassles_between$WbDimension), 
                                     round(prop.table(table(hassles_between$WbDimension)),4) * 100)))

mod_cat_hassles_between_es <- mod_cat_hassles_between_es %>%
  mutate(level = "Effect size")

names(mod_cat_hassles_between_es) <- c("*n*", "% *n*", "Level")

mod_cat_hassles_between_es <- mod_cat_hassles_between_es[, c("Level", "*n*", "% *n*")]

rownames(mod_cat_hassles_between_es) <- c("Convenience", "College", "Representative", 
                                          "North America", "Northern Europe", "Southern Europe", "Asia", "Australia",
                                          "General", "Work/Achievement", "Social", "Health", "Other event",
                                          "Checklist/questionnaire", "Open-response", "Interview", "Other measure",
                                          "Dichotomous", "Numeric count", "Scale score", "Other type",
                                          "Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
                                          "Daily diary", "Experience sampling")

kable(mod_cat_hassles_between_es
      , caption="**Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Between-Person Association Between Daily Hassles and SWB**"
      , escape=FALSE
      , label = NA) %>%  
  pack_rows(index = c("Sample type" = 3, 
                      "Country" = 5, 
                      "Daily event domain" = 5,
                      "Daily event measurement" = 4, 
                      "Daily event data type" = 4, 
                      "Well-being dimension" = 5,
                      "Study design" = 2)) %>% 
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 29: Descriptive Statistics for Categorical Moderators at the Effect Size Level for the Between-Person Association Between Daily Hassles and SWB
Level n % n
Sample type
Convenience Effect size 402 64.11
College Effect size 223 35.57
Representative Effect size 2 0.32
Country
North America Effect size 375 70.62
Northern Europe Effect size 83 15.63
Southern Europe Effect size 8 1.51
Asia Effect size 48 9.04
Australia Effect size 17 3.20
Daily event domain
General Effect size 484 77.19
Work/Achievement Effect size 143 22.81
Social Effect size 276 44.02
Health Effect size 96 15.31
Other event Effect size 182 29.03
Daily event measurement
Checklist/questionnaire Effect size 35 5.58
Open-response Effect size 38 6.06
Interview Effect size 565 90.84
Other measure Effect size 33 5.31
Daily event data type
Dichotomous Effect size 20 3.22
Numeric count Effect size 4 0.64
Scale score Effect size 151 24.08
Other type Effect size 128 20.41
Well-being dimension
Life satisfaction Effect size 343 54.70
Domain satisfaction Effect size 5 0.80
Positive affect Effect size 33 5.26
Negative affect Effect size 20 3.19
Global well-being Effect size 247 39.39
Study design
Daily diary Effect size 314 50.08
Experience sampling Effect size 13 2.07

Note. n denotes the number of units at the respective level (studies, samples, or effect sizes). % n indicate the proportion of units within the corresponding level assigned to each moderator category.

Section 3: Meta-Analysis

Meta-Analytic Correlation Table

# Define Function for Meta-Analytic Model

run_ma <- function(data, SamV) {
  
  # Multi-level meta-analytic model
  
  model <- rma.mv(
    yi = ES,
    V = SamV,
    random = list(
      ~ 1 | EffSizeID,
      ~ 1 | StudyID
    ),
    data = data
  )
  
  # Cluster-robust standard errors
  
  robust_model <- robust(
    model,
    cluster = StudyID,
    clubSandwich = TRUE
  )
  
  list(
    model = model,
    robust = robust_model
  )
}

# Define Function for Back-Transformation
back_transform <- function(data) {

  rob <- data$robust
  
  data.frame(
    r = fisherz2r(rob$b[1]),
    z = rob$zval[1],
    p = rob$pval[1],
    ci.lb = fisherz2r(rob$ci.lb[1]),
    ci.ub = fisherz2r(rob$ci.ub[1]),
    ES = rob$k.eff
  )
}

# Define Function for Computation of I2

calc_i2 <- function(model, SamV) {

  X <- model$X

  W <- solve(SamV[model$not.na, model$not.na])

  P <- W -
    W %*% X %*%
    solve(t(X) %*% W %*% X) %*%
    t(X) %*% W
  
  k <- model$k
  
  p <- ncol(X)

  vbar <- (k - p) / sum(diag(P))

  sigma1 <- model$sigma2[1]
  sigma2   <- model$sigma2[2]

  I2_L1 <- 100 * sigma1 /
    (sigma1 + sigma2 + vbar)

  I2_L2 <- 100 * sigma2 /
    (sigma1 + sigma2 + vbar)

  data.frame(
    I2_Level1 = I2_L1,
    I2_Level2 = I2_L2,
    I2_Total = I2_L1 + I2_L2
  )
}

# Uplifts

## Within-Person Associations

### Fisher z-Transformation 

uplifts_within$ES <- escalc(measure = "ZCOR", ri = uplifts_within$CorrCoeff,ni = uplifts_within$Observations)$yi
uplifts_within$SamVar <- escalc(measure = "ZCOR", ri = uplifts_within$CorrCoeff,ni = uplifts_within$Observations)$vi

### Create Effect Size ID

uplifts_within$EffSizeID <- 1:nrow(uplifts_within)

### Compute Sampling-Variance/Covariance Matrix

uplifts_within$CorrLagID <- ifelse(uplifts_within$CorrLag == "prospective", 1, 0)

V_uplifts_within <- vcalc(
  SamVar,
  cluster = StudyID,
  subgroup = SampleID,
  obs = DeID,
  type = WbID,
  time1 = CorrLagID,
  rho = c(0.3, 0.4), # Based on correlations from previous research
  phi = 0.55, # Based on auto-correlations in existing intensive longitudinal studies
  data = uplifts_within
)

### Meta-Analysis

ma_uplifts_within <- run_ma(uplifts_within, V_uplifts_within)

sigma1_uplifts_within <- ma_uplifts_within[["model"]]$sigma2[1]
sigma2_uplifts_within <- ma_uplifts_within[["model"]]$sigma2[2]

results_ma_uplifts_within <- cbind(
  back_transform(ma_uplifts_within),
  calc_i2(ma_uplifts_within$model, V_uplifts_within)
)

## Between-Person Associations

### Fisher z-Transformation

uplifts_between$ES <- escalc(measure = "ZCOR", ri = uplifts_between$CorrCoeff,ni = uplifts_between$N)$yi
uplifts_between$SamVar <- escalc(measure = "ZCOR", ri = uplifts_between$CorrCoeff,ni = uplifts_between$N)$vi

### Create Effect Size ID

uplifts_between$EffSizeID <- 1:nrow(uplifts_between)

### Compute Sampling Variance/Covariance Matrix (Uplifts & SWB: Between-Person Associations)

V_uplifts_between <- vcalc(
  SamVar,
  cluster = StudyID,
  subgroup = SampleID,
  obs = DeID,
  type = WbID,
  rho = c(0.5, 0.4),
  data = uplifts_between
)

### Meta-Analysis

ma_uplifts_between <- run_ma(uplifts_between, V_uplifts_between)

sigma1_uplifts_between <- ma_uplifts_between[["model"]]$sigma2[1]
sigma2_uplifts_between <- ma_uplifts_between[["model"]]$sigma2[2]

results_ma_uplifts_between <- cbind(
  back_transform(ma_uplifts_between),
  calc_i2(ma_uplifts_between$model, V_uplifts_between)
)

# Hassles

## Within-Person Associations

### Fisher z-Transformation

hassles_within$ES <- escalc(measure = "ZCOR", ri = hassles_within$CorrCoeff,ni = hassles_within$Observations)$yi
hassles_within$SamVar <- escalc(measure = "ZCOR", ri = hassles_within$CorrCoeff,ni = hassles_within$Observations)$vi

### Create Effect Size ID

hassles_within$EffSizeID <- 1:nrow(hassles_within)

### Compute Sampling-Variance/Covariance Matrix

hassles_within$CorrLagID <- ifelse(hassles_within$CorrLag == "prospective", 1, 0)

V_hassles_within <- vcalc(
  SamVar,
  cluster = StudyID,
  subgroup = SampleID,
  obs = DeID,
  type = WbID,
   time1 = CorrLagID,
  rho = c(0.35, 0.4), # Based on correlations from previous research
    phi = 0.55, # Based on auto-correlations in existing intensive longitudinal studies
  data = hassles_within
)

### Meta-Analysis

ma_hassles_within <- run_ma(hassles_within, V_hassles_within)

sigma1_hassles_between <- ma_hassles_within[["model"]]$sigma2[1]
sigma2_hassles_between <- ma_hassles_within[["model"]]$sigma2[2]

results_ma_hassles_within <- cbind(
  back_transform(ma_hassles_within),
  calc_i2(ma_hassles_within$model, V_hassles_within)
)
## Between-Person Associations

### Fisher z-Transformation

hassles_between$ES <- escalc(measure = "ZCOR", ri = hassles_between$CorrCoeff,ni = hassles_between$N)$yi
hassles_between$SamVar <- escalc(measure = "ZCOR", ri = hassles_between$CorrCoeff,ni = hassles_between$N)$vi

### Create Effect Size ID

hassles_between$EffSizeID <- 1:nrow(hassles_between)

### Compute Sampling-Variance/Covariance Matrix

V_hassles_between <- vcalc(
  SamVar,
  cluster = StudyID,
  subgroup = SampleID,
  obs = DeID,
  type = WbID,
  rho = c(0.5, 0.4),
  data = hassles_between
  )

### Meta-Analysis

ma_hassles_between <- run_ma(hassles_between, V_hassles_between)

sigma1_hassles_between <- ma_hassles_between[["model"]]$sigma2[1]
sigma2_hassles_between <- ma_hassles_between[["model"]]$sigma2[2]

results_ma_hassles_between <- cbind(
  back_transform(ma_hassles_between),
  calc_i2(ma_hassles_between$model, V_hassles_between)
)

# Create table

table_results_uplifts <- rbind(results_ma_uplifts_within, results_ma_uplifts_between) %>%
  as.data.frame(row.names = c("Within-person", "Between-person")) %>%
  round(3) %>%
  mutate('CI (95%)' = paste0("[", ci.lb, ", ", ci.ub, "]")) %>%
  select(ES, r, z, p, 'CI (95%)', I2_Level1, I2_Level2, I2_Total, -ci.lb, -ci.ub) %>%
  setNames(c("ES", "*r*", "*t*", "*p*", "CI (95%)", "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~"))

table_results_hassles <- rbind(results_ma_hassles_within, results_ma_hassles_between) %>%
  as.data.frame(row.names = c("Within-Person", "Between-Person")) %>%
  round(3) %>%
  mutate('CI (95%)' = paste0("[", ci.lb, ", ", ci.ub, "]")) %>%
  select(ES, r, z, p, 'CI (95%)', I2_Level1, I2_Level2, I2_Total, -ci.lb, -ci.ub) %>%
  setNames(c("ES", "*r*", "*t*", "*p*", "CI (95%)", "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~"))

table_results <- cbind(table_results_uplifts, table_results_hassles)

kable(
  table_results,
  caption = "**Meta-Analytic Correlations for the Associations of Daily Uplifts and Daily Hassles with SWB**",
  digits = 3,
  escape = FALSE,
  label = NA
  ) %>%
  kable_styling(
    bootstrap_options = c("striped", "hover", "condensed"),
    fixed_thead = TRUE,
    full_width = TRUE,
    position = "left"
  ) %>%
  add_header_above(c(" " = 1, "Daily uplifts" = 8, "Daily hassles" = 8))
Table 30: Meta-Analytic Correlations for the Associations of Daily Uplifts and Daily Hassles with SWB
Daily uplifts
Daily hassles
ES r t p CI (95%) I2Level1 I2Level2 I2Total ES r t p CI (95%) I2Level1 I2Level2 I2Total
Within-person 304 0.160 9.517 0 [0.127, 0.193] 79.414 19.894 99.308 530 -0.183 -19.962 0 [-0.201, -0.165] 87.177 12.001 99.178
Between-person 270 0.209 13.726 0 [0.179, 0.239] 93.501 0.000 93.501 627 -0.279 -25.719 0 [-0.299, -0.259] 86.299 5.616 91.915

Meta-Analytic Correlation Plot

plot_data <- rbind(
  results_ma_uplifts_within,
  results_ma_uplifts_between,
  results_ma_hassles_within,
  results_ma_hassles_between) %>%
  select(-z, -p) %>%
  mutate(
    dedimension = c("Daily uplifts", "Daily uplifts", "Daily hassles", "Daily hassles"),
    corrlevel = c("Within-person", "Between-person", "Within-person", "Between-person")
  ) %>%
  mutate(
    across(c(r, ci.lb, ci.ub, ES), as.numeric)
  )

main_plot <- ggplot(
  plot_data,
  aes(
    x = r,
    y = corrlevel,
    color = dedimension,
    shape = dedimension
  )
) +
  geom_vline(
    xintercept = 0,
    color = "grey60"
  ) +
  geom_errorbarh(
    aes(xmin = ci.lb, xmax = ci.ub),
    height = 0.2,
    linewidth = 0.8,
    position = position_dodge(width = 0.4)
  ) +
  geom_point_interactive(
    aes(
      x = r,
      y = corrlevel,
      tooltip = paste0(
        "<b>Daily ", dedimension, " & SWB</b>", " (", corrlevel, ")",
        "<br>r = ", round(r, 3),
        "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
        "<br>ES = ", ES
       )
    ),
    position = position_dodge(width = 0.4)
  ) +
  scale_color_manual(
    values = c(
      "Daily hassles" = "#4E8A8A",
      "Daily uplifts" = "#5C1f95"
    )
  ) +
scale_shape_manual(
  name = NULL,
  values = c(
    "Daily uplifts" = 17,
    "Daily hassles" = 16
    )
  ) +
  theme_apa(base_size = 16) +
  labs(
    title = "Meta-Analytic Correlations Between Daily Events and SWB",
    x = "Correlation (r)",
    y = NULL,
    color = NULL
  ) +
  theme(
    plot.title = element_text(
      size = 16,
      face = "bold",
      hjust = 0.5
    ),
    legend.position = "top",
    legend.text = element_text(size = 16),
    axis.text.y = element_text(color = "black"),
    axis.text.x = element_text(color = "black"),
    panel.grid.major.y = element_blank(),
    panel.grid.minor = element_blank()
  ) +
  scale_x_continuous(
    limits = c(-0.3, 0.3),
    breaks = c(-0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3)
  )


girafe(
  ggobj = main_plot,
  width_svg = 8,
  height_svg = 4,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information on the corresponding meta-analytic correlation.

Within- vs. Between-Person Correlations

# Create combind dataset for uplifts

uplifts_between$CorrLagID <- 0

uplifts <- bind_rows(
  uplifts_within,
  uplifts_between
) %>%
  mutate(
    EffSizeID = row_number(),
    DeID_CorrType = interaction(DeID, CorrType, drop = TRUE)
  )

# Variance-covariance matrix for uplifts
V_uplifts <- vcalc(
  SamVar,
  cluster  = StudyID,
  subgroup = SampleID,
  obs      = DeID_CorrType,
  type     = WbID,
  time1    = CorrLagID,
  rho      = c(0.4, 0.4),
  phi      = 0.55,
  data     = uplifts
)

# Meta-analytic moderation model
mod_uplifts <- rma.mv(
  yi = ES,
  V = V_uplifts,
  mods = ~ CorrType,
  random = list(
    ~ 1 | EffSizeID,
    ~ 1 | StudyID
  ),
  data = uplifts,
  sparse = TRUE
)

# Cluster-robust results
robust_uplifts <- robust(
  mod_uplifts,
  cluster = uplifts$StudyID,
  clubSandwich = TRUE
)

# Null model for R2
rows_uplifts <- mod_uplifts$not.na

null_uplifts <- rma.mv(
  yi = ES,
  V = V_uplifts[rows_uplifts, rows_uplifts],
  random = list(
    ~ 1 | EffSizeID,
    ~ 1 | StudyID
  ),
  data = uplifts[rows_uplifts, ],
  sparse = TRUE
)

# Variance components
tau1_null <- null_uplifts$sigma2[1]
tau2_null <- null_uplifts$sigma2[2]

tau1_mod <- mod_uplifts$sigma2[1]
tau2_mod <- mod_uplifts$sigma2[2]

# R2
R2_uplifts <- c(
  R2_Level1 = 100 * (tau1_null - tau1_mod) / tau1_null,
  R2_Level2 = 100 * (tau2_null - tau2_mod) / tau2_null,
  R2_Total  = 100 * (
    (tau1_null + tau2_null) -
    (tau1_mod + tau2_mod)
  ) / (tau1_null + tau2_null)
)

# Extract CorrType coefficient
uplifts_result <- data.frame(
  ES = nrow(uplifts),
  b = robust_uplifts$b[2],
  SE = robust_uplifts$se[2],
  t = robust_uplifts$zval[2],
  p = robust_uplifts$pval[2],
  tau2_Level1 = tau1_mod,
  tau2_Level2 = tau2_mod,
  R2_Level1 = R2_uplifts["R2_Level1"],
  R2_Level2 = R2_uplifts["R2_Level2"],
  R2_Total = R2_uplifts["R2_Total"]
)

# Create combined dataset for hassles

hassles_between$CorrLagID <- 0

hassles <- bind_rows(
  hassles_within,
  hassles_between
) %>%
  mutate(
    EffSizeID = row_number(),
    DeID_CorrType = interaction(DeID, CorrType, drop = TRUE)
  )

# Variance-covariance matrix
V_hassles <- vcalc(
  SamVar,
  cluster  = StudyID,
  subgroup = SampleID,
  obs      = DeID_CorrType,
  type     = WbID,
  time1    = CorrLagID,
  rho      = c(0.4, 0.4),
  phi      = 0.55,
  data     = hassles
)

# Meta-analytic moderation model
mod_hassles <- rma.mv(
  yi = ES,
  V = V_hassles,
  mods = ~ CorrType,
  random = list(
    ~ 1 | EffSizeID,
    ~ 1 | StudyID
  ),
  data = hassles,
  sparse = TRUE
)

# Cluster-robust results
robust_hassles <- robust(
  mod_hassles,
  cluster = hassles$StudyID,
  clubSandwich = TRUE
)

# Null model for R2
rows_hassles <- mod_hassles$not.na

null_hassles <- rma.mv(
  yi = ES,
  V = V_hassles[rows_hassles, rows_hassles],
  random = list(
    ~ 1 | EffSizeID,
    ~ 1 | StudyID
  ),
  data = hassles[rows_hassles, ],
  sparse = TRUE
)

# Variance components
tau1_null <- null_hassles$sigma2[1]
tau2_null <- null_hassles$sigma2[2]

tau1_mod <- mod_hassles$sigma2[1]
tau2_mod <- mod_hassles$sigma2[2]

# R2
R2_hassles <- c(
  R2_Level1 = 100 * (tau1_null - tau1_mod) / tau1_null,
  R2_Level2 = 100 * (tau2_null - tau2_mod) / tau2_null,
  R2_Total  = 100 * (
    (tau1_null + tau2_null) -
    (tau1_mod + tau2_mod)
  ) / (tau1_null + tau2_null)
)

# Extract CorrType coefficient
hassles_result <- data.frame(
  ES = nrow(hassles),
  b = robust_hassles$b[2],
  SE = robust_hassles$se[2],
  t = robust_hassles$zval[2],
  p = robust_hassles$pval[2],
  tau2_Level1 = tau1_mod,
  tau2_Level2 = tau2_mod,
  R2_Level1 = R2_hassles["R2_Level1"],
  R2_Level2 = R2_hassles["R2_Level2"],
  R2_Total = R2_hassles["R2_Total"]
)

# Assuming calc_i2() is your existing function
i2_uplifts <- calc_i2(mod_uplifts, V_uplifts)
i2_hassles <- calc_i2(mod_hassles, V_hassles)

uplifts_result <- cbind(uplifts_result, i2_uplifts)
hassles_result <- cbind(hassles_result, i2_hassles)

# Combine results

within_between_diff <- bind_rows(
  uplifts_result,
  hassles_result
) %>%
  select(
    ES, b, SE, t, p,
    tau2_Level1,
    tau2_Level2,
    everything()
  )

# Replace negative R2 values with zero
within_between_diff <- within_between_diff %>%
  mutate(
    R2_Level1 = pmax(R2_Level1, 0),
    R2_Level2 = pmax(R2_Level2, 0),
    R2_Total  = pmax(R2_Total, 0)
)

# Rename columns
names(within_between_diff) <- c(
  "ES",
  "*b*",
  "*SE*",
  "*t*",
  "*p*",
  "τ^2^~Level1~",
  "τ^2^~Level2~",
  "*I*^2^~Level1~",
  "*I*^2^~Level2~",
  "*I*^2^~Total~",
  "R^2^~Level1~",
  "R^2^~Level2~",
  "R^2^~Total~"
)

rownames(within_between_diff) <- c(
  "Within-person",
  "Within-person "
)

# Create table

kable(
  round(within_between_diff, 3),
  caption = "**Within- vs. Between-Person Associations Between Daily Events and SWB**",
  escape = FALSE,
  label = NA,
  digits = 3
) %>%
  pack_rows("Daily uplifts", 1, 1) %>%
  pack_rows("Daily hassles", 2, 2) %>%
  column_spec(
    3:6,
    bold = ifelse(within_between_diff[, 5] < 0.05, TRUE, FALSE)
  ) %>%
  kable_styling(
    bootstrap_options = c("striped", "hover", "condensed"),
    fixed_thead = TRUE,
    full_width = TRUE,
    position = "left"
  )
Table 31: Within- vs. Between-Person Associations Between Daily Events and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Daily uplifts
Within-person 575 -0.068 0.014 -4.983 0 0.038 0.008 1.798 3.964 2.173 82.297 16.845 99.143
Daily hassles
Within-person 1158 0.109 0.011 9.540 0 0.031 0.004 6.538 14.399 7.553 87.093 11.827 98.919

Note. Between-person correlations serve as the reference category. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details).

Section 4: Moderator Analyses

# Preparation Steps

## Recode/Drop Moderator-Categories With Less Than 5 Observations for Within-Person Uplifts & SWB Associations

levels(uplifts_within$SampleType)[
  levels(uplifts_within$SampleType) == "representative"
] <- "convenience"
uplifts_within$SampleType <- droplevels(uplifts_within$SampleType)
uplifts_within$SampleType <- relevel(uplifts_within$SampleType, ref = "convenience")

uplifts_within <- uplifts_within %>%
  mutate(
    country_region = replace(
      country_region,
      country_region %in% c("Southern Europe", "Australia"),
      NA
    )
  ) %>%
  mutate(
    DeDataType = replace(
      DeDataType,
      DeDataType == "other",
      NA
    )
  ) %>%
  mutate(
    WbDimension = replace(
      WbDimension,
      WbDimension == "global_well-being",
      NA
    )
  ) %>%
  mutate(
    country_region = droplevels(country_region),
    DeDomainAll = droplevels(DeDomainAll),
    TypeDeMeasure = droplevels(TypeDeMeasure),
    DeDataType = droplevels(DeDataType),
    WbDimension = droplevels(WbDimension)
  )

## Recode Moderator-Categories With Less Than 5 Observations for Between-Person Uplifts & SWB Associations

levels(uplifts_between$SampleType)[
  levels(uplifts_between$SampleType) == "representative"
] <- "convenience"
uplifts_between$SampleType <- droplevels(uplifts_between$SampleType)
uplifts_between$SampleType <- relevel(uplifts_between$SampleType, ref = "convenience")

uplifts_between <- uplifts_between %>%
  mutate(
    country_region = replace(
      country_region,
      country_region %in% c("Southern Europe", "Australia"),
      NA
    )
  ) %>%
  mutate(
    TypeDeMeasure = replace(
      TypeDeMeasure,
      TypeDeMeasure == "other",
      NA
    )
  ) %>%
  mutate(
    WbDimension = replace(
      WbDimension,
      WbDimension == "global_well-being",
      NA
    )
  ) %>%
  mutate(
    country_region = droplevels(country_region),
    DeDomainAll = droplevels(DeDomainAll),
    TypeDeMeasure = droplevels(TypeDeMeasure),
    WbDimension = droplevels(WbDimension)
  )

## Recode Moderator-Categories With Less Than 5 Observations for Within-Person Hassles & SWB Associations

levels(hassles_within$SampleType)[
  levels(hassles_within$SampleType) == "representative"
] <- "convenience"
hassles_within$SampleType <- droplevels(hassles_within$SampleType)
hassles_within$SampleType <- relevel(hassles_within$SampleType, ref = "convenience")

hassles_within <- hassles_within %>%
  mutate(
    country_region = replace(
      country_region,
      country_region == "Australia",
      NA
    )
  ) %>%
  mutate(
    country_region = droplevels(country_region),
    TypeDeMeasure = droplevels(TypeDeMeasure),
    DeDataType = droplevels(DeDataType)
  )

## Recode Moderator-Categories With Less Than 5 Observations for Between-Person Hassles & SWB Associations

levels(hassles_between$SampleType)[
  levels(hassles_between$SampleType) == "representative"
] <- "convenience"
hassles_between$SampleType <- droplevels(hassles_between$SampleType)
hassles_between$SampleType <- relevel(hassles_between$SampleType, ref = "convenience")

hassles_between <- hassles_between %>%
  mutate(
    TypeDeMeasure = replace(
      TypeDeMeasure,
      TypeDeMeasure == "other",
      NA
    )
  ) %>%
  mutate(
    TypeDeMeasure = droplevels(TypeDeMeasure),
  )

# Center Metric Moderators

## Percentage of females in a sample

uplifts_within <- uplifts_within %>%
  mutate(Female_c = scale(Female, center = TRUE, scale = FALSE))

uplifts_between <- uplifts_between %>%
  mutate(Female_c = scale(Female, center = TRUE, scale = FALSE))

hassles_within <- hassles_within %>%
  mutate(Female_c = scale(Female, center = TRUE, scale = FALSE))

hassles_between <- hassles_between %>%
  mutate(Female_c = scale(Female, center = TRUE, scale = FALSE))

## Mean age

uplifts_within <- uplifts_within %>%
  mutate(AgeM_c = scale(AgeM, center = TRUE, scale = FALSE))

uplifts_between <- uplifts_between %>%
  mutate(AgeM_c = scale(AgeM, center = TRUE, scale = FALSE))

hassles_within <- hassles_within %>%
  mutate(AgeM_c = scale(AgeM, center = TRUE, scale = FALSE))

hassles_between <- hassles_between %>%
  mutate(AgeM_c = scale(AgeM, center = TRUE, scale = FALSE))

## Publication year

uplifts_within <- uplifts_within %>%
  mutate(Year_c = scale(Year, center = TRUE, scale = FALSE))

uplifts_between <- uplifts_between %>%
  mutate(Year_c = scale(Year, center = TRUE, scale = FALSE))

hassles_within <- hassles_within %>%
  mutate(Year_c = scale(Year, center = TRUE, scale = FALSE))

hassles_between <- hassles_between %>%
  mutate(Year_c = scale(Year, center = TRUE, scale = FALSE))

## SWB Reliability (Center)

uplifts_within <- uplifts_within %>%
  mutate(WbReliability_c = scale(WbReliability, center = TRUE, scale = FALSE))

uplifts_between <- uplifts_between %>%
  mutate(WbReliability_c = scale(WbReliability, center = TRUE, scale = FALSE))

hassles_within <- hassles_within %>%
  mutate(WbReliability_c = scale(WbReliability, center = TRUE, scale = FALSE))

hassles_between <- hassles_between %>%
  mutate(WbReliability_c = scale(WbReliability, center = TRUE, scale = FALSE))

# Define Function for Meta-Analytic Model Including Moderators

run_ma_mod <- function(mod, data, SamV) {
  
  formula <- as.formula(paste("~", mod))
  
  ma_mod <- rma.mv(
    yi = ES,
    V = SamV,
    mods = formula,
    random = list(~ 1 | EffSizeID,
                  ~ 1 | StudyID),
    data = data,
    sparse = TRUE
  )
  
  robust_ma_mod <- robust(ma_mod, cluster = data$StudyID, clubSandwich = TRUE)
  
  list(
    model = ma_mod,
    robust = robust_ma_mod
  )
}

# Define Function for the Computation of R2

calc_r2 <- function(model, data, SamV) {
  
  rows_used <- model$not.na
  
  null_model <- rma.mv(
    yi = ES,
    V = SamV[rows_used, rows_used],
    random = list(
      ~ 1 | EffSizeID,
      ~ 1 | StudyID
    ),
    data = data[rows_used, ],
    sparse = TRUE
  )

  tau1_null <- null_model$sigma2[1]
  tau2_null <- null_model$sigma2[2]

  tau1_mod <- model$sigma2[1]
  tau2_mod <- model$sigma2[2]

  R2_L1 <- 100 * (tau1_null - tau1_mod) / tau1_null
  
  R2_L2 <- 100 * (tau2_null - tau2_mod) / tau2_null

  R2_Total <- 100 *
    ((tau1_null + tau2_null) -
       (tau1_mod + tau2_mod)) /
    (tau1_null + tau2_null)

  data.frame(
    R2_Level1 = R2_L1,
    R2_Level2 = R2_L2,
    R2_Total = R2_Total
  )
}

# Define Function to Extract Results from Moderation Analysis

extract_mod_results <- function(x, data, SamV) {
  
  i2 <- calc_i2(x$model, SamV)
  
  r2 <- calc_r2(
    model = x$model,
    data = data,
    SamV = SamV
  )
  
  coef_df <- data.frame(
    term = rownames(x$robust$b),
    b    = x$robust$b,
    se   = x$robust$se,
    z    = x$robust$zval,
    p    = x$robust$pval,
    ci.lb = x$robust$ci.lb,
    ci.ub = x$robust$ci.ub
  )
  
  coef_df <- subset(coef_df, term != "intrcpt")

  cbind(
    k = x$model$k,
    coef_df,
    sigma1 = x$model$sigma2[1],
    sigma2 = x$model$sigma2[2],
    i2,
    r2
  )
}

Single-Moderator Models

Uplifts & SWB

Within-Person Associations

Regression Coefficient Table
# Sample Characteristics

sample_mods <- c("Female_c", "SampleType", "AgeM_c", "country_region")

sample_mod_uplifts_within <- setNames(
  lapply(
    sample_mods,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  sample_mods
)

sample_mod_results_uplifts_within <- lapply(
  sample_mod_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

# Publication Characteristics

pub_mods <- c("Year_c")

pub_mod_uplifts_within <- setNames(
  lapply(
    pub_mods,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  pub_mods
)

pub_mod_results_uplifts_within <- lapply(
  pub_mod_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

# Study-Design Characteristics

design_mods <- c("StudyDesign")

design_mod_uplifts_within <- setNames(
  lapply(
    design_mods,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  design_mods
)

design_mod_results_uplifts_within <- lapply(
  design_mod_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

# Assessment Characteristics

assess_mods <- c("DeDomainAll", "TypeDeMeasure", "DeDataType", 
                 "WbDimension", "WbReliability_c")

assess_mod_uplifts_within <- setNames(
  lapply(
    assess_mods,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  assess_mods
)

assess_mod_results_uplifts_within <- lapply(
  assess_mod_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

# Correlation Characteristics

corr_mods <- c("CorrLag")

corr_mod_uplifts_within <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  corr_mods
)

corr_mod_results_uplifts_within <- lapply(
  corr_mod_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

# Create table

mod_uplifts_within_metric <- rbind(
  sample_mod_results_uplifts_within, 
  pub_mod_results_uplifts_within,
  design_mod_results_uplifts_within,
  assess_mod_results_uplifts_within,
  corr_mod_results_uplifts_within) %>%
  filter(
    moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_uplifts_within_categorical <- rbind(
  sample_mod_results_uplifts_within, 
  pub_mod_results_uplifts_within,
  design_mod_results_uplifts_within,
  assess_mod_results_uplifts_within,
  corr_mod_results_uplifts_within) %>%
  filter(
    !moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_uplifts_within <- rbind(
  mod_uplifts_within_metric,
  mod_uplifts_within_categorical
) %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

mod_uplifts_within$R2_Level1 <- ifelse(mod_uplifts_within$R2_Level1 < 0, 0, mod_uplifts_within$R2_Level1)
mod_uplifts_within$R2_Level2 <- ifelse(mod_uplifts_within$R2_Level2 < 0, 0, mod_uplifts_within$R2_Level2)
mod_uplifts_within$R2_Total <- ifelse(mod_uplifts_within$R2_Total < 0, 0, mod_uplifts_within$R2_Total)

names(mod_uplifts_within) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(mod_uplifts_within) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                   "College", "Northern Europe", "Asia",
                                   "ESM", "Work/Achievement", "Social",
                                   "Other event", "Open-response", "Interview", "Numeric count",
                                   "Scale score", "Domain satisfaction", "Positive affect", "Negative affect",
                                   "Prospective")

order_mod_uplifts_within <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe","Asia",
  "Work/Achievement", "Social", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Domain satisfaction", "Positive affect", "Negative affect",
  "SWB reliability",
  "ESM",
  "Prospective"
)

mod_uplifts_within <- mod_uplifts_within[order_mod_uplifts_within, ]

kable(round(mod_uplifts_within, 3),
      caption = "**Results of Single-Moderator Analyses for the Within-Person Association Between Daily Uplifts and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 6) %>%
  pack_rows("Daily event type", 7, 9) %>%
  pack_rows("Daily event measurement", 10, 11) %>%
  pack_rows("Daily event data type", 12, 13) %>%
  pack_rows("SWB dimension", 14, 16) %>%
  column_spec(c(3:6), bold = ifelse(mod_uplifts_within[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 32: Results of Single-Moderator Analyses for the Within-Person Association Between Daily Uplifts and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 304 0.002 0.002 1.006 0.347 0.026 0.007 77.811 21.504 99.314 0.718 0.000 0.000
College 304 -0.005 0.029 -0.168 0.868 0.027 0.007 77.539 21.782 99.321 0.543 0.000 0.000
% Female 304 0.000 0.000 0.666 0.534 0.027 0.007 79.423 19.887 99.310 0.000 0.000 0.000
Mean age 300 0.000 0.001 0.097 0.924 0.027 0.008 76.792 22.536 99.329 0.297 0.000 0.000
Region
Northern Europe 278 0.065 0.043 1.506 0.185 0.023 0.000 97.038 2.007 99.045 2.496 0.000 0.479
Asia 278 -0.002 0.018 -0.092 0.941 0.023 0.000 97.038 2.007 99.045 2.496 0.000 0.479
Daily event type
Work/Achievement 304 -0.091 0.038 -2.397 0.024 0.024 0.013 63.714 35.659 99.373 11.746 0.000 0.000
Social 304 0.014 0.037 0.387 0.702 0.024 0.013 63.714 35.659 99.373 11.746 0.000 0.000
Other event 304 -0.112 0.024 -4.721 0.103 0.024 0.013 63.714 35.659 99.373 11.746 0.000 0.000
Daily event measurement
Open-response 304 0.049 0.106 0.461 0.673 0.027 0.006 81.318 17.977 99.295 0.000 11.373 1.931
Interview 304 -0.097 0.026 -3.687 0.031 0.027 0.006 81.318 17.977 99.295 0.000 11.373 1.931
Daily event data type
Numeric count 301 0.078 0.033 2.347 0.040 0.027 0.000 99.153 0.000 99.153 2.904 59.143 2.904
Scale score 301 0.078 0.019 4.022 0.001 0.027 0.000 99.153 0.000 99.153 2.904 59.143 2.904
SWB dimension
Domain satisfaction 300 0.023 0.057 0.415 0.693 0.023 0.008 73.618 25.634 99.252 13.326 0.000 8.107
Positive affect 300 0.068 0.041 1.654 0.162 0.023 0.008 73.618 25.634 99.252 13.326 0.000 8.107
Negative affect 300 -0.058 0.040 -1.430 0.215 0.023 0.008 73.618 25.634 99.252 13.326 0.000 8.107
SWB reliability 251 0.366 0.120 3.061 0.011 0.028 0.008 76.138 22.886 99.024 13.160 0.000 0.000
ESM 304 0.026 0.047 0.554 0.594 0.027 0.007 78.195 21.115 99.310 0.353 0.000 0.000
Prospective 304 -0.175 0.011 -15.454 0.000 0.019 0.010 64.106 35.088 99.194 28.408 0.000 11.414

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
mod_uplifts_within_plot <- rbind(
  mod_uplifts_within_metric,
  mod_uplifts_within_categorical
)

table_extract_mod_uplifts_within <- mod_uplifts_within_plot %>%
  select(b, ci.lb, ci.ub) %>%
  mutate(across(everything(), ~ round(.x, 2)))

mod_uplifts_within_plot$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                      "College", "Northern Europe", "Asia", "ESM", "Work/Achievement", "Social",
                                      "Other event", "Open-response", "Interview", "Numeric count",
                                      "Scale score", "Domain satisfaction", "Positive affect", "Negative affect",
                                      "Prospective")

mod_uplifts_within_plot <- mod_uplifts_within_plot %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Asia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel == "Prospective" ~ "Correlation lag",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

order_modcat_within <- c("Publication year",
                        "Sample type", 
                        "% Female", 
                        "Mean age", 
                        "Region", 
                        "Daily event type", 
                        "Daily event measurement", 
                        "Daily event data type", 
                        "SWB dimension", 
                        "SWB reliability",
                        "Study design", 
                        "Correlation lag")

mod_uplifts_within_plot <- mod_uplifts_within_plot %>%
  mutate(modcat = factor(modcat, levels = order_modcat_within)) %>%
  arrange(modcat)

mod_uplifts_within_plot$modcat <- factor(
  mod_uplifts_within_plot$modcat,
  levels = rev(unique(mod_uplifts_within_plot$modcat))
)

mod_uplifts_within_plot <- mod_uplifts_within_plot %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_mod_uplifts_within)))

# Compute x-axis limits
x_min <- min(mod_uplifts_within_plot$ci.lb)
x_max <- max(mod_uplifts_within_plot$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = mod_uplifts_within_plot,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.ub, 3), ", ", round(ci.lb, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  geom_text(
  data = subset(mod_uplifts_within_plot, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Predicted Correlations Plot
## Publication year

sd_year_uplifts_within <- sd(uplifts_within$Year_c, na.rm = TRUE)

pred_year_uplifts_within <- predict(
  pub_mod_uplifts_within$Year_c$robust,
  newmods = c(-sd_year_uplifts_within, 0, sd_year_uplifts_within)
)

df_pred_year_uplifts_within <- transform(
  as.data.frame(pred_year_uplifts_within),
  moderator = "Publication year",
  label = c(
    round(mean(uplifts_within$Year, na.rm = TRUE) - sd_year_uplifts_within, 2),
    round(mean(uplifts_within$Year, na.rm = TRUE), 2),
    round(mean(uplifts_within$Year, na.rm = TRUE) + sd_year_uplifts_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = pub_mod_uplifts_within$Year_c$robust$k
)

## Sample type

sampletype_cats_uplifts_within <- data.frame(
  SampleType = factor(
    c("convenience", "college"),
    levels = c("convenience", "college")
  )
)

sampletype_mods_uplifts_within <-
  model.matrix(~ SampleType, sampletype_cats_uplifts_within)[, -1]

pred_sampletype_uplifts_within <- predict(
  sample_mod_uplifts_within$SampleType$robust,
  newmods = sampletype_mods_uplifts_within
)

df_pred_sampletype_uplifts_within <- transform(
  as.data.frame(pred_sampletype_uplifts_within),
  moderator = "Sample type",
  label = c("Convenience", "College"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_within$SampleType$robust$k
)

## Percentage female

sd_female_uplifts_within <- sd(uplifts_within$Female_c, na.rm = TRUE)

pred_female_uplifts_within <- predict(
  sample_mod_uplifts_within$Female_c$robust,
  newmods = c(-sd_female_uplifts_within, 0, sd_female_uplifts_within)
)

df_pred_female_uplifts_within <- transform(
  as.data.frame(pred_female_uplifts_within),
  moderator = "% Female",
  label = c(
    paste0(round(mean(uplifts_within$Female, na.rm = TRUE) - sd_female_uplifts_within, 2), "%"),
    paste0(round(mean(uplifts_within$Female, na.rm = TRUE), 2), "%"),
    paste0(round(mean(uplifts_within$Female, na.rm = TRUE) +  sd_female_uplifts_within, 2), "%")
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_within$Female_c$robust$k
)

## Mean age

sd_mean_age_uplifts_within <- sd(uplifts_within$AgeM_c, na.rm = TRUE)

pred_agem_uplifts_within <- predict(
  sample_mod_uplifts_within$AgeM_c$robust,
  newmods = c(- sd_mean_age_uplifts_within, 0, + sd_mean_age_uplifts_within)
)

df_pred_agem_uplifts_within <- transform(
  as.data.frame(pred_agem_uplifts_within),
  moderator = "Mean age",
  label = c(
    round(mean(uplifts_within$AgeM, na.rm = TRUE) - sd_mean_age_uplifts_within, 2),
    round(mean(uplifts_within$AgeM, na.rm = TRUE), 2),
    round(mean(uplifts_within$AgeM, na.rm = TRUE) + sd_mean_age_uplifts_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_within$AgeM_c$robust$k
)

## Region

region_cats_uplifts_within <- data.frame(
  country_region = factor(
    c("North America", "Northern Europe", "Asia"),
    levels = c("North America", "Northern Europe", "Asia")
  )
)

region_mods_uplifts_within <-
  model.matrix(~ country_region, region_cats_uplifts_within)[, -1]

pred_region_uplifts_within <- predict(
  sample_mod_uplifts_within$country_region$robust,
  newmods = region_mods_uplifts_within
)

df_pred_region_uplifts_within <- transform(
  as.data.frame(pred_region_uplifts_within),
  moderator = "Region",
  label = c("North America", "Northern Europe", "Asia"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_within$country_region$robust$k
)

## Daily event type

eventtype_cats_uplifts_within <- data.frame(
  DeDomainAll = factor(
    c("general", "work/achievement", "social", "other"),
    levels = c("general", "work/achievement", "social", "other"),
  )
)

eventtype_mods_uplifts_within <-
  model.matrix(~ DeDomainAll, eventtype_cats_uplifts_within)[, -1]

pred_eventtype_uplifts_within <- predict(
  assess_mod_uplifts_within$DeDomainAll$robust,
  newmods = eventtype_mods_uplifts_within
)

df_pred_eventtype_uplifts_within <- transform(
  as.data.frame(pred_eventtype_uplifts_within),
  moderator = "Event type",
  label = c("General", "Work/Achievement", "Social", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_within$DeDomainAll$robust$k
)

## Daily event measurement

eventmeasure_cats_uplifts_within <- data.frame(
  TypeDeMeasure = factor(
    c("checklist/questionnaire", "open_response", "interview"),
    levels = c("checklist/questionnaire", "open_response", "interview"),
  )
)

eventmeasure_mods_uplifts_within <-
  model.matrix(~ TypeDeMeasure, eventmeasure_cats_uplifts_within)[, -1]

pred_eventmeasure_uplifts_within <- predict(
  assess_mod_uplifts_within$TypeDeMeasure$robust,
  newmods = eventmeasure_mods_uplifts_within
)

df_pred_eventmeasure_uplifts_within <- transform(
  as.data.frame(pred_eventmeasure_uplifts_within),
  moderator = "Event measurement",
  label = c("Checklist/Questionnaire", "Open-response", "Interview"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_within$TypeDeMeasure$robust$k
)

## Daily event operationalization

eventdata_cats_uplifts_within <- data.frame(
  DeDataType = factor(
    c("dichotomous", "numeric_count", "scale_score"),
    levels = c("dichotomous", "numeric_count", "scale_score"),
  )
)

eventdata_mods_uplifts_within <-
  model.matrix(~ DeDataType, eventdata_cats_uplifts_within)[, -1]

pred_eventdata_uplifts_within <- predict(
  assess_mod_uplifts_within$DeDataType$robust,
  newmods = eventdata_mods_uplifts_within
)

df_pred_eventdata_uplifts_within <- transform(
  as.data.frame(pred_eventdata_uplifts_within),
  moderator = "Event operationalization",
  label = c("Dichotomous", "Numeric count", "Scale score"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_within$DeDataType$robust$k
)

## SWB dimension

swb_cats_uplifts_within <- data.frame(
  WbDimension = factor(
    c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect"),
    levels =c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect"),
  )
)

swb_mods_uplifts_within <- 
  model.matrix(~ WbDimension, data = swb_cats_uplifts_within)[, -1]

pred_swb_mods_uplifts_within <- predict(
  assess_mod_uplifts_within$WbDimension$robust,
  newmods = swb_mods_uplifts_within
  )

df_pred_swb_mods_uplifts_within <- transform(
  as.data.frame(pred_swb_mods_uplifts_within),
  moderator = "SWB dimension",
  label = c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_within$WbDimension$robust$k
)

## SWB reliability

sd_reliability_uplifts_within <- sd(uplifts_within$WbReliability_c, na.rm = TRUE)

pred_reliability_uplifts_within <- predict(
  assess_mod_uplifts_within$WbReliability_c$robust,
  newmods = c(- sd_reliability_uplifts_within, 0, + sd_reliability_uplifts_within)
)

df_pred_reliability_uplifts_within <- transform(
  as.data.frame(pred_reliability_uplifts_within),
  moderator = "SWB reliability",
  label = c(
    round(mean(uplifts_within$WbReliability, na.rm = TRUE) - sd_reliability_uplifts_within, 2),
    round(mean(uplifts_within$WbReliability, na.rm = TRUE), 2),
    round(mean(uplifts_within$WbReliability, na.rm = TRUE) + sd_reliability_uplifts_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_within$WbReliability$robust$k
)

## Study design

design_cats_uplifts_within <- data.frame(
  StudyDesign = factor(
    c("daily_diary", "esm"),
    levels =c("daily_diary", "esm"),
  )
)

design_mods_uplifts_within <- 
  model.matrix(~ StudyDesign, data = design_cats_uplifts_within)[, -1]

pred_design_mods_uplifts_within <- predict(
  design_mod_uplifts_within$StudyDesign$robust,
  newmods = design_mods_uplifts_within
  )

df_pred_design_mods_uplifts_within <- transform(
  as.data.frame(pred_design_mods_uplifts_within),
  moderator = "Study design",
  label = c("Daily diary", "Experience sampling"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = design_mod_uplifts_within$StudyDesign$robust$k
  
)

## Correlation lag

corr_cats_uplifts_within <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels =c("concurrent", "prospective"),
  )
)

corr_mods_uplifts_within <- 
  model.matrix(~ CorrLag, data = corr_cats_uplifts_within)[, -1]

pred_corr_mods_uplifts_within <- predict(
  corr_mod_uplifts_within$CorrLag$robust,
  newmods = corr_mods_uplifts_within
  )

df_pred_corr_mods_uplifts_within <- transform(
  as.data.frame(pred_corr_mods_uplifts_within),
  moderator = "Correlation lag",
  label = c("Concurrent", "Prospective"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = corr_mod_uplifts_within$CorrLag$robust$k
)

## Create dataset for plot

df_pred_year_uplifts_within$label <-
  as.character(df_pred_year_uplifts_within$label)

df_pred_female_uplifts_within$label <-
  as.character(df_pred_female_uplifts_within$label)

df_pred_agem_uplifts_within$label <-
  as.character(df_pred_agem_uplifts_within$label)

df_pred_reliability_uplifts_within$label <-
  as.character(df_pred_reliability_uplifts_within$label)

df_pred_year_uplifts_within$order <- rev(seq_len(nrow(df_pred_year_uplifts_within)))
df_pred_sampletype_uplifts_within$order <- rev(seq_len(nrow(df_pred_sampletype_uplifts_within)))
df_pred_female_uplifts_within$order <- rev(seq_len(nrow(df_pred_female_uplifts_within)))
df_pred_agem_uplifts_within$order <- rev(seq_len(nrow(df_pred_agem_uplifts_within)))
df_pred_region_uplifts_within$order <- rev(seq_len(nrow(df_pred_region_uplifts_within)))
df_pred_eventtype_uplifts_within$order <- rev(seq_len(nrow(df_pred_eventtype_uplifts_within)))
df_pred_eventmeasure_uplifts_within$order <- rev(seq_len(nrow(df_pred_eventmeasure_uplifts_within)))
df_pred_eventdata_uplifts_within$order <- rev(seq_len(nrow(df_pred_eventdata_uplifts_within)))
df_pred_swb_mods_uplifts_within$order <- rev(seq_len(nrow(df_pred_swb_mods_uplifts_within)))
df_pred_reliability_uplifts_within$order <- rev(seq_len(nrow(df_pred_reliability_uplifts_within)))
df_pred_design_mods_uplifts_within$order <- rev(seq_len(nrow(df_pred_design_mods_uplifts_within)))
df_pred_corr_mods_uplifts_within$order <- rev(seq_len(nrow(df_pred_corr_mods_uplifts_within)))

plot_pred_mod_uplifts_within <- bind_rows(
  df_pred_year_uplifts_within,
  df_pred_sampletype_uplifts_within,
  df_pred_female_uplifts_within,
  df_pred_agem_uplifts_within,
  df_pred_region_uplifts_within,
  df_pred_eventtype_uplifts_within,
  df_pred_eventmeasure_uplifts_within,
  df_pred_eventdata_uplifts_within,
  df_pred_swb_mods_uplifts_within,
  df_pred_reliability_uplifts_within,
  df_pred_design_mods_uplifts_within,
  df_pred_corr_mods_uplifts_within
) %>%
  mutate(
    significance = if_else(
      (r.lb>0)&(r.ub>0) | (r.lb<0)&(r.ub<0),
      "significant",
      "non-significant"
    )
  )

# Order moderators
plot_pred_mod_uplifts_within$moderator <- factor(
  plot_pred_mod_uplifts_within$moderator,
  levels = rev(c("Publication year", "Sample type", "% Female", "Mean age", "Region", 
                 "Event type", "Event measurement", "Event operationalization", 
                 "SWB dimension", "SWB reliability", "Study design", "Correlation lag"))
)

# Order moderator categories and assign y-positions
plot_pred_mod_uplifts_within <- plot_pred_mod_uplifts_within %>%
  arrange(moderator, order) %>%
  mutate(
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ", round(r.ub, 3), "]",
      "<br>ES = ", k
    )
  )

# Compute x-axis limits
x_min <- min(plot_pred_mod_uplifts_within$r.lb)
x_max <- max(plot_pred_mod_uplifts_within$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

# Create plot
simple_slopes_uplifts_within <-
  ggplot(
    plot_pred_mod_uplifts_within,
    aes(
      x = r,
      y = moderator,
      group = interaction(moderator, order),
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.15,
    linewidth = 0.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = paste(moderator, label),
    ),
    size = 2.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad + x_range * 0.15
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  geom_text(
    aes(
      x = r.ub + right_pad,
      label = label
    ),
    hjust = 0,
    size = 3,
    position = position_dodge(width = 0.75),
    colour = "black"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_uplifts_within,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Predictions for continuous moderators are estimated at the mean of the moderator, whereas predictions for categorical moderators are reported for each category. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Between-Person Associations

Regression Coefficient Table
# Sample Characteristics

sample_mods <- c("Female_c", "SampleType", "AgeM_c", "country_region")

sample_mod_uplifts_between <- setNames(
  lapply(
    sample_mods,
    run_ma_mod,
    data = uplifts_between,
    SamV = V_uplifts_between
  ),
  sample_mods
)

sample_mod_results_uplifts_between <- lapply(
  sample_mod_uplifts_between,
  extract_mod_results,
  data = uplifts_between,
  SamV = V_uplifts_between
) %>%
  bind_rows(.id = "moderator")

# Publication Characteristics

pub_mods <- c("Year_c")

pub_mod_uplifts_between <- setNames(
  lapply(
    pub_mods,
    run_ma_mod,
    data = uplifts_between,
    SamV = V_uplifts_between
  ),
  pub_mods
)

pub_mod_results_uplifts_between <- lapply(
  pub_mod_uplifts_between,
  extract_mod_results,
  data = uplifts_between,
  SamV = V_uplifts_between
) %>%
  bind_rows(.id = "moderator")

# Study-Design Characteristics

design_mods <- c("StudyDesign")

design_mod_uplifts_between <- setNames(
  lapply(
    design_mods,
    run_ma_mod,
    data = uplifts_between,
    SamV = V_uplifts_between
  ),
  design_mods
)

design_mod_results_uplifts_between <- lapply(
  design_mod_uplifts_between,
  extract_mod_results,
  data = uplifts_between,
  SamV = V_uplifts_between
) %>%
  bind_rows(.id = "moderator")

# Assessment Characteristics

assess_mods <- c("DeDomainAll", "TypeDeMeasure", "DeDataType", 
                 "WbDimension", "WbReliability_c")

assess_mod_uplifts_between <- setNames(
  lapply(
    assess_mods,
    run_ma_mod,
    data = uplifts_between,
    SamV = V_uplifts_between
  ),
  assess_mods
)

assess_mod_results_uplifts_between <- lapply(
  assess_mod_uplifts_between,
  extract_mod_results,
  data = uplifts_between,
  SamV = V_uplifts_between
) %>%
  bind_rows(.id = "moderator")

# Create table

mod_uplifts_between_metric <- rbind(
  sample_mod_results_uplifts_between, 
  pub_mod_results_uplifts_between,
  design_mod_results_uplifts_between,
  assess_mod_results_uplifts_between) %>%
  filter(
    moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_uplifts_between_categorical <- rbind(
  sample_mod_results_uplifts_between, 
  pub_mod_results_uplifts_between,
  design_mod_results_uplifts_between,
  assess_mod_results_uplifts_between) %>%
  filter(
    !moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_uplifts_between <- rbind(
  mod_uplifts_between_metric,
  mod_uplifts_between_categorical
) %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )


mod_uplifts_between$R2_Level1 <- ifelse(mod_uplifts_between$R2_Level1 < 0, 0, mod_uplifts_between$R2_Level1)
mod_uplifts_between$R2_Level2 <- ifelse(mod_uplifts_between$R2_Level2 < 0, 0, mod_uplifts_between$R2_Level2)
mod_uplifts_between$R2_Total <- ifelse(mod_uplifts_between$R2_Total < 0, 0, mod_uplifts_between$R2_Total)

names(mod_uplifts_between) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(mod_uplifts_between) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                    "College", "Northern Europe", "Asia", "ESM", "Work/Achievement", "Social", 
                                    "Other event", "Open-response", "Interview","Numeric count",
                                    "Scale score", "Other type", "Domain satisfaction", "Positive affect", 
                                    "Negative affect")

order_mod_uplifts_between <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe","Asia",
  "Work/Achievement", "Social", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score", "Other type",
  "Domain satisfaction", "Positive affect", "Negative affect",
  "SWB reliability",
  "ESM"
)

mod_uplifts_between <- mod_uplifts_between[order_mod_uplifts_between, ]

kable(round(mod_uplifts_between, 3),
      caption = "**Results of Single-Moderator Analyses for the Between-Person Association Between Daily Uplifts and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 6) %>%
  pack_rows("Daily event type", 7, 9) %>%
  pack_rows("Daily event measurement", 10, 11) %>%
  pack_rows("Daily event data type", 12, 14) %>%
  pack_rows("SWB dimension", 15, 17) %>%
  column_spec(c(3:6), bold = ifelse(mod_uplifts_between[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 33: Results of Single-Moderator Analyses for the Between-Person Association Between Daily Uplifts and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 270 0.005 0.002 2.242 0.046 0.060 0.000 93.424 0.000 93.424 1.275 0.000 1.275
College 270 -0.017 0.030 -0.567 0.574 0.061 0.000 93.519 0.000 93.519 0.000 0.000 0.000
% Female 270 0.001 0.000 1.578 0.141 0.060 0.000 93.494 0.000 93.494 0.214 63.146 0.214
Mean age 268 0.000 0.001 -0.192 0.849 0.061 0.000 93.509 0.000 93.509 0.000 0.000 0.000
Region
Northern Europe 228 0.067 0.042 1.592 0.141 0.062 0.000 94.150 0.000 94.150 0.405 19.497 0.405
Asia 228 -0.060 0.057 -1.053 0.381 0.062 0.000 94.150 0.000 94.150 0.405 19.497 0.405
Daily event type
Work/Achievement 270 -0.044 0.045 -0.984 0.332 0.060 0.000 93.473 0.000 93.473 0.327 0.000 0.327
Social 270 -0.035 0.043 -0.821 0.416 0.060 0.000 93.473 0.000 93.473 0.327 0.000 0.327
Other event 270 -0.167 0.064 -2.630 0.095 0.060 0.000 93.473 0.000 93.473 0.327 0.000 0.327
Daily event measurement
Open-response 267 -0.073 0.072 -1.007 0.370 0.060 0.000 93.434 0.000 93.434 1.508 0.000 1.508
Interview 267 -0.214 0.030 -7.005 0.020 0.060 0.000 93.434 0.000 93.434 1.508 0.000 1.508
Daily event data type
Numeric count 269 0.125 0.052 2.417 0.024 0.059 0.000 93.308 0.000 93.308 2.797 17.169 2.797
Scale score 269 0.097 0.030 3.238 0.003 0.059 0.000 93.308 0.000 93.308 2.797 17.169 2.797
Other type 269 0.308 0.176 1.755 0.175 0.059 0.000 93.308 0.000 93.308 2.797 17.169 2.797
SWB dimension
Domain satisfaction 267 0.043 0.126 0.341 0.743 0.030 0.012 64.843 25.947 90.790 51.161 0.000 31.618
Positive affect 267 0.080 0.079 1.012 0.341 0.030 0.012 64.843 25.947 90.790 51.161 0.000 31.618
Negative affect 267 -0.256 0.096 -2.663 0.029 0.030 0.012 64.843 25.947 90.790 51.161 0.000 31.618
SWB reliability 202 1.101 0.321 3.427 0.004 0.051 0.017 70.173 23.854 94.027 21.694 0.000 0.000
ESM 270 0.079 0.041 1.908 0.086 0.060 0.000 93.454 0.000 93.454 0.489 5.055 0.489

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
mod_uplifts_between_plot <- rbind(
  mod_uplifts_between_metric,
  mod_uplifts_between_categorical
)

table_extract_mod_uplifts_between <- mod_uplifts_between_plot %>%
  select(b, ci.lb, ci.ub) %>%
  mutate(across(everything(), ~ round(.x, 2)))

mod_uplifts_between_plot$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                      "College", "Northern Europe", "Asia", "ESM", 
                                      "Work/Achievement", "Social", "Other event" ,"Open-response", "Interview", 
                                      "Numeric count", "Scale score", "Other type", "Domain satisfaction", 
                                      "Positive affect", "Negative affect")

mod_uplifts_between_plot <- mod_uplifts_between_plot %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score", "Other type") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel %in% c("Northern Europe", "Asia") ~ "Region",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

order_modcat_between <- c("Publication year",
                          "Sample type", 
                          "% Female", 
                          "Mean age", 
                          "Region", 
                          "Daily event type", 
                          "Daily event measurement", 
                          "Daily event data type", 
                          "SWB dimension", 
                          "SWB reliability",
                          "Study design", 
                          "Correlation lag")

mod_uplifts_between_plot <- mod_uplifts_between_plot %>%
  mutate(modcat = factor(modcat, levels = order_modcat_between)) %>%
  arrange(modcat)

mod_uplifts_between_plot$modcat <- factor(
  mod_uplifts_between_plot$modcat,
  levels = rev(unique(mod_uplifts_between_plot$modcat))
)

mod_uplifts_between_plot <- mod_uplifts_between_plot %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_mod_uplifts_between)))

x_min <- min(mod_uplifts_between_plot$ci.lb)
x_max <- max(mod_uplifts_between_plot$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = mod_uplifts_between_plot,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(mod_uplifts_between_plot, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Predicted Correlations Plot
## Publication year

sd_year_uplifts_between <- sd(uplifts_between$Year_c, na.rm = TRUE)

pred_year_uplifts_between <- predict(
  pub_mod_uplifts_between$Year_c$robust,
  newmods = c(-sd_year_uplifts_between, 0, sd_year_uplifts_between)
)

df_pred_year_uplifts_between <- transform(
  as.data.frame(pred_year_uplifts_between),
  moderator = "Publication year",
  label = c(
    round(mean(uplifts_between$Year, na.rm = TRUE) - sd_year_uplifts_between, 2),
    round(mean(uplifts_between$Year, na.rm = TRUE), 2),
    round(mean(uplifts_between$Year, na.rm = TRUE) + sd_year_uplifts_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = pub_mod_uplifts_between$Year_c$robust$k
)

## Sample type

sampletype_cats_uplifts_between <- data.frame(
  SampleType = factor(
    c("convenience", "college"),
    levels = c("convenience", "college")
  )
)

sampletype_mods_uplifts_between <-
  model.matrix(~ SampleType, sampletype_cats_uplifts_between)[, -1]

pred_sampletype_uplifts_between <- predict(
  sample_mod_uplifts_between$SampleType$robust,
  newmods = sampletype_mods_uplifts_between
)

df_pred_sampletype_uplifts_between <- transform(
  as.data.frame(pred_sampletype_uplifts_between),
  moderator = "Sample type",
  label = c("Convenience", "College"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_between$SampleType$robust$k
)

df_pred_sampletype_uplifts_between$label <- factor(
  df_pred_sampletype_uplifts_between$label,
  levels = c("Convenience", "College")
)

## Percentage female

sd_female_uplifts_between <- sd(uplifts_between$Female_c, na.rm = TRUE)

pred_female_uplifts_between <- predict(
  sample_mod_uplifts_between$Female_c$robust,
  newmods = c(-sd_female_uplifts_between, 0, sd_female_uplifts_between)
)

df_pred_female_uplifts_between <- transform(
  as.data.frame(pred_female_uplifts_between),
  moderator = "% Female",
  label = c(
    paste0(round(mean(uplifts_between$Female, na.rm = TRUE) - sd_female_uplifts_between, 2), "%"),
    paste0(round(mean(uplifts_between$Female, na.rm = TRUE), 2), "%"),
    paste0(round(mean(uplifts_between$Female, na.rm = TRUE) +  sd_female_uplifts_between, 2), "%")
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_between$Female_c$robust$k
)

## Mean age

sd_mean_age_uplifts_between <- sd(uplifts_between$AgeM_c, na.rm = TRUE)

pred_agem_uplifts_between <- predict(
  sample_mod_uplifts_between$AgeM_c$robust,
  newmods = c(- sd_mean_age_uplifts_between, 0, + sd_mean_age_uplifts_between)
)

df_pred_agem_uplifts_between <- transform(
  as.data.frame(pred_agem_uplifts_between),
  moderator = "Mean age",
  label = c(
    round(mean(uplifts_between$AgeM, na.rm = TRUE) - sd_mean_age_uplifts_between, 2),
    round(mean(uplifts_between$AgeM, na.rm = TRUE), 2),
    round(mean(uplifts_between$AgeM, na.rm = TRUE) + sd_mean_age_uplifts_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_between$AgeM_c$robust$k
)

## Region

region_cats_uplifts_between <- data.frame(
  country_region = factor(
    c("North America", "Northern Europe", "Asia"),
    levels = c("North America", "Northern Europe", "Asia")
  )
)

region_mods_uplifts_between <-
  model.matrix(~ country_region, region_cats_uplifts_between)[, -1]

pred_region_uplifts_between <- predict(
  sample_mod_uplifts_between$country_region$robust,
  newmods = region_mods_uplifts_between
)

df_pred_region_uplifts_between <- transform(
  as.data.frame(pred_region_uplifts_between),
  moderator = "Region",
  label = c("North America", "Northern Europe", "Asia"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_uplifts_between$country_region$robust$k
)

## Daily event type

eventtype_cats_uplifts_between <- data.frame(
  DeDomainAll = factor(
    c("general", "work/achievement", "social", "other"),
    levels = c("general", "work/achievement", "social", "other"),
  )
)

eventtype_mods_uplifts_between <-
  model.matrix(~ DeDomainAll, eventtype_cats_uplifts_between)[, -1]

pred_eventtype_uplifts_between <- predict(
  assess_mod_uplifts_between$DeDomainAll$robust,
  newmods = eventtype_mods_uplifts_between
)

df_pred_eventtype_uplifts_between <- transform(
  as.data.frame(pred_eventtype_uplifts_between),
  moderator = "Event type",
  label = c("General", "Work/Achievement", "Social", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_between$DeDomainAll$robust$k
)

## Daily event measurement

eventmeasure_cats_uplifts_between <- data.frame(
  TypeDeMeasure = factor(
    c("checklist/questionnaire", "open_response", "interview"),
    levels = c("checklist/questionnaire", "open_response", "interview"),
  )
)

eventmeasure_mods_uplifts_between <-
  model.matrix(~ TypeDeMeasure, eventmeasure_cats_uplifts_between)[, -1]

pred_eventmeasure_uplifts_between <- predict(
  assess_mod_uplifts_between$TypeDeMeasure$robust,
  newmods = eventmeasure_mods_uplifts_between
)

df_pred_eventmeasure_uplifts_between <- transform(
  as.data.frame(pred_eventmeasure_uplifts_between),
  moderator = "Event measurement",
  label = c("Checklist/Questionnaire", "Open-response", "Interview"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_between$TypeDeMeasure$robust$k
)

## Daily event operationalization

eventdata_cats_uplifts_between <- data.frame(
  DeDataType = factor(
    c("dichotomous", "numeric_count", "scale_score", "other"),
    levels = c("dichotomous", "numeric_count", "scale_score", "other"),
  )
)

eventdata_mods_uplifts_between <-
  model.matrix(~ DeDataType, eventdata_cats_uplifts_between)[, -1]

pred_eventdata_uplifts_between <- predict(
  assess_mod_uplifts_between$DeDataType$robust,
  newmods = eventdata_mods_uplifts_between
)

df_pred_eventdata_uplifts_between <- transform(
  as.data.frame(pred_eventdata_uplifts_between),
  moderator = "Event operationalization",
  label = c("Dichotomous", "Numeric count", "Scale score", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_between$DeDataType$robust$k
)

## SWB dimension

swb_cats_uplifts_between <- data.frame(
  WbDimension = factor(
    c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect"),
    levels =c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect"),
  )
)

swb_mods_uplifts_between <- 
  model.matrix(~ WbDimension, data = swb_cats_uplifts_between)[, -1]

pred_swb_mods_uplifts_between <- predict(
  assess_mod_uplifts_between$WbDimension$robust,
  newmods = swb_mods_uplifts_between
  )

df_pred_swb_mods_uplifts_between <- transform(
  as.data.frame(pred_swb_mods_uplifts_between),
  moderator = "SWB dimension",
  label = c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_between$WbDimension$robust$k
)

## SWB reliability

sd_reliability_uplifts_between <- sd(uplifts_between$WbReliability_c, na.rm = TRUE)

pred_reliability_uplifts_between <- predict(
  assess_mod_uplifts_between$WbReliability_c$robust,
  newmods = c(- sd_reliability_uplifts_between, 0, + sd_reliability_uplifts_between)
)

df_pred_reliability_uplifts_between <- transform(
  as.data.frame(pred_reliability_uplifts_between),
  moderator = "SWB reliability",
  label = c(
    round(mean(uplifts_between$WbReliability, na.rm = TRUE) - sd_reliability_uplifts_between, 2),
    round(mean(uplifts_between$WbReliability, na.rm = TRUE), 2),
    round(mean(uplifts_between$WbReliability, na.rm = TRUE) + sd_reliability_uplifts_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_uplifts_between$WbReliability$robust$k
)

## Study design

design_cats_uplifts_between <- data.frame(
  StudyDesign = factor(
    c("daily_diary", "esm"),
    levels =c("daily_diary", "esm"),
  )
)

design_mods_uplifts_between <- 
  model.matrix(~ StudyDesign, data = design_cats_uplifts_between)[, -1]

pred_design_mods_uplifts_between <- predict(
  design_mod_uplifts_between$StudyDesign$robust,
  newmods = design_mods_uplifts_between
  )

df_pred_design_mods_uplifts_between <- transform(
  as.data.frame(pred_design_mods_uplifts_between),
  moderator = "Study design",
  label = c("Daily diary", "Experience sampling"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = design_mod_uplifts_between$StudyDesign$robust$k
  
)

## Create dataset for plot

## Convert to character for merging

df_pred_year_uplifts_between$label <-
  as.character(df_pred_year_uplifts_between$label)

df_pred_female_uplifts_between$label <-
  as.character(df_pred_female_uplifts_between$label)

df_pred_agem_uplifts_between$label <-
  as.character(df_pred_agem_uplifts_between$label)

df_pred_reliability_uplifts_between$label <-
  as.character(df_pred_reliability_uplifts_between$label)

## Create order column for order of moderator labels inside the plot

df_pred_year_uplifts_between$order <- rev(seq_len(nrow(df_pred_year_uplifts_between)))
df_pred_sampletype_uplifts_between$order <- rev(seq_len(nrow(df_pred_sampletype_uplifts_between)))
df_pred_female_uplifts_between$order <- rev(seq_len(nrow(df_pred_female_uplifts_between)))
df_pred_agem_uplifts_between$order <- rev(seq_len(nrow(df_pred_agem_uplifts_between)))
df_pred_region_uplifts_between$order <- rev(seq_len(nrow(df_pred_region_uplifts_between)))
df_pred_eventtype_uplifts_between$order <- rev(seq_len(nrow(df_pred_eventtype_uplifts_between)))
df_pred_eventmeasure_uplifts_between$order <- rev(seq_len(nrow(df_pred_eventmeasure_uplifts_between)))
df_pred_eventdata_uplifts_between$order <- rev(seq_len(nrow(df_pred_eventdata_uplifts_between)))
df_pred_swb_mods_uplifts_between$order <- rev(seq_len(nrow(df_pred_swb_mods_uplifts_between)))
df_pred_reliability_uplifts_between$order <- rev(seq_len(nrow(df_pred_reliability_uplifts_between)))
df_pred_design_mods_uplifts_between$order <- rev(seq_len(nrow(df_pred_design_mods_uplifts_between)))

plot_pred_mod_uplifts_between <- bind_rows(
  df_pred_year_uplifts_between,
  df_pred_sampletype_uplifts_between,
  df_pred_female_uplifts_between,
  df_pred_agem_uplifts_between,
  df_pred_region_uplifts_between,
  df_pred_eventtype_uplifts_between,
  df_pred_eventmeasure_uplifts_between,
  df_pred_eventdata_uplifts_between,
  df_pred_swb_mods_uplifts_between,
  df_pred_reliability_uplifts_between,
  df_pred_design_mods_uplifts_between
) %>%
  mutate(
    significance = if_else(
      (r.lb>0)&(r.ub>0) | (r.lb<0)&(r.ub<0),
      "significant",
      "non-significant"
    )
  )

# Order moderators
plot_pred_mod_uplifts_between$moderator <- factor(
  plot_pred_mod_uplifts_between$moderator,
  levels = rev(c("Publication year", "Sample type", "% Female", "Mean age", "Region", 
                 "Event type", "Event measurement", "Event operationalization", 
                 "SWB dimension", "SWB reliability", "Study design", "Correlation lag"))
)

# Order moderator categories and assign y-positions
plot_pred_mod_uplifts_between <- plot_pred_mod_uplifts_between %>%
  arrange(moderator, order) %>%
  mutate(
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ", round(r.ub, 3), "]",
      "<br>ES = ", k
    )
  )

# Compute x-axis limits
x_min <- min(plot_pred_mod_uplifts_between$r.lb)
x_max <- max(plot_pred_mod_uplifts_between$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

# Create plot
simple_slopes_uplifts_between <-
  ggplot(
    plot_pred_mod_uplifts_between,
    aes(
      x = r,
      y = moderator,
      group = interaction(moderator, order),
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.15,
    linewidth = 0.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = paste(moderator, label),
    ),
    size = 2.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad + x_range * 0.15
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  geom_text(
    aes(
      x = r.ub + right_pad,
      label = label
    ),
    hjust = 0,
    size = 3,
    position = position_dodge(width = 0.75),
    colour = "black"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_uplifts_between,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Predictions for continuous moderators are estimated at the mean of the moderator, whereas predictions for categorical moderators are reported for each category. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Hassles & SWB

Within-Person Associations

Regression Coefficient Table
# Sample Characteristics

sample_mods <- c("Female_c", "SampleType", "AgeM_c", "country_region")

sample_mod_hassles_within <- setNames(
  lapply(
    sample_mods,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  sample_mods
)

sample_mod_results_hassles_within <- lapply(
  sample_mod_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")

# Publication Characteristics

pub_mods <- c("Year_c")

pub_mod_hassles_within <- setNames(
  lapply(
    pub_mods,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  pub_mods
)

pub_mod_results_hassles_within <- lapply(
  pub_mod_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")

# Study-Design Characteristics

design_mods <- c("StudyDesign")

design_mod_hassles_within <- setNames(
  lapply(
    design_mods,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  design_mods
)

design_mod_results_hassles_within <- lapply(
  design_mod_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")

# Assessment Characteristics

assess_mods <- c("DeDomainAll", "TypeDeMeasure", "DeDataType", 
                 "WbDimension", "WbReliability_c")

assess_mod_hassles_within <- setNames(
  lapply(
    assess_mods,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  assess_mods
)

assess_mod_results_hassles_within <- lapply(
  assess_mod_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")

# Correlation Characteristics

corr_mods <- c("CorrLag")

corr_mod_hassles_within <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  corr_mods
)

corr_mod_results_hassles_within <- lapply(
  corr_mod_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")

# Create table

mod_hassles_within_metric <- rbind(
  sample_mod_results_hassles_within, 
  pub_mod_results_hassles_within,
  design_mod_results_hassles_within,
  assess_mod_results_hassles_within,
  corr_mod_results_hassles_within) %>%
  filter(
    moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_hassles_within_categorical <- rbind(
  sample_mod_results_hassles_within, 
  pub_mod_results_hassles_within,
  design_mod_results_hassles_within,
  assess_mod_results_hassles_within,
  corr_mod_results_hassles_within) %>%
  filter(
    !moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_hassles_within <- rbind(
  mod_hassles_within_metric,
  mod_hassles_within_categorical
) %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

mod_hassles_within$R2_Level1 <- ifelse(mod_hassles_within$R2_Level1 < 0, 0, mod_hassles_within$R2_Level1)
mod_hassles_within$R2_Level2 <- ifelse(mod_hassles_within$R2_Level2 < 0, 0, mod_hassles_within$R2_Level2)
mod_hassles_within$R2_Total <- ifelse(mod_hassles_within$R2_Total < 0, 0, mod_hassles_within$R2_Total)

names(mod_hassles_within) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(mod_hassles_within) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                   "College", "Northern Europe", "Southern Europe","Asia",
                                   "ESM", "Work/Achievement",
                                   "Social", "Health", "Other event", "Open-response",
                                   "Interview", "Numeric count", "Scale score", "Domain satisfaction",
                                   "Positive affect", "Negative affect", "Global well-being", "Prospective")

order_mod_hassles_within <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe", "Southern Europe","Asia",
  "Work/Achievement", "Social", "Health", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
  "SWB reliability",
  "ESM",
  "Prospective"
)

mod_hassles_within <- mod_hassles_within[order_mod_hassles_within, ]

kable(round(mod_hassles_within, 3),
      caption = "**Results of Single-Moderator Analyses for the Within-Person Association Between Daily Hassles and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 7) %>%
  pack_rows("Daily event type", 8, 11) %>%
  pack_rows("Daily event measurement", 12, 13) %>%
  pack_rows("Daily event data type", 14, 15) %>%
  pack_rows("SWB dimension", 16, 19) %>%
  column_spec(c(3:6), bold = ifelse(mod_hassles_within[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 34: Results of Single-Moderator Analyses for the Within-Person Association Between Daily Hassles and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 530 0.001 0.002 0.354 0.728 0.022 0.003 86.490 12.692 99.182 0.239 0.000 0.000
College 530 0.022 0.018 1.223 0.228 0.022 0.003 86.962 12.217 99.179 0.181 0.000 0.000
% Female 530 0.000 0.000 -0.968 0.353 0.022 0.003 87.118 12.058 99.176 0.000 0.000 0.000
Mean age 523 -0.001 0.001 -0.939 0.358 0.022 0.003 86.352 12.839 99.191 0.173 0.000 0.000
Region
Northern Europe 464 -0.083 0.023 -3.536 0.001 0.021 0.002 90.318 8.840 99.158 0.847 31.591 4.667
Southern Europe 464 -0.113 0.103 -1.101 0.358 0.021 0.002 90.318 8.840 99.158 0.847 31.591 4.667
Asia 464 0.008 0.031 0.274 0.793 0.021 0.002 90.318 8.840 99.158 0.847 31.591 4.667
Daily event type
Work/Achievement 530 0.058 0.015 3.805 0.001 0.022 0.001 95.147 3.930 99.078 0.506 70.145 8.933
Social 530 0.102 0.017 5.951 0.000 0.022 0.001 95.147 3.930 99.078 0.506 70.145 8.933
Health 530 0.085 0.025 3.465 0.004 0.022 0.001 95.147 3.930 99.078 0.506 70.145 8.933
Other event 530 0.115 0.030 3.798 0.004 0.022 0.001 95.147 3.930 99.078 0.506 70.145 8.933
Daily event measurement
Open-response 527 -0.024 0.081 -0.292 0.786 0.022 0.003 87.468 11.706 99.174 0.000 0.000 0.000
Interview 527 0.050 0.049 1.020 0.367 0.022 0.003 87.468 11.706 99.174 0.000 0.000 0.000
Daily event data type
Numeric count 530 -0.029 0.028 -1.044 0.302 0.022 0.003 88.794 10.368 99.161 0.000 14.865 1.466
Scale score 530 -0.050 0.022 -2.329 0.025 0.022 0.003 88.794 10.368 99.161 0.000 14.865 1.466
SWB dimension
Domain satisfaction 530 -0.002 0.049 -0.031 0.976 0.017 0.004 78.936 20.117 99.053 20.687 0.000 12.517
Positive affect 530 0.046 0.017 2.697 0.038 0.017 0.004 78.936 20.117 99.053 20.687 0.000 12.517
Negative affect 530 -0.086 0.017 -4.967 0.003 0.017 0.004 78.936 20.117 99.053 20.687 0.000 12.517
Global well-being 530 -0.028 0.051 -0.543 0.619 0.017 0.004 78.936 20.117 99.053 20.687 0.000 12.517
SWB reliability 418 0.181 0.076 2.386 0.026 0.022 0.004 83.894 15.162 99.056 1.889 0.000 0.000
ESM 530 -0.033 0.021 -1.570 0.125 0.022 0.003 87.229 11.943 99.172 0.256 0.797 0.321
Prospective 530 0.202 0.016 12.452 0.000 0.014 0.006 70.160 28.797 98.956 35.869 0.000 20.492

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
mod_hassles_within_plot <- rbind(
  mod_hassles_within_metric,
  mod_hassles_within_categorical
)

table_extract_mod_hassles_within <- mod_hassles_within_plot %>%
  select(b, ci.lb, ci.ub) %>%
  mutate(across(everything(), ~ round(.x, 2)))

mod_hassles_within_plot$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                      "College", "Northern Europe", "Southern Europe", "Asia",
                                      "ESM", "Work/Achievement", "Social", "Health", 
                                      "Other event", "Open-response", "Interview", "Numeric count",
                                      "Scale score", "Domain satisfaction", "Positive affect", "Negative affect",
                                      "Global well-being", "Prospective")

mod_hassles_within_plot <- mod_hassles_within_plot %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Health", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Southern Europe", "Asia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel == "Prospective" ~ "Correlation lag",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

mod_hassles_within_plot <- mod_hassles_within_plot %>%
  mutate(modcat = factor(modcat, levels = order_modcat_within)) %>%
  arrange(modcat)

mod_hassles_within_plot$modcat <- factor(
  mod_hassles_within_plot$modcat,
  levels = rev(unique(mod_hassles_within_plot$modcat))
)

mod_hassles_within_plot <- mod_hassles_within_plot %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_mod_hassles_within)))

# Compute x-axis limits
x_min <- min(mod_hassles_within_plot$ci.lb)
x_max <- max(mod_hassles_within_plot$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = mod_hassles_within_plot,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(mod_hassles_within_plot, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Predicted Correlations Plot
## Publication year

sd_year_hassles_within <- sd(hassles_within$Year_c, na.rm = TRUE)

pred_year_hassles_within <- predict(
  pub_mod_hassles_within$Year_c$robust,
  newmods = c(-sd_year_hassles_within, 0, sd_year_hassles_within)
)

df_pred_year_hassles_within <- transform(
  as.data.frame(pred_year_hassles_within),
  moderator = "Publication year",
  label = c(
    round(mean(hassles_within$Year, na.rm = TRUE) - sd_year_hassles_within, 2),
    round(mean(hassles_within$Year, na.rm = TRUE), 2),
    round(mean(hassles_within$Year, na.rm = TRUE) + sd_year_hassles_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = pub_mod_hassles_within$Year_c$robust$k
)

## Sample type

sampletype_cats_hassles_within <- data.frame(
  SampleType = factor(
    c("convenience", "college"),
    levels = c("convenience", "college")
  )
)

sampletype_mods_hassles_within <-
  model.matrix(~ SampleType, sampletype_cats_hassles_within)[, -1]

pred_sampletype_hassles_within <- predict(
  sample_mod_hassles_within$SampleType$robust,
  newmods = sampletype_mods_hassles_within
)

df_pred_sampletype_hassles_within <- transform(
  as.data.frame(pred_sampletype_hassles_within),
  moderator = "Sample type",
  label = c("Convenience", "College"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_within$SampleType$robust$k
)

## Percentage female

sd_female_hassles_within <- sd(hassles_within$Female_c, na.rm = TRUE)

pred_female_hassles_within <- predict(
  sample_mod_hassles_within$Female_c$robust,
  newmods = c(-sd_female_hassles_within, 0, sd_female_hassles_within)
)

df_pred_female_hassles_within <- transform(
  as.data.frame(pred_female_hassles_within),
  moderator = "% Female",
  label = c(
    paste0(round(mean(hassles_within$Female, na.rm = TRUE) - sd_female_hassles_within, 2), "%"),
    paste0(round(mean(hassles_within$Female, na.rm = TRUE), 2), "%"),
    paste0(round(mean(hassles_within$Female, na.rm = TRUE) +  sd_female_hassles_within, 2), "%")
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_within$Female_c$robust$k
)

## Mean age

sd_mean_age_hassles_within <- sd(hassles_within$AgeM_c, na.rm = TRUE)

pred_agem_hassles_within <- predict(
  sample_mod_hassles_within$AgeM_c$robust,
  newmods = c(- sd_mean_age_hassles_within, 0, + sd_mean_age_hassles_within)
)

df_pred_agem_hassles_within <- transform(
  as.data.frame(pred_agem_hassles_within),
  moderator = "Mean age",
  label = c(
    round(mean(hassles_within$AgeM, na.rm = TRUE) - sd_mean_age_hassles_within, 2),
    round(mean(hassles_within$AgeM, na.rm = TRUE), 2),
    round(mean(hassles_within$AgeM, na.rm = TRUE) + sd_mean_age_hassles_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_within$AgeM_c$robust$k
)

## Region

region_cats_hassles_within <- data.frame(
  country_region = factor(
    c("North America", "Northern Europe", "Southern Europe", "Asia"),
    levels = c("North America", "Northern Europe", "Southern Europe","Asia")
  )
)

region_mods_hassles_within <-
  model.matrix(~ country_region, region_cats_hassles_within)[, -1]

pred_region_hassles_within <- predict(
  sample_mod_hassles_within$country_region$robust,
  newmods = region_mods_hassles_within
)

df_pred_region_hassles_within <- transform(
  as.data.frame(pred_region_hassles_within),
  moderator = "Region",
  label = c("North America", "Northern Europe", "Southern Europe","Asia"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_within$country_region$robust$k
)

## Daily event type

eventtype_cats_hassles_within <- data.frame(
  DeDomainAll = factor(
    c("general", "work/achievement", "social", "health", "other"),
    levels = c("general", "work/achievement", "social", "health", "other"),
  )
)

eventtype_mods_hassles_within <-
  model.matrix(~ DeDomainAll, eventtype_cats_hassles_within)[, -1]

pred_eventtype_hassles_within <- predict(
  assess_mod_hassles_within$DeDomainAll$robust,
  newmods = eventtype_mods_hassles_within
)

df_pred_eventtype_hassles_within <- transform(
  as.data.frame(pred_eventtype_hassles_within),
  moderator = "Event type",
  label = c("General", "Work/Achievement", "Social", "Health", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_within$DeDomainAll$robust$k
)

df_pred_eventtype_hassles_within$label <- factor(
  df_pred_eventtype_hassles_within$label,
  levels = c("General", "Work/Achievement", "Social", "Health", "Other")
)

## Daily event measurement

eventmeasure_cats_hassles_within <- data.frame(
  TypeDeMeasure = factor(
    c("checklist/questionnaire", "open_response", "interview"),
    levels = c("checklist/questionnaire", "open_response", "interview"),
  )
)

eventmeasure_mods_hassles_within <-
  model.matrix(~ TypeDeMeasure, eventmeasure_cats_hassles_within)[, -1]

pred_eventmeasure_hassles_within <- predict(
  assess_mod_hassles_within$TypeDeMeasure$robust,
  newmods = eventmeasure_mods_hassles_within
)

df_pred_eventmeasure_hassles_within <- transform(
  as.data.frame(pred_eventmeasure_hassles_within),
  moderator = "Event measurement",
  label = c("Checklist/Questionnaire", "Open-response", "Interview"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_within$TypeDeMeasure$robust$k
)

## Daily event operationalization

eventdata_cats_hassles_within <- data.frame(
  DeDataType = factor(
    c("dichotomous", "numeric_count", "scale_score"),
    levels = c("dichotomous", "numeric_count", "scale_score"),
  )
)

eventdata_mods_hassles_within <-
  model.matrix(~ DeDataType, eventdata_cats_hassles_within)[, -1]

pred_eventdata_hassles_within <- predict(
  assess_mod_hassles_within$DeDataType$robust,
  newmods = eventdata_mods_hassles_within
)

df_pred_eventdata_hassles_within <- transform(
  as.data.frame(pred_eventdata_hassles_within),
  moderator = "Event operationalization",
  label = c("Dichotomous", "Numeric count", "Scale score"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_within$DeDataType$robust$k
)

## SWB dimension

swb_cats_hassles_within <- data.frame(
  WbDimension = factor(
    c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being"),
    levels =c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being"),
  )
)

swb_mods_hassles_within <- 
  model.matrix(~ WbDimension, data = swb_cats_hassles_within)[, -1]

pred_swb_mods_hassles_within <- predict(
  assess_mod_hassles_within$WbDimension$robust,
  newmods = swb_mods_hassles_within
  )

df_pred_swb_mods_hassles_within <- transform(
  as.data.frame(pred_swb_mods_hassles_within),
  moderator = "SWB dimension",
  label = c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_within$WbDimension$robust$k
)

## SWB reliability

sd_reliability_hassles_within <- sd(hassles_within$WbReliability_c, na.rm = TRUE)

pred_reliability_hassles_within <- predict(
  assess_mod_hassles_within$WbReliability_c$robust,
  newmods = c(- sd_reliability_hassles_within, 0, + sd_reliability_hassles_within)
)

df_pred_reliability_hassles_within <- transform(
  as.data.frame(pred_reliability_hassles_within),
  moderator = "SWB reliability",
  label = c(
    round(mean(hassles_within$WbReliability, na.rm = TRUE) - sd_reliability_hassles_within, 2),
    round(mean(hassles_within$WbReliability, na.rm = TRUE), 2),
    round(mean(hassles_within$WbReliability, na.rm = TRUE) + sd_reliability_hassles_within, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_within$WbReliability$robust$k
)

## Study design

design_cats_hassles_within <- data.frame(
  StudyDesign = factor(
    c("daily_diary", "esm"),
    levels =c("daily_diary", "esm"),
  )
)

design_mods_hassles_within <- 
  model.matrix(~ StudyDesign, data = design_cats_hassles_within)[, -1]

pred_design_mods_hassles_within <- predict(
  design_mod_hassles_within$StudyDesign$robust,
  newmods = design_mods_hassles_within
  )

df_pred_design_mods_hassles_within <- transform(
  as.data.frame(pred_design_mods_hassles_within),
  moderator = "Study design",
  label = c("Daily diary", "Experience sampling"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = design_mod_hassles_within$StudyDesign$robust$k
  
)

## Correlation lag

corr_cats_hassles_within <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels =c("concurrent", "prospective"),
  )
)

corr_mods_hassles_within <- 
  model.matrix(~ CorrLag, data = corr_cats_hassles_within)[, -1]

pred_corr_mods_hassles_within <- predict(
  corr_mod_hassles_within$CorrLag$robust,
  newmods = corr_mods_hassles_within
  )

df_pred_corr_mods_hassles_within <- transform(
  as.data.frame(pred_corr_mods_hassles_within),
  moderator = "Correlation lag",
  label = c("Concurrent", "Prospective"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = corr_mod_hassles_within$CorrLag$robust$k
)

## Create dataset for plot

df_pred_year_hassles_within$label <-
  as.character(df_pred_year_hassles_within$label)

df_pred_female_hassles_within$label <-
  as.character(df_pred_female_hassles_within$label)

df_pred_agem_hassles_within$label <-
  as.character(df_pred_agem_hassles_within$label)

df_pred_reliability_hassles_within$label <-
  as.character(df_pred_reliability_hassles_within$label)

df_pred_year_hassles_within$order <- rev(seq_len(nrow(df_pred_year_hassles_within)))
df_pred_sampletype_hassles_within$order <- rev(seq_len(nrow(df_pred_sampletype_hassles_within)))
df_pred_female_hassles_within$order <- rev(seq_len(nrow(df_pred_female_hassles_within)))
df_pred_agem_hassles_within$order <- rev(seq_len(nrow(df_pred_agem_hassles_within)))
df_pred_region_hassles_within$order <- rev(seq_len(nrow(df_pred_region_hassles_within)))
df_pred_eventtype_hassles_within$order <- rev(seq_len(nrow(df_pred_eventtype_hassles_within)))
df_pred_eventmeasure_hassles_within$order <- rev(seq_len(nrow(df_pred_eventmeasure_hassles_within)))
df_pred_eventdata_hassles_within$order <- rev(seq_len(nrow(df_pred_eventdata_hassles_within)))
df_pred_swb_mods_hassles_within$order <- rev(seq_len(nrow(df_pred_swb_mods_hassles_within)))
df_pred_reliability_hassles_within$order <- rev(seq_len(nrow(df_pred_reliability_hassles_within)))
df_pred_design_mods_hassles_within$order <- rev(seq_len(nrow(df_pred_design_mods_hassles_within)))
df_pred_corr_mods_hassles_within$order <- rev(seq_len(nrow(df_pred_corr_mods_hassles_within)))

plot_pred_mod_hassles_within <- bind_rows(
  df_pred_year_hassles_within,
  df_pred_sampletype_hassles_within,
  df_pred_female_hassles_within,
  df_pred_agem_hassles_within,
  df_pred_region_hassles_within,
  df_pred_eventtype_hassles_within,
  df_pred_eventmeasure_hassles_within,
  df_pred_eventdata_hassles_within,
  df_pred_swb_mods_hassles_within,
  df_pred_reliability_hassles_within,
  df_pred_design_mods_hassles_within,
  df_pred_corr_mods_hassles_within
) %>%
  mutate(
    significance = if_else(
      (r.lb>0)&(r.ub>0) | (r.lb<0)&(r.ub<0),
      "significant",
      "non-significant"
    )
  )


# Order moderators
plot_pred_mod_hassles_within$moderator <- factor(
  plot_pred_mod_hassles_within$moderator,
  levels = rev(c("Publication year", "Sample type", "% Female", "Mean age", "Region", 
                 "Event type", "Event measurement", "Event operationalization", 
                 "SWB dimension", "SWB reliability", "Study design", "Correlation lag"))
)

# Order moderator categories and assign y-positions
plot_pred_mod_hassles_within <- plot_pred_mod_hassles_within %>%
  arrange(moderator, order) %>%
  mutate(
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ", round(r.ub, 3), "]",
      "<br>ES = ", k
    )
  )

# Compute x-axis limits
x_min <- min(plot_pred_mod_hassles_within$r.lb)
x_max <- max(plot_pred_mod_hassles_within$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

# Create plot
simple_slopes_hassles_within <-
  ggplot(
    plot_pred_mod_hassles_within,
    aes(
      x = r,
      y = moderator,
      group = interaction(moderator, order),
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.15,
    linewidth = 0.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = paste(moderator, label),
    ),
    size = 2.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad + x_range * 0.15
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  geom_text(
    aes(
      x = r.ub + right_pad,
      label = label
    ),
    hjust = 0,
    size = 3,
    position = position_dodge(width = 0.75),
    colour = "black"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_hassles_within,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Predictions for continuous moderators are estimated at the mean of the moderator, whereas predictions for categorical moderators are reported for each category. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Between-Person Associations

Regression Coefficient Table
# Sample Characteristics

sample_mods <- c("Female_c", "SampleType", "AgeM_c", "country_region")

sample_mod_hassles_between <- setNames(
  lapply(
    sample_mods,
    run_ma_mod,
    data = hassles_between,
    SamV = V_hassles_between
  ),
  sample_mods
)

sample_mod_results_hassles_between <- lapply(
  sample_mod_hassles_between,
  extract_mod_results,
  data = hassles_between,
  SamV = V_hassles_between
) %>%
  bind_rows(.id = "moderator")

# Publication Characteristics

pub_mods <- c("Year_c")

pub_mod_hassles_between <- setNames(
  lapply(
    pub_mods,
    run_ma_mod,
    data = hassles_between,
    SamV = V_hassles_between
  ),
  pub_mods
)

pub_mod_results_hassles_between <- lapply(
  pub_mod_hassles_between,
  extract_mod_results,
  data = hassles_between,
  SamV = V_hassles_between
) %>%
  bind_rows(.id = "moderator")

# Study-Design Characteristics

design_mods <- c("StudyDesign")

design_mod_hassles_between <- setNames(
  lapply(
    design_mods,
    run_ma_mod,
    data = hassles_between,
    SamV = V_hassles_between
  ),
  design_mods
)

design_mod_results_hassles_between <- lapply(
  design_mod_hassles_between,
  extract_mod_results,
  data = hassles_between,
  SamV = V_hassles_between
) %>%
  bind_rows(.id = "moderator")

# Assessment Characteristics

assess_mods <- c("DeDomainAll", "TypeDeMeasure", "DeDataType", 
                 "WbDimension", "WbReliability_c")

assess_mod_hassles_between <- setNames(
  lapply(
    assess_mods,
    run_ma_mod,
    data = hassles_between,
    SamV = V_hassles_between
  ),
  assess_mods
)

assess_mod_results_hassles_between <- lapply(
  assess_mod_hassles_between,
  extract_mod_results,
  data = hassles_between,
  SamV = V_hassles_between
) %>%
  bind_rows(.id = "moderator")

# Create table

mod_hassles_between_metric <- rbind(
  sample_mod_results_hassles_between, 
  pub_mod_results_hassles_between,
  design_mod_results_hassles_between,
  assess_mod_results_hassles_between) %>%
  filter(
    moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_hassles_between_categorical <- rbind(
  sample_mod_results_hassles_between, 
  pub_mod_results_hassles_between,
  design_mod_results_hassles_between,
  assess_mod_results_hassles_between) %>%
  filter(
    !moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c")
  )

mod_hassles_between <- rbind(
  mod_hassles_between_metric,
  mod_hassles_between_categorical
) %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

mod_hassles_between$R2_Level1 <- ifelse(mod_hassles_between$R2_Level1 < 0, 0, mod_hassles_between$R2_Level1)
mod_hassles_between$R2_Level2 <- ifelse(mod_hassles_between$R2_Level2 < 0, 0, mod_hassles_between$R2_Level2)
mod_hassles_between$R2_Total <- ifelse(mod_hassles_between$R2_Total < 0, 0, mod_hassles_between$R2_Total)

names(mod_hassles_between) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(mod_hassles_between) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                    "College", "Northern Europe", "Southern Europe", "Asia",
                                    "Australia", "ESM", "Work/Achievement", "Social", 
                                    "Health", "Other event",
                                    "Open-response", "Interview", "Numeric count", "Scale score",
                                    "Other type ", "Domain satisfaction", "Positive affect", "Negative affect",
                                    "Global well-being")

order_mod_hassles_between <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe", "Southern Europe", "Asia", "Australia",
  "Work/Achievement", "Social", "Health", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score", "Other type",
  "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being",
  "SWB reliability",
  "ESM"
)

mod_hassles_between <- mod_hassles_between[order_mod_hassles_between, ]

kable(round(mod_hassles_between, 3),
      caption = "**Results of Single-Moderator Analyses for the Between-Person Association Between Daily Hassles and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 8) %>%
  pack_rows("Daily event type", 9, 12) %>%
  pack_rows("Daily event measurement", 13, 14) %>%
  pack_rows("Daily event data type", 15, 17) %>%
  pack_rows("SWB dimension", 18, 21) %>%
  column_spec(c(3:6), bold = ifelse(mod_hassles_between[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 35: Results of Single-Moderator Analyses for the Between-Person Association Between Daily Hassles and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 627 -0.004 0.002 -2.464 0.018 0.044 0.002 87.057 4.766 91.823 0.302 16.134 1.270
College 627 0.011 0.022 0.515 0.608 0.044 0.003 85.770 6.170 91.940 0.326 0.000 0.000
% Female 625 0.000 0.000 -0.816 0.421 0.044 0.003 85.843 5.991 91.834 0.000 4.044 0.000
Mean age 616 0.001 0.001 0.778 0.440 0.045 0.003 86.270 5.737 92.008 0.000 3.573 0.000
Region
Northern Europe 531 -0.103 0.033 -3.095 0.004 0.046 0.003 87.577 5.034 92.611 1.270 17.162 2.288
Southern Europe 531 -0.124 0.153 -0.812 0.480 0.046 0.003 87.577 5.034 92.611 1.270 17.162 2.288
Asia 531 0.019 0.041 0.477 0.642 0.046 0.003 87.577 5.034 92.611 1.270 17.162 2.288
Australia 531 -0.139 0.039 -3.581 0.015 0.046 0.003 87.577 5.034 92.611 1.270 17.162 2.288
Daily event type
Work/Achievement 627 0.053 0.024 2.217 0.033 0.044 0.002 87.422 4.246 91.668 0.770 25.948 2.309
Social 627 0.065 0.021 3.069 0.003 0.044 0.002 87.422 4.246 91.668 0.770 25.948 2.309
Health 627 0.125 0.027 4.728 0.000 0.044 0.002 87.422 4.246 91.668 0.770 25.948 2.309
Other event 627 0.110 0.031 3.502 0.003 0.044 0.002 87.422 4.246 91.668 0.770 25.948 2.309
Daily event measurement
Open-response 618 0.007 0.041 0.161 0.876 0.045 0.003 86.281 5.665 91.946 0.000 0.000 0.000
Interview 618 0.044 0.076 0.583 0.594 0.045 0.003 86.281 5.665 91.946 0.000 0.000 0.000
Daily event data type
Numeric count 627 -0.001 0.031 -0.031 0.976 0.045 0.003 86.864 4.948 91.812 0.000 12.218 0.471
Scale score 627 -0.045 0.023 -1.909 0.060 0.045 0.003 86.864 4.948 91.812 0.000 12.218 0.471
Other type 627 -0.051 0.037 -1.361 0.313 0.045 0.003 86.864 4.948 91.812 0.000 12.218 0.471
SWB dimension
Domain satisfaction 627 -0.105 0.069 -1.527 0.158 0.018 0.011 54.196 33.575 87.771 58.372 0.000 36.702
Positive affect 627 0.029 0.039 0.744 0.473 0.018 0.011 54.196 33.575 87.771 58.372 0.000 36.702
Negative affect 627 -0.275 0.035 -7.916 0.000 0.018 0.011 54.196 33.575 87.771 58.372 0.000 36.702
Global well-being 627 -0.037 0.049 -0.753 0.475 0.018 0.011 54.196 33.575 87.771 58.372 0.000 36.702
SWB reliability 466 0.511 0.145 3.516 0.002 0.044 0.004 84.869 6.836 91.705 4.582 0.000 2.776
ESM 627 -0.021 0.026 -0.809 0.422 0.044 0.003 85.995 5.928 91.923 0.237 0.000 0.000

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
mod_hassles_between_plot <- rbind(
  mod_hassles_between_metric,
  mod_hassles_between_categorical
)

table_extract_mod_hassles_between <- mod_hassles_between_plot %>%
  select(b, ci.lb, ci.ub) %>%
  mutate(across(everything(), ~ round(.x, 2)))

mod_hassles_between_plot$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                      "College", "Northern Europe", "Southern Europe", "Asia", 
                                      "Australia", "ESM", "Work/Achievement", "Social", "Health",
                                      "Other event", "Open-response", "Interview", "Numeric count",
                                      "Scale score", "Other type", "Domain satisfaction", "Positive affect", 
                                      "Negative affect", "Global well-being")

mod_hassles_between_plot <- mod_hassles_between_plot %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Health", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score", "Other type") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Southern Europe", "Asia", "Australia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel %in% c("Thesis", "Unpublished") ~ "Publication type",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      moderator %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

mod_hassles_between_plot <- mod_hassles_between_plot %>%
  mutate(modcat = factor(modcat, levels = order_modcat_between)) %>%
  arrange(modcat)

mod_hassles_between_plot$modcat <- factor(
  mod_hassles_between_plot$modcat,
  levels = rev(unique(mod_hassles_between_plot$modcat))
)

mod_hassles_between_plot <- mod_hassles_between_plot %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_mod_hassles_between)))

# Compute x-axis limits
x_min <- min(mod_hassles_between_plot$ci.lb)
x_max <- max(mod_hassles_between_plot$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = mod_hassles_between_plot,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +
  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(mod_hassles_between_plot, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  scale_x_continuous(
  expand = expansion(mult = c(0.02, 0.20))
  ) +
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Predicted Correlations Plot
## Publication year

sd_year_hassles_between <- sd(hassles_between$Year_c, na.rm = TRUE)

pred_year_hassles_between <- predict(
  pub_mod_hassles_between$Year_c$robust,
  newmods = c(-sd_year_hassles_between, 0, sd_year_hassles_between)
)

df_pred_year_hassles_between <- transform(
  as.data.frame(pred_year_hassles_between),
  moderator = "Publication year",
  label = c(
    round(mean(hassles_between$Year, na.rm = TRUE) - sd_year_hassles_between, 2),
    round(mean(hassles_between$Year, na.rm = TRUE), 2),
    round(mean(hassles_between$Year, na.rm = TRUE) + sd_year_hassles_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = pub_mod_hassles_between$Year_c$robust$k
)

## Sample type

sampletype_cats_hassles_between <- data.frame(
  SampleType = factor(
    c("convenience", "college"),
    levels = c("convenience", "college")
  )
)

sampletype_mods_hassles_between <-
  model.matrix(~ SampleType, sampletype_cats_hassles_between)[, -1]

pred_sampletype_hassles_between <- predict(
  sample_mod_hassles_between$SampleType$robust,
  newmods = sampletype_mods_hassles_between
)

df_pred_sampletype_hassles_between <- transform(
  as.data.frame(pred_sampletype_hassles_between),
  moderator = "Sample type",
  label = c("Convenience", "College"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_between$SampleType$robust$k
)

df_pred_sampletype_hassles_between$label <- factor(
  df_pred_sampletype_hassles_between$label,
  levels = c("Convenience", "College")
)

## Percentage female

sd_female_hassles_between <- sd(hassles_between$Female_c, na.rm = TRUE)

pred_female_hassles_between <- predict(
  sample_mod_hassles_between$Female_c$robust,
  newmods = c(-sd_female_hassles_between, 0, sd_female_hassles_between)
)

df_pred_female_hassles_between <- transform(
  as.data.frame(pred_female_hassles_between),
  moderator = "% Female",
  label = c(
    paste0(round(mean(hassles_between$Female, na.rm = TRUE) - sd_female_hassles_between, 2), "%"),
    paste0(round(mean(hassles_between$Female, na.rm = TRUE), 2), "%"),
    paste0(round(mean(hassles_between$Female, na.rm = TRUE) +  sd_female_hassles_between, 2), "%")
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_between$Female_c$robust$k
)

## Mean age

sd_mean_age_hassles_between <- sd(hassles_between$AgeM_c, na.rm = TRUE)

pred_agem_hassles_between <- predict(
  sample_mod_hassles_between$AgeM_c$robust,
  newmods = c(- sd_mean_age_hassles_between, 0, + sd_mean_age_hassles_between)
)

df_pred_agem_hassles_between <- transform(
  as.data.frame(pred_agem_hassles_between),
  moderator = "Mean age",
  label = c(
    round(mean(hassles_between$AgeM, na.rm = TRUE) - sd_mean_age_hassles_between, 2),
    round(mean(hassles_between$AgeM, na.rm = TRUE), 2),
    round(mean(hassles_between$AgeM, na.rm = TRUE) + sd_mean_age_hassles_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_between$AgeM_c$robust$k
)

## Region

region_cats_hassles_between <- data.frame(
  country_region = factor(
    c("North America", "Northern Europe", "Southern Europe","Asia", "Australia"),
    levels = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia")
  )
)

region_mods_hassles_between <-
  model.matrix(~ country_region, region_cats_hassles_between)[, -1]

pred_region_hassles_between <- predict(
  sample_mod_hassles_between$country_region$robust,
  newmods = region_mods_hassles_between
)

df_pred_region_hassles_between <- transform(
  as.data.frame(pred_region_hassles_between),
  moderator = "Region",
  label = c("North America", "Northern Europe", "Southern Europe", "Asia", "Australia"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = sample_mod_hassles_between$country_region$robust$k
)

## Daily event type

eventtype_cats_hassles_between <- data.frame(
  DeDomainAll = factor(
    c("general", "work/achievement", "social", "health", "other"),
    levels = c("general", "work/achievement", "social", "health", "other"),
  )
)

eventtype_mods_hassles_between <-
  model.matrix(~ DeDomainAll, eventtype_cats_hassles_between)[, -1]

pred_eventtype_hassles_between <- predict(
  assess_mod_hassles_between$DeDomainAll$robust,
  newmods = eventtype_mods_hassles_between
)

df_pred_eventtype_hassles_between <- transform(
  as.data.frame(pred_eventtype_hassles_between),
  moderator = "Event type",
  label = c("General", "Work/Achievement", "Social", "Health", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_between$DeDomainAll$robust$k
)

## Daily event measurement

eventmeasure_cats_hassles_between <- data.frame(
  TypeDeMeasure = factor(
    c("checklist/questionnaire", "open_response", "interview"),
    levels = c("checklist/questionnaire", "open_response", "interview"),
  )
)

eventmeasure_mods_hassles_between <-
  model.matrix(~ TypeDeMeasure, eventmeasure_cats_hassles_between)[, -1]

pred_eventmeasure_hassles_between <- predict(
  assess_mod_hassles_between$TypeDeMeasure$robust,
  newmods = eventmeasure_mods_hassles_between
)

df_pred_eventmeasure_hassles_between <- transform(
  as.data.frame(pred_eventmeasure_hassles_between),
  moderator = "Event measurement",
  label = c("Checklist/Questionnaire", "Open-response", "Interview"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_between$TypeDeMeasure$robust$k
)

## Daily event operationalization

eventdata_cats_hassles_between <- data.frame(
  DeDataType = factor(
    c("dichotomous", "numeric_count", "scale_score", "other"),
    levels = c("dichotomous", "numeric_count", "scale_score", "other"),
  )
)

eventdata_mods_hassles_between <-
  model.matrix(~ DeDataType, eventdata_cats_hassles_between)[, -1]

pred_eventdata_hassles_between <- predict(
  assess_mod_hassles_between$DeDataType$robust,
  newmods = eventdata_mods_hassles_between
)

df_pred_eventdata_hassles_between <- transform(
  as.data.frame(pred_eventdata_hassles_between),
  moderator = "Event operationalization",
  label = c("Dichotomous", "Numeric count", "Scale score", "Other"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_between$DeDataType$robust$k
)

## SWB dimension

swb_cats_hassles_between <- data.frame(
  WbDimension = factor(
    c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being"),
    levels =c("life_satisfaction", "domain_satisfaction", "positive_affect", "negative_affect", "global_well-being"),
  )
)

swb_mods_hassles_between <- 
  model.matrix(~ WbDimension, data = swb_cats_hassles_within)[, -1]

pred_swb_mods_hassles_between <- predict(
  assess_mod_hassles_between$WbDimension$robust,
  newmods = swb_mods_hassles_between
  )

df_pred_swb_mods_hassles_between <- transform(
  as.data.frame(pred_swb_mods_hassles_between),
  moderator = "SWB dimension",
  label = c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_between$WbDimension$robust$k
)

## SWB reliability

sd_reliability_hassles_between <- sd(hassles_between$WbReliability_c, na.rm = TRUE)

pred_reliability_hassles_between <- predict(
  assess_mod_hassles_between$WbReliability_c$robust,
  newmods = c(- sd_reliability_hassles_between, 0, + sd_reliability_hassles_between)
)

df_pred_reliability_hassles_between <- transform(
  as.data.frame(pred_reliability_hassles_between),
  moderator = "SWB reliability",
  label = c(
    round(mean(hassles_between$WbReliability, na.rm = TRUE) - sd_reliability_hassles_between, 2),
    round(mean(hassles_between$WbReliability, na.rm = TRUE), 2),
    round(mean(hassles_between$WbReliability, na.rm = TRUE) + sd_reliability_hassles_between, 2)
  ),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = assess_mod_hassles_between$WbReliability$robust$k
)

## Study design

design_cats_hassles_between <- data.frame(
  StudyDesign = factor(
    c("daily_diary", "esm"),
    levels =c("daily_diary", "esm"),
  )
)

design_mods_hassles_between <- 
  model.matrix(~ StudyDesign, data = design_cats_hassles_between)[, -1]

pred_design_mods_hassles_between <- predict(
  design_mod_hassles_between$StudyDesign$robust,
  newmods = design_mods_hassles_between
  )

df_pred_design_mods_hassles_between <- transform(
  as.data.frame(pred_design_mods_hassles_between),
  moderator = "Study design",
  label = c("Daily diary", "Experience sampling"),
  r = tanh(pred),
  r.lb = tanh(ci.lb),
  r.ub = tanh(ci.ub),
  k = design_mod_hassles_between$StudyDesign$robust$k
  
)

## Create dataset for plot

df_pred_year_hassles_between$label <-
  as.character(df_pred_year_hassles_between$label)

df_pred_female_hassles_between$label <-
  as.character(df_pred_female_hassles_between$label)

df_pred_agem_hassles_between$label <-
  as.character(df_pred_agem_hassles_between$label)

df_pred_reliability_hassles_between$label <-
  as.character(df_pred_reliability_hassles_between$label)

df_pred_year_hassles_between$order <- rev(seq_len(nrow(df_pred_year_hassles_between)))
df_pred_sampletype_hassles_between$order <- rev(seq_len(nrow(df_pred_sampletype_hassles_between)))
df_pred_female_hassles_between$order <- rev(seq_len(nrow(df_pred_female_hassles_between)))
df_pred_agem_hassles_between$order <- rev(seq_len(nrow(df_pred_agem_hassles_between)))
df_pred_region_hassles_between$order <- rev(seq_len(nrow(df_pred_region_hassles_between)))
df_pred_eventtype_hassles_between$order <- rev(seq_len(nrow(df_pred_eventtype_hassles_between)))
df_pred_eventmeasure_hassles_between$order <- rev(seq_len(nrow(df_pred_eventmeasure_hassles_between)))
df_pred_eventdata_hassles_between$order <- rev(seq_len(nrow(df_pred_eventdata_hassles_between)))
df_pred_swb_mods_hassles_between$order <- rev(seq_len(nrow(df_pred_swb_mods_hassles_between)))
df_pred_reliability_hassles_between$order <- rev(seq_len(nrow(df_pred_reliability_hassles_between)))
df_pred_design_mods_hassles_between$order <- rev(seq_len(nrow(df_pred_design_mods_hassles_between)))

plot_pred_mod_hassles_between <- bind_rows(
  df_pred_year_hassles_between,
  df_pred_sampletype_hassles_between,
  df_pred_female_hassles_between,
  df_pred_agem_hassles_between,
  df_pred_region_hassles_between,
  df_pred_eventtype_hassles_between,
  df_pred_eventmeasure_hassles_between,
  df_pred_eventdata_hassles_between,
  df_pred_swb_mods_hassles_between,
  df_pred_reliability_hassles_between,
  df_pred_design_mods_hassles_between
) %>%
  mutate(
    significance = if_else(
      (r.lb>0)&(r.ub>0) | (r.lb<0)&(r.ub<0),
      "significant",
      "non-significant"
    )
  )

# Order moderators
plot_pred_mod_hassles_between$moderator <- factor(
  plot_pred_mod_hassles_between$moderator,
  levels = rev(c("Publication year", "Sample type", "% Female", "Mean age", "Region", 
                 "Event type", "Event measurement", "Event operationalization", 
                 "SWB dimension", "SWB reliability", "Study design"))
)

# Order moderator categories and assign y-positions
plot_pred_mod_hassles_between <- plot_pred_mod_hassles_between %>%
  arrange(moderator, order) %>%
  mutate(
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ", round(r.ub, 3), "]",
      "<br>ES = ", k
    )
  )

# Compute x-axis limits
x_min <- min(plot_pred_mod_hassles_between$r.lb)
x_max <- max(plot_pred_mod_hassles_between$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

# Create plot
simple_slopes_hassles_between <-
  ggplot(
    plot_pred_mod_hassles_between,
    aes(
      x = r,
      y = moderator,
      group = interaction(moderator, order),
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.15,
    linewidth = 0.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = paste(moderator, label),
    ),
    size = 2.5,
    position = position_dodge(width = 0.75)
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad + x_range * 0.15
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  geom_text(
    aes(
      x = r.ub + right_pad,
      label = label
    ),
    hjust = 0,
    size = 3,
    position = position_dodge(width = 0.75),
    colour = "black"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_hassles_between,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Predictions for continuous moderators are estimated at the mean of the moderator, whereas predictions for categorical moderators are reported for each category. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Single-Moderator Comparisons

# Preparation steps

# Extend function for moderator analysis created earliert to easily swap the reference category

run_ma_mod_ref <- function(mod, data, SamV, ref = NULL) {

  data2 <- data

  if (!is.null(ref)) {
    data2[[mod]] <- relevel(droplevels(data2[[mod]]), ref = ref)
  }

  run_ma_mod(mod = mod,
             data = data2,
             SamV = SamV)
}

# Create function to prepare tables

prepare_mod_table <- function(tbl, moderator) {

  rownames(tbl) <- sub(
    paste0("^", moderator),
    "",
    rownames(tbl)
  )

  tbl <- tbl %>%
    mutate(
      across(where(is.numeric), ~ round(.x, 3)),
      across(c(R2_Level1, R2_Level2, R2_Total), ~ pmax(.x, 0))
    ) %>%
    select(
      k, b, se, z, p,
      I2_Level1, I2_Level2, I2_Total,
      R2_Level1, R2_Level2, R2_Total
    )

  names(tbl) <- c(
    "ES", "*b*", "*SE*", "*t*", "*p*",
    "*I*^2^~Level1~", "*I*^2^~Level2~", "*I*^2^~Total~",
    "R^2^~Level1~", "R^2^~Level2~", "R^2^~Total~"
  )

  tbl
}

Uplifts & SWB

Within-Person Associations

Region
# Run moderator analysis with all possible reference levels
refs_region_uplifts_within <- c("North America",
                                "Northern Europe",
                                "Asia")

res_region_uplifts_within <- lapply(refs_region_uplifts_within, function(ref) {
  run_ma_mod_ref(
    mod = "country_region",
    data = uplifts_within,
    SamV = V_uplifts_within,
    ref = ref
  )
})

names(res_region_uplifts_within) <- refs_region_uplifts_within

# Extract results for all reference levels
tables_region_uplifts_within <- lapply(
  names(res_region_uplifts_within),
  function(ref) {
    extract_mod_results(
      res_region_uplifts_within[[ref]],
      uplifts_within,
      V_uplifts_within
    )
  }
)

names(tables_region_uplifts_within) <- names(res_region_uplifts_within)
Reference: North America
tbl_region_na_uplifts_within <- prepare_mod_table(
  tables_region_uplifts_within[["North America"]],
  moderator = "country_region"
)

rownames(tbl_region_na_uplifts_within) <- c("Northern Europe", "Asia")

    kable(
     tbl_region_na_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: North America)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_na_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 36: Moderator Analysis for Region (Reference: North America)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Northern Europe 278 0.065 0.043 1.506 0.185 97.038 2.007 99.045 2.496 0 0.479
Asia 278 -0.002 0.018 -0.092 0.941 97.038 2.007 99.045 2.496 0 0.479
Reference: Northern Europe
tbl_region_ne_uplifts_within <- prepare_mod_table(
  tables_region_uplifts_within[["Northern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_ne_uplifts_within) <- c("North America", "Asia")

    kable(
     tbl_region_ne_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Northern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_ne_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 37: Moderator Analysis for Region (Reference: Northern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 278 -0.065 0.043 -1.506 0.185 97.038 2.007 99.045 2.496 0 0.479
Asia 278 -0.067 0.046 -1.443 0.314 97.038 2.007 99.045 2.496 0 0.479
Reference: Asia
tbl_region_asia_uplifts_within <- prepare_mod_table(
  tables_region_uplifts_within[["Asia"]],
  moderator = "country_region"
)

rownames(tbl_region_asia_uplifts_within) <- c("North America", "Northern Europe")

    kable(
     tbl_region_asia_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Asia)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_asia_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 38: Moderator Analysis for Region (Reference: Asia)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 278 0.002 0.018 0.092 0.941 97.038 2.007 99.045 2.496 0 0.479
Northern Europe 278 0.067 0.046 1.443 0.314 97.038 2.007 99.045 2.496 0 0.479
Event Type
# Run moderator analysis with all possible reference levels
refs_detype_uplifts_within <- c("general",
                 "work/achievement",
                 "social",
                 "other")

res_detype_uplifts_within <- lapply(refs_detype_uplifts_within, function(ref) {
  run_ma_mod_ref(
    mod = "DeDomainAll",
    data = uplifts_within,
    SamV = V_uplifts_within,
    ref = ref
  )
})

names(res_detype_uplifts_within) <- refs_detype_uplifts_within

# Extract results for all reference levels
tables_detype_uplifts_within <- lapply(
  names(res_detype_uplifts_within),
  function(ref) {
    extract_mod_results(
      res_detype_uplifts_within[[ref]],
      uplifts_within,
      V_uplifts_within
    )
  }
)

names(tables_detype_uplifts_within) <- names(res_detype_uplifts_within)
Reference: General
tbl_detype_gen_uplifts_within <- prepare_mod_table(
  tables_detype_uplifts_within[["general"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_gen_uplifts_within) <- c("Work/Achievement", "Social", "Other")

    kable(
     tbl_detype_gen_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: General)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_gen_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 39: Moderator Analysis for Event Type (Reference: General)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Work/Achievement 304 -0.091 0.038 -2.397 0.024 63.714 35.659 99.373 11.746 0 0
Social 304 0.014 0.037 0.387 0.702 63.714 35.659 99.373 11.746 0 0
Other 304 -0.112 0.024 -4.721 0.103 63.714 35.659 99.373 11.746 0 0
Reference: Work/Achievement
tbl_detype_wa_uplifts_within <- prepare_mod_table(
  tables_detype_uplifts_within[["work/achievement"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_wa_uplifts_within) <- c("General", "Social", "Other")

    kable(
     tbl_detype_wa_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Work/Achievement)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_wa_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 40: Moderator Analysis for Event Type (Reference: Work/Achievement)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 304 0.091 0.038 2.397 0.024 63.714 35.659 99.373 11.746 0 0
Social 304 0.105 0.036 2.927 0.026 63.714 35.659 99.373 11.746 0 0
Other 304 -0.021 0.038 -0.545 0.671 63.714 35.659 99.373 11.746 0 0
Reference: Social
tbl_detype_soc_uplifts_within <- prepare_mod_table(
  tables_detype_uplifts_within[["social"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_soc_uplifts_within) <- c("General", "Work/Achievement", "Other")

    kable(
     tbl_detype_soc_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Social)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_soc_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 41: Moderator Analysis for Event Type (Reference: Social)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 304 -0.014 0.037 -0.387 0.702 63.714 35.659 99.373 11.746 0 0
Work/Achievement 304 -0.105 0.036 -2.927 0.026 63.714 35.659 99.373 11.746 0 0
Other 304 -0.126 0.036 -3.528 0.144 63.714 35.659 99.373 11.746 0 0
Reference: Other
tbl_detype_oth_uplifts_within <- prepare_mod_table(
  tables_detype_uplifts_within[["other"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_oth_uplifts_within) <- c("General", "Work/Achievement", "Social")

    kable(
     tbl_detype_oth_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 42: Moderator Analysis for Event Type (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 304 0.112 0.024 4.721 0.103 63.714 35.659 99.373 11.746 0 0
Work/Achievement 304 0.021 0.038 0.545 0.671 63.714 35.659 99.373 11.746 0 0
Social 304 0.126 0.036 3.528 0.144 63.714 35.659 99.373 11.746 0 0
Event Measurement
# Run moderator analysis with all possible reference levels
refs_demeas_uplifts_within <- c("checklist/questionnaire",
                                 "open_response",
                                  "interview")

res_demeas_uplifts_within <- lapply(refs_demeas_uplifts_within, function(ref) {
  run_ma_mod_ref(
    mod = "TypeDeMeasure",
    data = uplifts_within,
    SamV = V_uplifts_within,
    ref = ref
  )
})

names(res_demeas_uplifts_within) <- refs_demeas_uplifts_within

# Extract results for all reference levels
tables_demeas_uplifts_within <- lapply(
  names(res_demeas_uplifts_within),
  function(ref) {
    extract_mod_results(
      res_demeas_uplifts_within[[ref]],
      uplifts_within,
      V_uplifts_within
    )
  }
)

names(tables_demeas_uplifts_within) <- names(res_demeas_uplifts_within)
Reference: Checklist/Questionnaire
tbl_demeas_check_uplifts_within <- prepare_mod_table(
  tables_demeas_uplifts_within[["checklist/questionnaire"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_check_uplifts_within) <- c("Open-response", "Interview")

    kable(
     tbl_demeas_check_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_check_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 43: Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Open-response 304 0.049 0.106 0.461 0.673 81.318 17.977 99.295 0 11.373 1.931
Interview 304 -0.097 0.026 -3.687 0.031 81.318 17.977 99.295 0 11.373 1.931
Reference: Open-Response
tbl_demeas_opem_uplifts_within <- prepare_mod_table(
  tables_demeas_uplifts_within[["open_response"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_opem_uplifts_within) <- c("Checklist/Questionnaire", "Interview")

    kable(
     tbl_demeas_opem_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Open-Response)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_opem_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 44: Moderator Analysis for Event Measurement (Reference: Open-Response)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 304 -0.049 0.106 -0.461 0.673 81.318 17.977 99.295 0 11.373 1.931
Interview 304 -0.146 0.107 -1.369 0.224 81.318 17.977 99.295 0 11.373 1.931
Reference: Interview
tbl_demeas_int_uplifts_within <- prepare_mod_table(
  tables_demeas_uplifts_within[["interview"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_int_uplifts_within) <- c("Checklist/Questionnaire", "Open-response")

    kable(
     tbl_demeas_int_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Interview)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_int_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 45: Moderator Analysis for Event Measurement (Reference: Interview)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 304 0.097 0.026 3.687 0.031 81.318 17.977 99.295 0 11.373 1.931
Open-response 304 0.146 0.107 1.369 0.224 81.318 17.977 99.295 0 11.373 1.931
Event Operationalization
# Run moderator analysis with all possible reference levels
refs_deop_uplifts_within <- c("dichotomous",
               "numeric_count",
               "scale_score")

res_deop_uplifts_within <- lapply(refs_deop_uplifts_within, function(ref) {
  run_ma_mod_ref(
    mod = "DeDataType",
    data = uplifts_within,
    SamV = V_uplifts_within,
    ref = ref
  )
})

names(res_deop_uplifts_within) <- refs_deop_uplifts_within

# Extract results for all reference levels
tables_deop_uplifts_within <- lapply(
  names(res_deop_uplifts_within),
  function(ref) {
    extract_mod_results(
      res_deop_uplifts_within[[ref]],
      uplifts_within,
      V_uplifts_within
    )
  }
)

names(tables_deop_uplifts_within) <- names(res_deop_uplifts_within)
Reference: Dichotomous
tbl_deop_dic_uplifts_within <- prepare_mod_table(
  tables_deop_uplifts_within[["dichotomous"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_dic_uplifts_within) <- c("Numeric count", "Scale score")

    kable(
     tbl_deop_dic_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Dichotomous)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_dic_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 46: Moderator Analysis for Event Operationalization (Reference: Dichotomous)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Numeric count 301 0.078 0.033 2.347 0.040 99.153 0 99.153 2.904 59.143 2.904
Scale score 301 0.078 0.019 4.022 0.001 99.153 0 99.153 2.904 59.143 2.904
Reference: Numeric Count
tbl_deop_num_uplifts_within <- prepare_mod_table(
  tables_deop_uplifts_within[["numeric_count"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_num_uplifts_within) <- c("Dichotomous", "Scale score")

    kable(
     tbl_deop_num_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Numeric Count)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_num_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 47: Moderator Analysis for Event Operationalization (Reference: Numeric Count)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 301 -0.078 0.033 -2.347 0.040 99.153 0 99.153 2.904 59.116 2.904
Scale score 301 0.000 0.031 -0.010 0.993 99.153 0 99.153 2.904 59.116 2.904
Reference: Scale Score
tbl_detype_scal_uplifts_within <- prepare_mod_table(
  tables_deop_uplifts_within[["scale_score"]],
  moderator = "DeDataType"
)

rownames(tbl_detype_scal_uplifts_within) <- c("Dichotomous", "Numeric count")

    kable(
     tbl_detype_scal_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Scale Score)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_scal_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 48: Moderator Analysis for Event Operationalization (Reference: Scale Score)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 301 -0.078 0.019 -4.022 0.001 99.153 0 99.153 2.904 59.147 2.904
Numeric count 301 0.000 0.031 0.010 0.993 99.153 0 99.153 2.904 59.147 2.904
SWB Dimension
# Run moderator analysis with all possible reference levels
refs_swb_uplifts_within <- c("life_satisfaction",
              "domain_satisfaction",
              "positive_affect",
              "negative_affect")

res_swb_uplifts_within <- lapply(refs_swb_uplifts_within, function(ref) {
  run_ma_mod_ref(
    mod = "WbDimension",
    data = uplifts_within,
    SamV = V_uplifts_within,
    ref = ref
  )
})

names(res_swb_uplifts_within) <- refs_swb_uplifts_within

# Extract results for all reference levels
tables_swb_uplifts_within <- lapply(
  names(res_swb_uplifts_within),
  function(ref) {
    extract_mod_results(
      res_swb_uplifts_within[[ref]],
      uplifts_within,
      V_uplifts_within
    )
  }
)

names(tables_swb_uplifts_within) <- names(res_swb_uplifts_within)
Reference: Life Satisfaction
tbl_swb_ls_uplifts_within <- prepare_mod_table(
  tables_swb_uplifts_within[["life_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ls_uplifts_within) <- c("Domain satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_ls_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ls_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 49: Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Domain satisfaction 300 0.023 0.057 0.415 0.693 73.618 25.634 99.252 13.326 0 8.107
Positive affect 300 0.068 0.041 1.654 0.162 73.618 25.634 99.252 13.326 0 8.107
Negative affect 300 -0.058 0.040 -1.430 0.215 73.618 25.634 99.252 13.326 0 8.107
Reference: Domain Satisfaction
tbl_swb_ds_uplifts_within <- prepare_mod_table(
  tables_swb_uplifts_within[["domain_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ds_uplifts_within) <- c("Life satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_ds_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ds_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 50: Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 300 -0.023 0.057 -0.415 0.693 73.618 25.634 99.252 13.326 0 8.107
Positive affect 300 0.044 0.044 1.016 0.365 73.618 25.634 99.252 13.326 0 8.107
Negative affect 300 -0.081 0.042 -1.920 0.124 73.618 25.634 99.252 13.326 0 8.107
Reference: Positive Affect
tbl_swb_pa_uplifts_within <- prepare_mod_table(
  tables_swb_uplifts_within[["positive_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_pa_uplifts_within) <- c("Life satisfaction", "Domain satisfaction", "Negative affect")

    kable(
     tbl_swb_pa_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Positive Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_pa_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 51: Moderator Analysis for SWB Dimension (Reference: Positive Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 300 -0.068 0.041 -1.654 0.162 73.618 25.634 99.252 13.326 0 8.107
Domain satisfaction 300 -0.044 0.044 -1.016 0.365 73.618 25.634 99.252 13.326 0 8.107
Negative affect 300 -0.125 0.013 -9.565 0.000 73.618 25.634 99.252 13.326 0 8.107
Reference: Negative Affect
tbl_swb_na_uplifts_within <- prepare_mod_table(
  tables_swb_uplifts_within[["negative_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_na_uplifts_within) <- c("Life satisfaction", "Domain satisfaction", "Positive affect")

    kable(
     tbl_swb_na_uplifts_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Negative Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_na_uplifts_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 52: Moderator Analysis for SWB Dimension (Reference: Negative Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 300 0.058 0.040 1.430 0.215 73.618 25.634 99.252 13.326 0 8.107
Domain satisfaction 300 0.081 0.042 1.920 0.124 73.618 25.634 99.252 13.326 0 8.107
Positive affect 300 0.125 0.013 9.565 0.000 73.618 25.634 99.252 13.326 0 8.107

Between-Person Associations

Region
# Run moderator analysis with all possible reference levels
refs_region_uplifts_between <- c("North America",
                 "Northern Europe",
                 "Asia")

res_region_uplifts_between <- lapply(refs_region_uplifts_between, function(ref) {
  run_ma_mod_ref(
    mod = "country_region",
    data = uplifts_between,
    SamV = V_uplifts_between,
    ref = ref
  )
})

names(res_region_uplifts_between) <- refs_region_uplifts_between

# Extract results for all reference levels
tables_region_uplifts_between <- lapply(
  names(res_region_uplifts_between),
  function(ref) {
    extract_mod_results(
      res_region_uplifts_between[[ref]],
      uplifts_between,
      V_uplifts_between
    )
  }
)

names(tables_region_uplifts_between) <- names(res_region_uplifts_between)
Reference: North America
tbl_region_na_uplifts_between <- prepare_mod_table(
  tables_region_uplifts_between[["North America"]],
  moderator = "country_region"
)

rownames(tbl_region_na_uplifts_between) <- c("Northern Europe", "Asia")

    kable(
     tbl_region_na_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: North America)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_na_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 53: Moderator Analysis for Region (Reference: North America)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Northern Europe 228 0.067 0.042 1.592 0.141 94.15 0 94.15 0.405 19.497 0.405
Asia 228 -0.060 0.057 -1.053 0.381 94.15 0 94.15 0.405 19.497 0.405
Reference: Northern Europe
tbl_region_ne_uplifts_between <- prepare_mod_table(
  tables_region_uplifts_between[["Northern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_ne_uplifts_between) <- c("North America", "Asia")

    kable(
     tbl_region_ne_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Northern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_ne_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 54: Moderator Analysis for Region (Reference: Northern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 228 -0.067 0.042 -1.592 0.141 94.15 0 94.15 0.405 19.478 0.405
Asia 228 -0.127 0.065 -1.951 0.108 94.15 0 94.15 0.405 19.478 0.405
Reference: Asia
tbl_region_asia_uplifts_between <- prepare_mod_table(
  tables_region_uplifts_between[["Asia"]],
  moderator = "country_region"
)

rownames(tbl_region_asia_uplifts_between) <- c("North America", "Northern Europe")

    kable(
     tbl_region_asia_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Asia)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_asia_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 55: Moderator Analysis for Region (Reference: Asia)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 228 0.060 0.057 1.053 0.381 94.15 0 94.15 0.405 19.395 0.405
Northern Europe 228 0.127 0.065 1.951 0.108 94.15 0 94.15 0.405 19.395 0.405
Event Type
# Run moderator analysis with all possible reference levels
refs_detype_uplifts_between <- c("general",
                 "work/achievement",
                 "social",
                 "other")

res_detype_uplifts_between <- lapply(refs_detype_uplifts_between, function(ref) {
  run_ma_mod_ref(
    mod = "DeDomainAll",
    data = uplifts_between,
    SamV = V_uplifts_between,
    ref = ref
  )
})

names(res_detype_uplifts_between) <- refs_detype_uplifts_between

# Extract results for all reference levels
tables_detype_uplifts_between <- lapply(
  names(res_detype_uplifts_between),
  function(ref) {
    extract_mod_results(
      res_detype_uplifts_between[[ref]],
      uplifts_between,
      V_uplifts_between
    )
  }
)

names(tables_detype_uplifts_between) <- names(res_detype_uplifts_between)
Reference: General
tbl_detype_gen_uplifts_between <- prepare_mod_table(
  tables_detype_uplifts_between[["general"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_gen_uplifts_between) <- c("Work/Achievement", "Social", "Other")

    kable(
     tbl_detype_gen_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: General)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_gen_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 56: Moderator Analysis for Event Type (Reference: General)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Work/Achievement 270 -0.044 0.045 -0.984 0.332 93.473 0 93.473 0.327 0 0.327
Social 270 -0.035 0.043 -0.821 0.416 93.473 0 93.473 0.327 0 0.327
Other 270 -0.167 0.064 -2.630 0.095 93.473 0 93.473 0.327 0 0.327
Reference: Work/Achievement
tbl_detype_wa_uplifts_between <- prepare_mod_table(
  tables_detype_uplifts_between[["work/achievement"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_wa_uplifts_between) <- c("General", "Social", "Other")

    kable(
     tbl_detype_wa_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Work/Achievement)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_wa_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 57: Moderator Analysis for Event Type (Reference: Work/Achievement)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 270 0.044 0.045 0.984 0.332 93.473 0 93.473 0.327 0 0.327
Social 270 0.009 0.043 0.198 0.845 93.473 0 93.473 0.327 0 0.327
Other 270 -0.123 0.059 -2.105 0.143 93.473 0 93.473 0.327 0 0.327
Reference: Social
tbl_detype_soc_uplifts_between <- prepare_mod_table(
  tables_detype_uplifts_between[["social"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_soc_uplifts_between) <- c("General", "Work/Achievement", "Other")

    kable(
     tbl_detype_soc_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Social)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_soc_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 58: Moderator Analysis for Event Type (Reference: Social)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 270 0.035 0.043 0.821 0.416 93.473 0 93.473 0.327 0 0.327
Work/Achievement 270 -0.009 0.043 -0.198 0.845 93.473 0 93.473 0.327 0 0.327
Other 270 -0.132 0.057 -2.301 0.129 93.473 0 93.473 0.327 0 0.327
Reference: Other
tbl_detype_oth_uplifts_between <- prepare_mod_table(
  tables_detype_uplifts_between[["other"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_oth_uplifts_between) <- c("General", "Work/Achievement", "Social")

    kable(
     tbl_detype_oth_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 59: Moderator Analysis for Event Type (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 270 0.167 0.064 2.630 0.095 93.473 0 93.473 0.327 0 0.327
Work/Achievement 270 0.123 0.059 2.105 0.143 93.473 0 93.473 0.327 0 0.327
Social 270 0.132 0.057 2.301 0.129 93.473 0 93.473 0.327 0 0.327
Event Measurement
# Run moderator analysis with all possible reference levels
refs_demeas_uplifts_between <- c("checklist/questionnaire",
                                 "open_response",
                                  "interview")

res_demeas_uplifts_between <- lapply(refs_demeas_uplifts_between, function(ref) {
  run_ma_mod_ref(
    mod = "TypeDeMeasure",
    data = uplifts_between,
    SamV = V_uplifts_between,
    ref = ref
  )
})

names(res_demeas_uplifts_between) <- refs_demeas_uplifts_between

# Extract results for all reference levels
tables_demeas_uplifts_between <- lapply(
  names(res_demeas_uplifts_between),
  function(ref) {
    extract_mod_results(
      res_demeas_uplifts_between[[ref]],
      uplifts_between,
      V_uplifts_between
    )
  }
)

names(tables_demeas_uplifts_between) <- names(res_demeas_uplifts_between)
Reference: Checklist/Questionnaire
tbl_demeas_check_uplifts_between <- prepare_mod_table(
  tables_demeas_uplifts_between[["checklist/questionnaire"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_check_uplifts_between) <- c("Open-response", "Interview")

    kable(
     tbl_demeas_check_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_check_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 60: Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Open-response 267 -0.073 0.072 -1.007 0.37 93.434 0 93.434 1.508 0 1.508
Interview 267 -0.214 0.030 -7.005 0.02 93.434 0 93.434 1.508 0 1.508
Reference: Open-Response
tbl_demeas_opem_uplifts_between <- prepare_mod_table(
  tables_demeas_uplifts_between[["open_response"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_opem_uplifts_between) <- c("Checklist/Questionnaire", "Interview")

    kable(
     tbl_demeas_opem_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Open-Response)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_opem_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 61: Moderator Analysis for Event Measurement (Reference: Open-Response)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 267 0.073 0.072 1.007 0.370 93.434 0 93.434 1.508 0 1.508
Interview 267 -0.141 0.075 -1.870 0.135 93.434 0 93.434 1.508 0 1.508
Reference: Interview
tbl_demeas_int_uplifts_between <- prepare_mod_table(
  tables_demeas_uplifts_between[["interview"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_int_uplifts_between) <- c("Checklist/Questionnaire", "Open-response")

    kable(
     tbl_demeas_int_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Interview)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_int_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 62: Moderator Analysis for Event Measurement (Reference: Interview)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 267 0.214 0.030 7.005 0.020 93.434 0 93.434 1.508 0 1.508
Open-response 267 0.141 0.075 1.870 0.135 93.434 0 93.434 1.508 0 1.508
Event Operationalization
# Run moderator analysis with all possible reference levels
refs_deop_uplifts_between <- c("dichotomous",
               "numeric_count",
               "scale_score",
               "other")

res_deop_uplifts_between <- lapply(refs_deop_uplifts_between, function(ref) {
  run_ma_mod_ref(
    mod = "DeDataType",
    data = uplifts_between,
    SamV = V_uplifts_between,
    ref = ref
  )
})

names(res_deop_uplifts_between) <- refs_deop_uplifts_between

# Extract results for all reference levels
tables_deop_uplifts_between <- lapply(
  names(res_deop_uplifts_between),
  function(ref) {
    extract_mod_results(
      res_deop_uplifts_between[[ref]],
      uplifts_between,
      V_uplifts_between
    )
  }
)

names(tables_deop_uplifts_between) <- names(res_deop_uplifts_between)
Reference: Dichotomous
tbl_deop_dic_uplifts_between <- prepare_mod_table(
  tables_deop_uplifts_between[["dichotomous"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_dic_uplifts_between) <- c("Numeric count", "Scale score", "Other")

    kable(
     tbl_deop_dic_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Dichotomous)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_dic_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 63: Moderator Analysis for Event Operationalization (Reference: Dichotomous)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Numeric count 269 0.125 0.052 2.417 0.024 93.308 0 93.308 2.797 17.169 2.797
Scale score 269 0.097 0.030 3.238 0.003 93.308 0 93.308 2.797 17.169 2.797
Other 269 0.308 0.176 1.755 0.175 93.308 0 93.308 2.797 17.169 2.797
Reference: Numeric Count
tbl_deop_num_uplifts_between <- prepare_mod_table(
  tables_deop_uplifts_between[["numeric_count"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_num_uplifts_between) <- c("Dichotomous", "Scale score", "Other")

    kable(
     tbl_deop_num_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Numeric Count)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_num_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 64: Moderator Analysis for Event Operationalization (Reference: Numeric Count)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 269 -0.125 0.052 -2.417 0.024 93.308 0 93.308 2.797 17.167 2.797
Scale score 269 -0.028 0.048 -0.585 0.567 93.308 0 93.308 2.797 17.167 2.797
Other 269 0.184 0.180 1.019 0.378 93.308 0 93.308 2.797 17.167 2.797
Reference: Scale Score
tbl_deop_scal_uplifts_between <- prepare_mod_table(
  tables_deop_uplifts_between[["scale_score"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_scal_uplifts_between) <- c("Dichotomous", "Numeric count", "Other")

    kable(
     tbl_deop_scal_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Scale Score)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_scal_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 65: Moderator Analysis for Event Operationalization (Reference: Scale Score)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 269 -0.097 0.030 -3.238 0.003 93.308 0 93.308 2.797 17.167 2.797
Numeric count 269 0.028 0.048 0.585 0.567 93.308 0 93.308 2.797 17.167 2.797
Other 269 0.212 0.175 1.210 0.319 93.308 0 93.308 2.797 17.167 2.797
Reference: Other
tbl_detype_oth_uplifts_between <- prepare_mod_table(
  tables_deop_uplifts_between[["other"]],
  moderator = "DeDataType"
)

rownames(tbl_detype_oth_uplifts_between) <- c("Dichotomous", "Numeric Count" ,"Scale score")

    kable(
     tbl_detype_oth_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 66: Moderator Analysis for Event Operationalization (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 269 -0.308 0.176 -1.755 0.175 93.308 0 93.308 2.797 17.166 2.797
Numeric Count 269 -0.184 0.180 -1.019 0.378 93.308 0 93.308 2.797 17.166 2.797
Scale score 269 -0.212 0.175 -1.210 0.319 93.308 0 93.308 2.797 17.166 2.797
SWB Dimension
# Run moderator analysis with all possible reference levels
refs_swb_uplifts_between <- c("life_satisfaction",
              "domain_satisfaction",
              "positive_affect",
              "negative_affect")

res_swb_uplifts_between <- lapply(refs_swb_uplifts_between, function(ref) {
  run_ma_mod_ref(
    mod = "WbDimension",
    data = uplifts_between,
    SamV = V_uplifts_between,
    ref = ref
  )
})

names(res_swb_uplifts_between) <- refs_swb_uplifts_between

# Extract results for all reference levels
tables_swb_uplifts_between <- lapply(
  names(res_swb_uplifts_between),
  function(ref) {
    extract_mod_results(
      res_swb_uplifts_between[[ref]],
      uplifts_between,
      V_uplifts_between
    )
  }
)

names(tables_swb_uplifts_between) <- names(res_swb_uplifts_between)
Reference: Life Satisfaction
tbl_swb_ls_uplifts_between <- prepare_mod_table(
  tables_swb_uplifts_between[["life_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ls_uplifts_between) <- c("Domain satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_ls_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ls_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 67: Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Domain satisfaction 267 0.043 0.126 0.341 0.743 64.843 25.947 90.79 51.161 0 31.618
Positive affect 267 0.080 0.079 1.012 0.341 64.843 25.947 90.79 51.161 0 31.618
Negative affect 267 -0.256 0.096 -2.663 0.029 64.843 25.947 90.79 51.161 0 31.618
Reference: Domain Satisfaction
tbl_swb_ds_uplifts_between <- prepare_mod_table(
  tables_swb_uplifts_between[["domain_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ds_uplifts_between) <- c("Life satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_ds_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ds_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 68: Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 267 -0.043 0.126 -0.341 0.743 64.843 25.947 90.79 51.161 0 31.618
Positive affect 267 0.037 0.099 0.370 0.727 64.843 25.947 90.79 51.161 0 31.618
Negative affect 267 -0.299 0.101 -2.956 0.032 64.843 25.947 90.79 51.161 0 31.618
Reference: Positive Affect
tbl_swb_pa_uplifts_between <- prepare_mod_table(
  tables_swb_uplifts_between[["positive_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_pa_uplifts_between) <- c("Life satisfaction", "Domain satisfaction", "Negative affect")

    kable(
     tbl_swb_pa_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Positive Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_pa_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 69: Moderator Analysis for SWB Dimension (Reference: Positive Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 267 -0.080 0.079 -1.012 0.341 64.843 25.947 90.79 51.161 0 31.618
Domain satisfaction 267 -0.037 0.099 -0.370 0.727 64.843 25.947 90.79 51.161 0 31.618
Negative affect 267 -0.335 0.039 -8.678 0.000 64.843 25.947 90.79 51.161 0 31.618
Reference: Negative Affect
tbl_swb_na_uplifts_between <- prepare_mod_table(
  tables_swb_uplifts_between[["negative_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_na_uplifts_between) <- c("Life satisfaction", "Domain satisfaction", "Positive affect")

    kable(
     tbl_swb_na_uplifts_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Negative Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_na_uplifts_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 70: Moderator Analysis for SWB Dimension (Reference: Negative Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 267 0.256 0.096 2.663 0.029 64.843 25.947 90.79 51.161 0 31.618
Domain satisfaction 267 0.299 0.101 2.956 0.032 64.843 25.947 90.79 51.161 0 31.618
Positive affect 267 0.335 0.039 8.678 0.000 64.843 25.947 90.79 51.161 0 31.618

Hassles & SWB

Within-Person Associations

Region
# Run moderator analysis with all possible reference levels
refs_region_hassles_within <- c("North America",
                 "Northern Europe",
                 "Southern Europe",
                 "Asia")

res_region_hassles_within <- lapply(refs_region_hassles_within, function(ref) {
  run_ma_mod_ref(
    mod = "country_region",
    data = hassles_within,
    SamV = V_hassles_within,
    ref = ref
  )
})

names(res_region_hassles_within) <- refs_region_hassles_within

# Extract results for all reference levels
tables_region_hassles_within <- lapply(
  names(res_region_hassles_within),
  function(ref) {
    extract_mod_results(
      res_region_hassles_within[[ref]],
      hassles_within,
      V_hassles_within
    )
  }
)

names(tables_region_hassles_within) <- names(res_region_hassles_within)
Reference: North America
tbl_region_na_hassles_within <- prepare_mod_table(
  tables_region_hassles_within[["North America"]],
  moderator = "country_region"
)

rownames(tbl_region_na_hassles_within) <- c("Northern Europe", "Southern Europe", "Asia")

    kable(
     tbl_region_na_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: North America)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_na_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 71: Moderator Analysis for Region (Reference: North America)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Northern Europe 464 -0.083 0.023 -3.536 0.001 90.318 8.84 99.158 0.847 31.591 4.667
Southern Europe 464 -0.113 0.103 -1.101 0.358 90.318 8.84 99.158 0.847 31.591 4.667
Asia 464 0.008 0.031 0.274 0.793 90.318 8.84 99.158 0.847 31.591 4.667
Reference: Northern Europe
tbl_region_ne_hassles_within <- prepare_mod_table(
  tables_region_hassles_within[["Northern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_ne_hassles_within) <- c("North America", "Southern Europe", "Asia")

    kable(
     tbl_region_ne_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Northern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_ne_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 72: Moderator Analysis for Region (Reference: Northern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 464 0.083 0.023 3.536 0.001 90.318 8.84 99.158 0.847 31.591 4.667
Southern Europe 464 -0.031 0.105 -0.294 0.787 90.318 8.84 99.158 0.847 31.591 4.667
Asia 464 0.091 0.036 2.560 0.028 90.318 8.84 99.158 0.847 31.591 4.667
Reference: Southern Europe
tbl_region_se_hassles_within <- prepare_mod_table(
  tables_region_hassles_within[["Southern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_se_hassles_within) <- c("North America", "Northern Europe", "Asia")

    kable(
     tbl_region_se_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Southern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_se_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 73: Moderator Analysis for Region (Reference: Southern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 464 0.113 0.103 1.101 0.358 90.318 8.84 99.158 0.847 31.591 4.667
Northern Europe 464 0.031 0.105 0.294 0.787 90.318 8.84 99.158 0.847 31.591 4.667
Asia 464 0.122 0.107 1.145 0.316 90.318 8.84 99.158 0.847 31.591 4.667
Reference: Asia
tbl_region_asia_hassles_within <- prepare_mod_table(
  tables_region_hassles_within[["Asia"]],
  moderator = "country_region"
)

rownames(tbl_region_asia_hassles_within) <- c("North America", "Northern Europe", "Southern Europe")

    kable(
     tbl_region_asia_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Asia)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_asia_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 74: Moderator Analysis for Region (Reference: Asia)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 464 -0.008 0.031 -0.274 0.793 90.318 8.84 99.158 0.847 31.591 4.667
Northern Europe 464 -0.091 0.036 -2.560 0.028 90.318 8.84 99.158 0.847 31.591 4.667
Southern Europe 464 -0.122 0.107 -1.145 0.316 90.318 8.84 99.158 0.847 31.591 4.667
Event Type
# Run moderator analysis with all possible reference levels
refs_detype_hassles_within <- c("general",
                 "work/achievement",
                 "social",
                 "health",
                 "other")

res_detype_hassles_within <- lapply(refs_detype_hassles_within, function(ref) {
  run_ma_mod_ref(
    mod = "DeDomainAll",
    data = hassles_within,
    SamV = V_hassles_within,
    ref = ref
  )
})

names(res_detype_hassles_within) <- refs_detype_hassles_within

# Extract results for all reference levels
tables_detype_hassles_within <- lapply(
  names(res_detype_hassles_within),
  function(ref) {
    extract_mod_results(
      res_detype_hassles_within[[ref]],
      hassles_within,
      V_hassles_within
    )
  }
)

names(tables_detype_hassles_within) <- names(res_detype_hassles_within)
Reference: General
tbl_detype_gen_hassles_within <- prepare_mod_table(
  tables_detype_hassles_within[["general"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_gen_hassles_within) <- c("Work/Achievement", "Social", "Health", "Other")

    kable(
     tbl_detype_gen_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: General)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_gen_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 75: Moderator Analysis for Event Type (Reference: General)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Work/Achievement 530 0.058 0.015 3.805 0.001 95.147 3.93 99.078 0.506 70.145 8.933
Social 530 0.102 0.017 5.951 0.000 95.147 3.93 99.078 0.506 70.145 8.933
Health 530 0.085 0.025 3.465 0.004 95.147 3.93 99.078 0.506 70.145 8.933
Other 530 0.115 0.030 3.798 0.004 95.147 3.93 99.078 0.506 70.145 8.933
Reference: Work/Achievement
tbl_detype_wa_hassles_within <- prepare_mod_table(
  tables_detype_hassles_within[["work/achievement"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_wa_hassles_within) <- c("General", "Social", "Health", "Other")

    kable(
     tbl_detype_wa_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Work/Achievement)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_wa_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 76: Moderator Analysis for Event Type (Reference: Work/Achievement)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 530 -0.058 0.015 -3.805 0.001 95.147 3.93 99.078 0.506 70.145 8.933
Social 530 0.044 0.013 3.302 0.005 95.147 3.93 99.078 0.506 70.145 8.933
Health 530 0.027 0.024 1.122 0.281 95.147 3.93 99.078 0.506 70.145 8.933
Other 530 0.057 0.028 2.050 0.066 95.147 3.93 99.078 0.506 70.145 8.933
Reference: Social
tbl_detype_soc_hassles_within <- prepare_mod_table(
  tables_detype_hassles_within[["social"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_soc_hassles_within) <- c("General", "Work/Achievement", "Health", "Other")

    kable(
     tbl_detype_soc_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Social)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_soc_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 77: Moderator Analysis for Event Type (Reference: Social)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 530 -0.102 0.017 -5.951 0.000 95.147 3.93 99.078 0.506 70.145 8.933
Work/Achievement 530 -0.044 0.013 -3.302 0.005 95.147 3.93 99.078 0.506 70.145 8.933
Health 530 -0.017 0.027 -0.611 0.552 95.147 3.93 99.078 0.506 70.145 8.933
Other 530 0.013 0.030 0.436 0.672 95.147 3.93 99.078 0.506 70.145 8.933
Reference: Health
tbl_detype_hlth_hassles_within <- prepare_mod_table(
  tables_detype_hassles_within[["health"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_hlth_hassles_within) <- c("General", "Work/Achievement", "Social","Other")

    kable(
     tbl_detype_hlth_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Health)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_hlth_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 78: Moderator Analysis for Event Type (Reference: Health)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 530 -0.085 0.025 -3.465 0.004 95.147 3.93 99.078 0.506 70.145 8.933
Work/Achievement 530 -0.027 0.024 -1.122 0.281 95.147 3.93 99.078 0.506 70.145 8.933
Social 530 0.017 0.027 0.611 0.552 95.147 3.93 99.078 0.506 70.145 8.933
Other 530 0.030 0.039 0.770 0.455 95.147 3.93 99.078 0.506 70.145 8.933
Reference: Other
tbl_detype_oth_hassles_within <- prepare_mod_table(
  tables_detype_hassles_within[["other"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_oth_hassles_within) <- c("General", "Work/Achievement", "Social", "Health")

    kable(
     tbl_detype_oth_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 79: Moderator Analysis for Event Type (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 530 -0.115 0.030 -3.798 0.004 95.147 3.93 99.078 0.506 70.145 8.933
Work/Achievement 530 -0.057 0.028 -2.050 0.066 95.147 3.93 99.078 0.506 70.145 8.933
Social 530 -0.013 0.030 -0.436 0.672 95.147 3.93 99.078 0.506 70.145 8.933
Health 530 -0.030 0.039 -0.770 0.455 95.147 3.93 99.078 0.506 70.145 8.933
Event Measurement
# Run moderator analysis with all possible reference levels
refs_demeas_hassles_within <- c("checklist/questionnaire",
                                 "open_response",
                                  "interview")

res_demeas_hassles_within <- lapply(refs_demeas_hassles_within, function(ref) {
  run_ma_mod_ref(
    mod = "TypeDeMeasure",
    data = hassles_within,
    SamV = V_hassles_within,
    ref = ref
  )
})

names(res_demeas_hassles_within) <- refs_demeas_hassles_within

# Extract results for all reference levels
tables_demeas_hassles_within <- lapply(
  names(res_demeas_hassles_within),
  function(ref) {
    extract_mod_results(
      res_demeas_hassles_within[[ref]],
      hassles_within,
      V_hassles_within
    )
  }
)

names(tables_demeas_hassles_within) <- names(res_demeas_hassles_within)
Reference: Checklist/Questionnaire
tbl_demeas_check_hassles_within <- prepare_mod_table(
  tables_demeas_hassles_within[["checklist/questionnaire"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_check_hassles_within) <- c("Open-response", "Interview")

    kable(
     tbl_demeas_check_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_check_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 80: Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Open-response 527 -0.024 0.081 -0.292 0.786 87.468 11.706 99.174 0 0 0
Interview 527 0.050 0.049 1.020 0.367 87.468 11.706 99.174 0 0 0
Reference: Open-Response
tbl_demeas_opem_hassles_within <- prepare_mod_table(
  tables_demeas_hassles_within[["open_response"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_opem_hassles_within) <- c("Checklist/Questionnaire", "Interview")

    kable(
     tbl_demeas_opem_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Open-Response)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_opem_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 81: Moderator Analysis for Event Measurement (Reference: Open-Response)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 527 0.024 0.081 0.292 0.786 87.468 11.706 99.174 0 0 0
Interview 527 0.073 0.094 0.784 0.460 87.468 11.706 99.174 0 0 0
Reference: Interview
tbl_demeas_int_hassles_within <- prepare_mod_table(
  tables_demeas_hassles_within[["interview"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_int_hassles_within) <- c("Checklist/Questionnaire", "Open-response")

    kable(
     tbl_demeas_int_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Interview)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_int_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 82: Moderator Analysis for Event Measurement (Reference: Interview)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 527 -0.050 0.049 -1.020 0.367 87.468 11.706 99.174 0 0 0
Open-response 527 -0.073 0.094 -0.784 0.460 87.468 11.706 99.174 0 0 0
Event Operationalization
# Run moderator analysis with all possible reference levels
refs_deop_hassles_within <- c("dichotomous",
               "numeric_count",
               "scale_score")

res_deop_hassles_within <- lapply(refs_deop_hassles_within, function(ref) {
  run_ma_mod_ref(
    mod = "DeDataType",
    data = hassles_within,
    SamV = V_hassles_within,
    ref = ref
  )
})

names(res_deop_hassles_within) <- refs_deop_hassles_within

# Extract results for all reference levels
tables_deop_hassles_within <- lapply(
  names(res_deop_hassles_within),
  function(ref) {
    extract_mod_results(
      res_deop_hassles_within[[ref]],
      hassles_within,
      V_hassles_within
    )
  }
)

names(tables_deop_hassles_within) <- names(res_deop_hassles_within)
Reference: Dichotomous
tbl_deop_dic_hassles_within <- prepare_mod_table(
  tables_deop_hassles_within[["dichotomous"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_dic_hassles_within) <- c("Numeric count", "Scale score")

    kable(
     tbl_deop_dic_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Dichotomous)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_dic_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 83: Moderator Analysis for Event Operationalization (Reference: Dichotomous)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Numeric count 530 -0.029 0.028 -1.044 0.302 88.794 10.368 99.161 0 14.865 1.466
Scale score 530 -0.050 0.022 -2.329 0.025 88.794 10.368 99.161 0 14.865 1.466
Reference: Numeric Count
tbl_deop_num_hassles_within <- prepare_mod_table(
  tables_deop_hassles_within[["numeric_count"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_num_hassles_within) <- c("Dichotomous", "Scale score")

    kable(
     tbl_deop_num_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Numeric Count)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_num_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 84: Moderator Analysis for Event Operationalization (Reference: Numeric Count)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 530 0.029 0.028 1.044 0.302 88.794 10.368 99.161 0 14.865 1.466
Scale score 530 -0.021 0.022 -0.984 0.331 88.794 10.368 99.161 0 14.865 1.466
Reference: Scale Score
tbl_detype_scal_hassles_within <- prepare_mod_table(
  tables_deop_hassles_within[["scale_score"]],
  moderator = "DeDataType"
)

rownames(tbl_detype_scal_hassles_within) <- c("Dichotomous", "Numeric count")

    kable(
     tbl_detype_scal_hassles_within,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Scale Score)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_scal_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 85: Moderator Analysis for Event Operationalization (Reference: Scale Score)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 530 0.050 0.022 2.329 0.025 88.794 10.368 99.161 0 14.865 1.466
Numeric count 530 0.021 0.022 0.984 0.331 88.794 10.368 99.161 0 14.865 1.466
SWB Dimension
# Run moderator analysis with all possible reference levels
refs_swb_hassles_within <- c("life_satisfaction",
              "domain_satisfaction",
              "positive_affect",
              "negative_affect",
              "global_well-being")

res_swb_hassles_within <- lapply(refs_swb_hassles_within, function(ref) {
  run_ma_mod_ref(
    mod = "WbDimension",
    data = hassles_within,
    SamV = V_hassles_within,
    ref = ref
  )
})

names(res_swb_hassles_within) <- refs_swb_hassles_within

# Extract results for all reference levels
tables_swb_hassles_within <- lapply(
  names(res_swb_hassles_within),
  function(ref) {
    extract_mod_results(
      res_swb_hassles_within[[ref]],
      hassles_within,
      V_hassles_within
    )
  }
)

names(tables_swb_hassles_within) <- names(res_swb_hassles_within)
Reference: Life Satisfaction
tbl_swb_ls_hassles_within <- prepare_mod_table(
  tables_swb_hassles_within[["life_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ls_hassles_within) <- c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being")

    kable(
     tbl_swb_ls_hassles_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ls_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 86: Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Domain satisfaction 530 -0.002 0.049 -0.031 0.976 78.936 20.117 99.053 20.687 0 12.517
Positive affect 530 0.046 0.017 2.697 0.038 78.936 20.117 99.053 20.687 0 12.517
Negative affect 530 -0.086 0.017 -4.967 0.003 78.936 20.117 99.053 20.687 0 12.517
Global well-being 530 -0.028 0.051 -0.543 0.619 78.936 20.117 99.053 20.687 0 12.517
Reference: Domain Satisfaction
tbl_swb_ds_hassles_within <- prepare_mod_table(
  tables_swb_hassles_within[["domain_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ds_hassles_within) <- c("Life satisfaction", "Positive affect", "Negative affect", "Global well-being")

    kable(
     tbl_swb_ds_hassles_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ds_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 87: Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 530 0.002 0.049 0.031 0.976 78.936 20.117 99.053 20.687 0 12.517
Positive affect 530 0.047 0.051 0.934 0.400 78.936 20.117 99.053 20.687 0 12.517
Negative affect 530 -0.085 0.050 -1.685 0.164 78.936 20.117 99.053 20.687 0 12.517
Global well-being 530 -0.026 0.068 -0.382 0.719 78.936 20.117 99.053 20.687 0 12.517
Reference: Positive Affect
tbl_swb_pa_hassles_within <- prepare_mod_table(
  tables_swb_hassles_within[["positive_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_pa_hassles_within) <- c("Life satisfaction", "Domain satisfaction", "Negative affect", "Global well-being")

    kable(
     tbl_swb_pa_hassles_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Positive Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_pa_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 88: Moderator Analysis for SWB Dimension (Reference: Positive Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 530 -0.046 0.017 -2.697 0.038 78.936 20.117 99.053 20.687 0 12.517
Domain satisfaction 530 -0.047 0.051 -0.934 0.400 78.936 20.117 99.053 20.687 0 12.517
Negative affect 530 -0.132 0.011 -12.510 0.000 78.936 20.117 99.053 20.687 0 12.517
Global well-being 530 -0.073 0.048 -1.514 0.235 78.936 20.117 99.053 20.687 0 12.517
Reference: Negative Affect
tbl_swb_na_hassles_within <- prepare_mod_table(
  tables_swb_hassles_within[["negative_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_na_hassles_within) <- c("Life satisfaction", "Domain satisfaction", "Positive affect", "Global well-being")

    kable(
     tbl_swb_na_hassles_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Negative Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_na_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 89: Moderator Analysis for SWB Dimension (Reference: Negative Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 530 0.086 0.017 4.967 0.003 78.936 20.117 99.053 20.687 0 12.517
Domain satisfaction 530 0.085 0.050 1.685 0.164 78.936 20.117 99.053 20.687 0 12.517
Positive affect 530 0.132 0.011 12.510 0.000 78.936 20.117 99.053 20.687 0 12.517
Global well-being 530 0.059 0.048 1.220 0.317 78.936 20.117 99.053 20.687 0 12.517
Reference: Global Well-Being
tbl_swb_gwb_hassles_within <- prepare_mod_table(
  tables_swb_hassles_within[["negative_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_gwb_hassles_within) <- c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_gwb_hassles_within,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Global Well-Being)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_gwb_hassles_within$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 90: Moderator Analysis for SWB Dimension (Reference: Global Well-Being)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 530 0.086 0.017 4.967 0.003 78.936 20.117 99.053 20.687 0 12.517
Domain satisfaction 530 0.085 0.050 1.685 0.164 78.936 20.117 99.053 20.687 0 12.517
Positive affect 530 0.132 0.011 12.510 0.000 78.936 20.117 99.053 20.687 0 12.517
Negative affect 530 0.059 0.048 1.220 0.317 78.936 20.117 99.053 20.687 0 12.517

Between-Person Associations

Region
# Run moderator analysis with all possible reference levels
refs_region_hassles_between <- c("North America",
                 "Northern Europe",
                 "Southern Europe",
                 "Asia",
                 "Australia")

res_region_hassles_between <- lapply(refs_region_hassles_between, function(ref) {
  run_ma_mod_ref(
    mod = "country_region",
    data = hassles_between,
    SamV = V_hassles_between,
    ref = ref
  )
})

names(res_region_hassles_between) <- refs_region_hassles_between

# Extract results for all reference levels
tables_region_hassles_between <- lapply(
  names(res_region_hassles_between),
  function(ref) {
    extract_mod_results(
      res_region_hassles_between[[ref]],
      hassles_between,
      V_hassles_between
    )
  }
)

names(tables_region_hassles_between) <- names(res_region_hassles_between)
Reference: North America
tbl_region_na_hassles_between <- prepare_mod_table(
  tables_region_hassles_between[["North America"]],
  moderator = "country_region"
)

rownames(tbl_region_na_hassles_between) <- c("Northern Europe", "Southern Europe", "Asia", "Australia")

    kable(
     tbl_region_na_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: North America)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_na_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 91: Moderator Analysis for Region (Reference: North America)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Northern Europe 531 -0.103 0.033 -3.095 0.004 87.577 5.034 92.611 1.27 17.162 2.288
Southern Europe 531 -0.124 0.153 -0.812 0.480 87.577 5.034 92.611 1.27 17.162 2.288
Asia 531 0.019 0.041 0.477 0.642 87.577 5.034 92.611 1.27 17.162 2.288
Australia 531 -0.139 0.039 -3.581 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Reference: Northern Europe
tbl_region_ne_hassles_between <- prepare_mod_table(
  tables_region_hassles_between[["Northern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_ne_hassles_between) <- c("North America", "Southern Europe", "Asia", "Australia")

    kable(
     tbl_region_ne_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Northern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_ne_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 92: Moderator Analysis for Region (Reference: Northern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 531 0.103 0.033 3.095 0.004 87.577 5.034 92.611 1.27 17.162 2.288
Southern Europe 531 -0.021 0.155 -0.134 0.901 87.577 5.034 92.611 1.27 17.162 2.288
Asia 531 0.123 0.046 2.641 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Australia 531 -0.035 0.047 -0.762 0.474 87.577 5.034 92.611 1.27 17.162 2.288
Reference: Southern Europe
tbl_region_se_hassles_between <- prepare_mod_table(
  tables_region_hassles_between[["Southern Europe"]],
  moderator = "country_region"
)

rownames(tbl_region_se_hassles_between) <- c("North America", "Northern Europe", "Asia", "Australia")

    kable(
     tbl_region_se_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Southern Europe)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_se_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 93: Moderator Analysis for Region (Reference: Southern Europe)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 531 0.124 0.153 0.812 0.480 87.577 5.034 92.611 1.27 17.162 2.288
Northern Europe 531 0.021 0.155 0.134 0.901 87.577 5.034 92.611 1.27 17.162 2.288
Asia 531 0.143 0.156 0.918 0.413 87.577 5.034 92.611 1.27 17.162 2.288
Australia 531 -0.015 0.156 -0.095 0.928 87.577 5.034 92.611 1.27 17.162 2.288
Reference: Asia
tbl_region_asia_hassles_between <- prepare_mod_table(
  tables_region_hassles_between[["Asia"]],
  moderator = "country_region"
)

rownames(tbl_region_asia_hassles_between) <- c("North America", "Northern Europe", "Southern Europe", "Australia")

    kable(
     tbl_region_asia_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Asia)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_asia_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 94: Moderator Analysis for Region (Reference: Asia)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 531 -0.019 0.041 -0.477 0.642 87.577 5.034 92.611 1.27 17.162 2.288
Northern Europe 531 -0.123 0.046 -2.641 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Southern Europe 531 -0.143 0.156 -0.918 0.413 87.577 5.034 92.611 1.27 17.162 2.288
Australia 531 -0.158 0.050 -3.135 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Reference: Australia
tbl_region_aus_hassles_between <- prepare_mod_table(
  tables_region_hassles_between[["Australia"]],
  moderator = "country_region"
)

rownames(tbl_region_aus_hassles_between) <- c("North America", "Northern Europe", "Southern Europe", "Asia")

    kable(
     tbl_region_aus_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Region (Reference: Australia)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_region_aus_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 95: Moderator Analysis for Region (Reference: Australia)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
North America 531 0.139 0.039 3.581 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Northern Europe 531 0.035 0.047 0.762 0.474 87.577 5.034 92.611 1.27 17.162 2.288
Southern Europe 531 0.015 0.156 0.095 0.928 87.577 5.034 92.611 1.27 17.162 2.288
Asia 531 0.158 0.050 3.135 0.015 87.577 5.034 92.611 1.27 17.162 2.288
Event Type
# Run moderator analysis with all possible reference levels
refs_detype_hassles_between <- c("general",
                 "work/achievement",
                 "social",
                 "health",
                 "other")

res_detype_hassles_between <- lapply(refs_detype_hassles_between, function(ref) {
  run_ma_mod_ref(
    mod = "DeDomainAll",
    data = hassles_between,
    SamV = V_hassles_between,
    ref = ref
  )
})

names(res_detype_hassles_between) <- refs_detype_hassles_between

# Extract results for all reference levels
tables_detype_hassles_between <- lapply(
  names(res_detype_hassles_between),
  function(ref) {
    extract_mod_results(
      res_detype_hassles_between[[ref]],
      hassles_between,
      V_hassles_between
    )
  }
)

names(tables_detype_hassles_between) <- names(res_detype_hassles_between)
Reference: General
tbl_detype_gen_hassles_between <- prepare_mod_table(
  tables_detype_hassles_between[["general"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_gen_hassles_between) <- c("Work/Achievement", "Social", "Health", "Other")

    kable(
     tbl_detype_gen_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: General)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_gen_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 96: Moderator Analysis for Event Type (Reference: General)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Work/Achievement 627 0.053 0.024 2.217 0.033 87.422 4.246 91.668 0.77 25.948 2.309
Social 627 0.065 0.021 3.069 0.003 87.422 4.246 91.668 0.77 25.948 2.309
Health 627 0.125 0.027 4.728 0.000 87.422 4.246 91.668 0.77 25.948 2.309
Other 627 0.110 0.031 3.502 0.003 87.422 4.246 91.668 0.77 25.948 2.309
Reference: Work/Achievement
tbl_detype_wa_hassles_between <- prepare_mod_table(
  tables_detype_hassles_between[["work/achievement"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_wa_hassles_between) <- c("General", "Social", "Health", "Other")

    kable(
     tbl_detype_wa_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Work/Achievement)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_wa_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 97: Moderator Analysis for Event Type (Reference: Work/Achievement)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 627 -0.053 0.024 -2.217 0.033 87.422 4.246 91.668 0.77 25.948 2.309
Social 627 0.011 0.019 0.592 0.559 87.422 4.246 91.668 0.77 25.948 2.309
Health 627 0.072 0.029 2.514 0.019 87.422 4.246 91.668 0.77 25.948 2.309
Other 627 0.057 0.034 1.677 0.109 87.422 4.246 91.668 0.77 25.948 2.309
Reference: Social
tbl_detype_soc_hassles_between <- prepare_mod_table(
  tables_detype_hassles_between[["social"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_soc_hassles_between) <- c("General", "Work/Achievement", "Health", "Other")

    kable(
     tbl_detype_soc_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Social)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_soc_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 98: Moderator Analysis for Event Type (Reference: Social)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 627 -0.065 0.021 -3.069 0.003 87.422 4.246 91.668 0.77 25.948 2.309
Work/Achievement 627 -0.011 0.019 -0.592 0.559 87.422 4.246 91.668 0.77 25.948 2.309
Health 627 0.061 0.026 2.338 0.029 87.422 4.246 91.668 0.77 25.948 2.309
Other 627 0.045 0.032 1.420 0.173 87.422 4.246 91.668 0.77 25.948 2.309
Reference: Health
tbl_detype_hlth_hassles_between <- prepare_mod_table(
  tables_detype_hassles_between[["health"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_hlth_hassles_between) <- c("General", "Work/Achievement", "Social", "Other")

    kable(
     tbl_detype_hlth_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Health)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_hlth_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 99: Moderator Analysis for Event Type (Reference: Health)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 627 -0.125 0.027 -4.728 0.000 87.422 4.246 91.668 0.77 25.948 2.309
Work/Achievement 627 -0.072 0.029 -2.514 0.019 87.422 4.246 91.668 0.77 25.948 2.309
Social 627 -0.061 0.026 -2.338 0.029 87.422 4.246 91.668 0.77 25.948 2.309
Other 627 -0.015 0.034 -0.447 0.660 87.422 4.246 91.668 0.77 25.948 2.309
Reference: Other
tbl_detype_oth_hassles_between <- prepare_mod_table(
  tables_detype_hassles_between[["other"]],
  moderator = "DeDomainAll"
)

rownames(tbl_detype_oth_hassles_between) <- c("General", "Work/Achievement", "Social", "Health")

    kable(
     tbl_detype_oth_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Type (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 100: Moderator Analysis for Event Type (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
General 627 -0.110 0.031 -3.502 0.003 87.422 4.246 91.668 0.77 25.948 2.309
Work/Achievement 627 -0.057 0.034 -1.677 0.109 87.422 4.246 91.668 0.77 25.948 2.309
Social 627 -0.045 0.032 -1.420 0.173 87.422 4.246 91.668 0.77 25.948 2.309
Health 627 0.015 0.034 0.447 0.660 87.422 4.246 91.668 0.77 25.948 2.309
Event Measurement
# Run moderator analysis with all possible reference levels
refs_demeas_hassles_between <- c("checklist/questionnaire",
                                 "open_response",
                                  "interview")

res_demeas_hassles_between <- lapply(refs_demeas_hassles_between, function(ref) {
  run_ma_mod_ref(
    mod = "TypeDeMeasure",
    data = hassles_between,
    SamV = V_hassles_between,
    ref = ref
  )
})

names(res_demeas_hassles_between) <- refs_demeas_hassles_between

# Extract results for all reference levels
tables_demeas_hassles_between <- lapply(
  names(res_demeas_hassles_between),
  function(ref) {
    extract_mod_results(
      res_demeas_hassles_between[[ref]],
      hassles_between,
      V_hassles_between
    )
  }
)

names(tables_demeas_hassles_between) <- names(res_demeas_hassles_between)
Reference: Checklist/Questionnaire
tbl_demeas_check_hassles_between <- prepare_mod_table(
  tables_demeas_hassles_between[["checklist/questionnaire"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_check_hassles_between) <- c("Open-response", "Interview")

    kable(
     tbl_demeas_check_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_check_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 101: Moderator Analysis for Event Measurement (Reference: Checklist/Questionnaire)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Open-response 618 0.007 0.041 0.161 0.876 86.281 5.665 91.946 0 0 0
Interview 618 0.044 0.076 0.583 0.594 86.281 5.665 91.946 0 0 0
Reference: Open-Response
tbl_demeas_opem_hassles_between <- prepare_mod_table(
  tables_demeas_hassles_between[["open_response"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_opem_hassles_between) <- c("Checklist/Questionnaire", "Interview")

    kable(
     tbl_demeas_opem_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Open-Response)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_opem_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 102: Moderator Analysis for Event Measurement (Reference: Open-Response)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 618 -0.007 0.041 -0.161 0.876 86.281 5.665 91.946 0 0 0
Interview 618 0.038 0.085 0.443 0.670 86.281 5.665 91.946 0 0 0
Reference: Interview
tbl_demeas_int_hassles_between <- prepare_mod_table(
  tables_demeas_hassles_between[["interview"]],
  moderator = "TypeDeMeasure"
)

rownames(tbl_demeas_int_hassles_between) <- c("Checklist/Questionnaire", "Open-response")

    kable(
     tbl_demeas_int_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Measurement (Reference: Interview)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_demeas_int_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 103: Moderator Analysis for Event Measurement (Reference: Interview)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Checklist/Questionnaire 618 -0.044 0.076 -0.583 0.594 86.281 5.665 91.946 0 0 0
Open-response 618 -0.038 0.085 -0.443 0.670 86.281 5.665 91.946 0 0 0
Event Operationalization
# Run moderator analysis with all possible reference levels
refs_deop_hassles_between <- c("dichotomous",
               "numeric_count",
               "scale_score",
               "other")

res_deop_hassles_between <- lapply(refs_deop_hassles_between, function(ref) {
  run_ma_mod_ref(
    mod = "DeDataType",
    data = hassles_between,
    SamV = V_hassles_between,
    ref = ref
  )
})

names(res_deop_hassles_between) <- refs_deop_hassles_between

# Extract results for all reference levels
tables_deop_hassles_between <- lapply(
  names(res_deop_hassles_between),
  function(ref) {
    extract_mod_results(
      res_deop_hassles_between[[ref]],
      hassles_between,
      V_hassles_between
    )
  }
)

names(tables_deop_hassles_between) <- names(res_deop_hassles_between)
Reference: Dichotomous
tbl_deop_dic_hassles_between <- prepare_mod_table(
  tables_deop_hassles_between[["dichotomous"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_dic_hassles_between) <- c("Numeric count", "Scale score", "Other")

    kable(
     tbl_deop_dic_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Dichotomous)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_dic_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 104: Moderator Analysis for Event Operationalization (Reference: Dichotomous)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Numeric count 627 -0.001 0.031 -0.031 0.976 86.864 4.948 91.812 0 12.218 0.471
Scale score 627 -0.045 0.023 -1.909 0.060 86.864 4.948 91.812 0 12.218 0.471
Other 627 -0.051 0.037 -1.361 0.313 86.864 4.948 91.812 0 12.218 0.471
Reference: Numeric Count
tbl_deop_num_hassles_between <- prepare_mod_table(
  tables_deop_hassles_between[["numeric_count"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_num_hassles_between) <- c("Dichotomous", "Scale score", "Other")

    kable(
     tbl_deop_num_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Numeric Count)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_num_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 105: Moderator Analysis for Event Operationalization (Reference: Numeric Count)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 627 0.001 0.031 0.031 0.976 86.864 4.948 91.812 0 12.218 0.471
Scale score 627 -0.044 0.027 -1.605 0.114 86.864 4.948 91.812 0 12.218 0.471
Other 627 -0.050 0.040 -1.247 0.344 86.864 4.948 91.812 0 12.218 0.471
Reference: Scale Score
tbl_deop_scal_hassles_between <- prepare_mod_table(
  tables_deop_hassles_between[["scale_score"]],
  moderator = "DeDataType"
)

rownames(tbl_deop_scal_hassles_between) <- c("Dichotomous", "Numeric count", "Other")

    kable(
     tbl_deop_scal_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Scale Score)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_deop_scal_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 106: Moderator Analysis for Event Operationalization (Reference: Scale Score)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Dichotomous 627 0.045 0.023 1.909 0.060 86.864 4.948 91.812 0 12.218 0.471
Numeric count 627 0.044 0.027 1.605 0.114 86.864 4.948 91.812 0 12.218 0.471
Other 627 -0.006 0.033 -0.187 0.871 86.864 4.948 91.812 0 12.218 0.471
Reference: Other
tbl_detype_oth_hassles_between <- prepare_mod_table(
  tables_deop_hassles_between[["other"]],
  moderator = "DeDataType"
)

    kable(
     tbl_detype_oth_hassles_between,
      caption = paste0(
        "**Moderator Analysis for Event Operationalization (Reference: Other)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_detype_oth_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 107: Moderator Analysis for Event Operationalization (Reference: Other)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
dichotomous 627 0.051 0.037 1.361 0.313 86.864 4.948 91.812 0 12.218 0.471
numeric_count 627 0.050 0.040 1.247 0.344 86.864 4.948 91.812 0 12.218 0.471
scale_score 627 0.006 0.033 0.187 0.871 86.864 4.948 91.812 0 12.218 0.471
SWB Dimension
# Run moderator analysis with all possible reference levels
refs_swb_hassles_between <- c("life_satisfaction",
              "domain_satisfaction",
              "positive_affect",
              "negative_affect",
              "global_well-being")

res_swb_hassles_between <- lapply(refs_swb_hassles_between, function(ref) {
  run_ma_mod_ref(
    mod = "WbDimension",
    data = hassles_between,
    SamV = V_hassles_between,
    ref = ref
  )
})

names(res_swb_hassles_between) <- refs_swb_hassles_between

# Extract results for all reference levels
tables_swb_hassles_between <- lapply(
  names(res_swb_hassles_between),
  function(ref) {
    extract_mod_results(
      res_swb_hassles_between[[ref]],
      hassles_between,
      V_hassles_between
    )
  }
)

names(tables_swb_hassles_between) <- names(res_swb_hassles_between)
Reference: Life Satisfaction
tbl_swb_ls_hassles_between <- prepare_mod_table(
  tables_swb_hassles_between[["life_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ls_hassles_between) <- c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being")

    kable(
     tbl_swb_ls_hassles_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ls_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 108: Moderator Analysis for SWB Dimension (Reference: Life Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Domain satisfaction 627 -0.105 0.069 -1.527 0.158 54.196 33.575 87.771 58.372 0 36.702
Positive affect 627 0.029 0.039 0.744 0.473 54.196 33.575 87.771 58.372 0 36.702
Negative affect 627 -0.275 0.035 -7.916 0.000 54.196 33.575 87.771 58.372 0 36.702
Global well-being 627 -0.037 0.049 -0.753 0.475 54.196 33.575 87.771 58.372 0 36.702
Reference: Domain Satisfaction
tbl_swb_ds_hassles_between <- prepare_mod_table(
  tables_swb_hassles_between[["domain_satisfaction"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_ds_hassles_between) <- c("Life satisfaction", "Positive affect", "Negative affect", "Global well-being")

    kable(
     tbl_swb_ds_hassles_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_ds_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 109: Moderator Analysis for SWB Dimension (Reference: Domain Satisfaction)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 627 0.105 0.069 1.527 0.158 54.196 33.575 87.771 58.372 0 36.702
Positive affect 627 0.135 0.065 2.059 0.077 54.196 33.575 87.771 58.372 0 36.702
Negative affect 627 -0.170 0.065 -2.623 0.034 54.196 33.575 87.771 58.372 0 36.702
Global well-being 627 0.069 0.076 0.902 0.391 54.196 33.575 87.771 58.372 0 36.702
Reference: Positive Affect
tbl_swb_pa_hassles_between <- prepare_mod_table(
  tables_swb_hassles_between[["positive_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_pa_hassles_between) <- c("Life satisfaction", "Domain satisfaction", "Negative affect", "Global well-being")

    kable(
     tbl_swb_pa_hassles_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Positive Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_pa_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 110: Moderator Analysis for SWB Dimension (Reference: Positive Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 627 -0.029 0.039 -0.744 0.473 54.196 33.575 87.771 58.372 0 36.702
Domain satisfaction 627 -0.135 0.065 -2.059 0.077 54.196 33.575 87.771 58.372 0 36.702
Negative affect 627 -0.304 0.022 -13.602 0.000 54.196 33.575 87.771 58.372 0 36.702
Global well-being 627 -0.066 0.036 -1.831 0.125 54.196 33.575 87.771 58.372 0 36.702
Reference: Negative Affect
tbl_swb_na_hassles_between <- prepare_mod_table(
  tables_swb_hassles_between[["negative_affect"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_na_hassles_between) <- c("Life satisfaction", "Domain satisfaction", "Positive affect", "Global well-being")

    kable(
     tbl_swb_na_hassles_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Negative Affect)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_na_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 111: Moderator Analysis for SWB Dimension (Reference: Negative Affect)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 627 0.275 0.035 7.916 0.000 54.196 33.575 87.771 58.372 0 36.702
Domain satisfaction 627 0.170 0.065 2.623 0.034 54.196 33.575 87.771 58.372 0 36.702
Positive affect 627 0.304 0.022 13.602 0.000 54.196 33.575 87.771 58.372 0 36.702
Global well-being 627 0.238 0.037 6.455 0.001 54.196 33.575 87.771 58.372 0 36.702
Reference: Global Well-Being
tbl_swb_gwb_hassles_between <- prepare_mod_table(
  tables_swb_hassles_between[["global_well-being"]],
  moderator = "WbDimension"
)

rownames(tbl_swb_gwb_hassles_between) <- c("Life satisfaction", "Domain satisfaction", "Positive affect", "Negative affect")

    kable(
     tbl_swb_gwb_hassles_between,
      caption = paste0(
        "**Moderator Analysis for SWB Dimension (Reference: Global Well-Being)**"
      ),
     escape = FALSE,
     digits = 3,
     label = NA
    ) %>%
      column_spec(
        c(3:6),
        bold = tbl_swb_gwb_hassles_between$`*p*` < .05
      ) %>%
      kable_styling(
        bootstrap_options = c("striped", "hover", "condensed"),
        fixed_thead = TRUE,
        full_width = TRUE,
        position = "left"
      )
Table 112: Moderator Analysis for SWB Dimension (Reference: Global Well-Being)
ES b SE t p I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Life satisfaction 627 0.037 0.049 0.753 0.475 54.196 33.575 87.771 58.372 0 36.702
Domain satisfaction 627 -0.069 0.076 -0.902 0.391 54.196 33.575 87.771 58.372 0 36.702
Positive affect 627 0.066 0.036 1.831 0.125 54.196 33.575 87.771 58.372 0 36.702
Negative affect 627 -0.238 0.037 -6.455 0.001 54.196 33.575 87.771 58.372 0 36.702

Multivariate Moderator Models

Uplifts & SWB

Within-Person Associations

Regression Coefficient Table
# All Moderators Combined

comb_mods_within <- c("Female_c + AgeM_c + Year_c + WbReliability_c + SampleType + country_region +
                      StudyDesign + DeDomainAll + TypeDeMeasure + DeDataType + WbDimension + 
                      CorrLag")

comb_mods_uplifts_within <- setNames(
  lapply(
    comb_mods_within,
    run_ma_mod,
    data = uplifts_within,
    SamV = V_uplifts_within
  ),
  comb_mods_within
)

comb_mods_results_uplifts_within <- lapply(
  comb_mods_uplifts_within,
  extract_mod_results,
  data = uplifts_within,
  SamV = V_uplifts_within
) %>%
  bind_rows(.id = "moderator")

comb_mods_table_uplifts_within <- comb_mods_results_uplifts_within %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

comb_mods_table_uplifts_within$R2_Level1 <- ifelse(comb_mods_table_uplifts_within$R2_Level1 < 0, 0, comb_mods_table_uplifts_within$R2_Level1)
comb_mods_table_uplifts_within$R2_Level2 <- ifelse(comb_mods_table_uplifts_within$R2_Level2 < 0, 0, comb_mods_table_uplifts_within$R2_Level2)
comb_mods_table_uplifts_within$R2_Total <- ifelse(comb_mods_table_uplifts_within$R2_Total < 0, 0, comb_mods_table_uplifts_within$R2_Total)

names(comb_mods_table_uplifts_within) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                                           "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                                           "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(comb_mods_table_uplifts_within) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                        "College", "Northern Europe", "Asia", "ESM",
                                        "Work/Achievement", "Social", "Other event", "Open-response", 
                                        "Interview", "Numeric count", "Scale score", "Domain satisfaction", 
                                        "Positive affect", "Negative affect", "Prospective")

order_comb_mods_uplifts_within <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe","Asia",
  "Work/Achievement", "Social", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Domain satisfaction", "Positive affect", "Negative affect",
  "SWB reliability",
  "ESM",
  "Prospective"
)

comb_mods_table_uplifts_within <- comb_mods_table_uplifts_within[order_comb_mods_uplifts_within, ]

kable(round(comb_mods_table_uplifts_within, 3),
      caption = "**Results of Multivariate Moderator Analyses for the Within-Person Association Between Daily Uplifts and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 6) %>%
  pack_rows("Daily event type", 7, 9) %>%
  pack_rows("Daily event measurement", 10, 11) %>%
  pack_rows("Daily event data type", 12, 13) %>%
  pack_rows("SWB dimension", 14, 16) %>%
  column_spec(c(3:6), bold = ifelse(comb_mods_table_uplifts_within[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 113: Results of Multivariate Moderator Analyses for the Within-Person Association Between Daily Uplifts and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 232 0.003 0.004 0.909 0.399 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
College 232 0.089 0.067 1.330 0.207 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
% Female 232 0.000 0.000 0.964 0.398 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Mean age 232 0.000 0.002 0.107 0.917 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Region
Northern Europe 232 0.165 0.081 2.028 0.089 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Asia 232 -0.010 0.029 -0.357 0.776 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Daily event type
Work/Achievement 232 -0.093 0.040 -2.321 0.047 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Social 232 0.048 0.047 1.032 0.326 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Other event 232 -0.028 0.041 -0.694 0.548 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Daily event measurement
Open-response 232 -0.037 0.034 -1.069 0.312 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Interview 232 -0.004 0.050 -0.075 0.943 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Daily event data type
Numeric count 232 0.006 0.098 0.056 0.956 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Scale score 232 0.086 0.069 1.242 0.244 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
SWB dimension
Domain satisfaction 232 0.149 0.126 1.179 0.377 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Positive affect 232 0.033 0.018 1.861 0.161 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Negative affect 232 -0.079 0.025 -3.141 0.027 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
SWB reliability 232 0.122 0.146 0.835 0.421 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
ESM 232 0.026 0.060 0.429 0.686 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194
Prospective 232 -0.180 0.014 -12.997 0.000 0.01 0.003 72.465 24.996 97.46 62.224 0 49.194

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
comb_mods_plot_uplifts_within <- comb_mods_results_uplifts_within

comb_mods_plot_uplifts_within$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                           "College", "Northern Europe", "Asia", "ESM", 
                                           "Work/Achievement", "Social", "Other event", "Open-response", 
                                           "Interview", "Numeric count", "Scale score", "Domain satisfaction", 
                                           "Positive affect", "Negative affect", "Prospective")

comb_mods_plot_uplifts_within <- comb_mods_plot_uplifts_within %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Health", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score", "Other type") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Southern Europe", "Asia", "Australia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel == "Prospective" ~ "Correlation lag",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      term %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

comb_mods_plot_uplifts_within <- comb_mods_plot_uplifts_within %>%
  mutate(modcat = factor(modcat, levels = order_modcat_within)) %>%
  arrange(modcat)

comb_mods_plot_uplifts_within$modcat <- factor(
  comb_mods_plot_uplifts_within$modcat,
  levels = rev(unique(comb_mods_plot_uplifts_within$modcat))
)

comb_mods_plot_uplifts_within <- comb_mods_plot_uplifts_within %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_comb_mods_uplifts_within)))

# Compute x-axis limits
x_min <- min(comb_mods_plot_uplifts_within$ci.lb)
x_max <- max(comb_mods_plot_uplifts_within$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = comb_mods_plot_uplifts_within,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(comb_mods_plot_uplifts_within, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Between-Person Associations

Regression Coefficient Table
# All Moderators Combined

comb_mods_between <- c("Female_c + AgeM_c + Year_c + WbReliability_c + SampleType + country_region +
                      StudyDesign + DeDomainAll + TypeDeMeasure + DeDataType + WbDimension")

comb_mods_uplifts_between <- setNames(
  lapply(
    comb_mods_between,
    run_ma_mod,
    data = uplifts_between,
    SamV = V_uplifts_between
  ),
  comb_mods_between
)

comb_mods_results_uplifts_between <- lapply(
  comb_mods_uplifts_between,
  extract_mod_results,
  data = uplifts_between,
  SamV = V_uplifts_between
) %>%
  bind_rows(.id = "moderator")


comb_mods_table_uplifts_between <- comb_mods_results_uplifts_between %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

comb_mods_table_uplifts_between$R2_Level1 <- ifelse(comb_mods_table_uplifts_between$R2_Level1 < 0, 0, comb_mods_table_uplifts_between$R2_Level1)
comb_mods_table_uplifts_between$R2_Level2 <- ifelse(comb_mods_table_uplifts_between$R2_Level2 < 0, 0, comb_mods_table_uplifts_between$R2_Level2)
comb_mods_table_uplifts_between$R2_Total <- ifelse(comb_mods_table_uplifts_between$R2_Total < 0, 0, comb_mods_table_uplifts_between$R2_Total)

names(comb_mods_table_uplifts_between) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                                            "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                                            "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(comb_mods_table_uplifts_between) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                         "College", "Northern Europe", "Asia", "ESM",
                                         "Work/Achievement", "Social", "Other event", "Open-response", 
                                         "Interview", "Numeric count", "Scale score", "Domain satisfaction", "Positive affect", 
                                         "Negative affect")

order_comb_mods_uplifts_between <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe","Asia",
  "Work/Achievement", "Social", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Domain satisfaction", "Positive affect", "Negative affect",
  "SWB reliability",
  "ESM"
)

comb_mods_table_uplifts_between <- comb_mods_table_uplifts_between[order_comb_mods_uplifts_between, ]

kable(round(comb_mods_table_uplifts_between, 3),
      caption = "**Results of Multivariate Moderator Analyses for the Between-Person Association Between Daily Uplifts and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 6) %>%
  pack_rows("Daily event type", 7, 9) %>%
  pack_rows("Daily event measurement", 10, 11) %>%
  pack_rows("Daily event data type", 12, 13) %>%
  pack_rows("SWB dimension", 14, 16) %>%
  column_spec(c(3:6), bold = ifelse(comb_mods_table_uplifts_between[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 114: Results of Multivariate Moderator Analyses for the Between-Person Association Between Daily Uplifts and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 164 0.004 0.004 0.923 0.380 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
College 164 -0.050 0.088 -0.567 0.578 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
% Female 164 0.001 0.001 0.822 0.451 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Mean age 164 -0.002 0.003 -0.759 0.468 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Region
Northern Europe 164 0.094 0.097 0.965 0.361 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Asia 164 -0.097 0.214 -0.455 0.693 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Daily event type
Work/Achievement 164 -0.095 0.073 -1.311 0.213 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Social 164 -0.005 0.079 -0.069 0.946 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Other event 164 -0.088 0.111 -0.792 0.541 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Daily event measurement
Open-response 164 -0.054 0.111 -0.486 0.667 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Interview 164 -0.186 0.107 -1.735 0.184 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Daily event data type
Numeric count 164 0.129 0.095 1.362 0.202 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Scale score 164 0.138 0.086 1.609 0.132 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
SWB dimension
Domain satisfaction 164 0.198 0.247 0.802 0.524 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Positive affect 164 0.029 0.065 0.449 0.680 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
Negative affect 164 -0.318 0.066 -4.789 0.006 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
SWB reliability 164 0.640 0.277 2.307 0.034 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71
ESM 164 -0.077 0.094 -0.821 0.442 0.022 0.014 54.453 35.499 89.952 68.346 0 47.71

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
comb_mods_plot_uplifts_between <- comb_mods_results_uplifts_between

comb_mods_plot_uplifts_between$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                            "College", "Northern Europe", "Asia", "ESM",
                                            "Work/Achievement", "Social", "Other event", "Open-response",
                                            "Interview", "Numeric count", "Scale score", "Domain satisfaction", 
                                            "Positive affect", "Negative affect")

comb_mods_plot_uplifts_between <- comb_mods_plot_uplifts_between %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Asia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel %in% c("Thesis", "Unpublished") ~ "Publication type",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      term %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

comb_mods_plot_uplifts_between <- comb_mods_plot_uplifts_between %>%
  mutate(modcat = factor(modcat, levels = order_modcat_between)) %>%
  arrange(modcat)

comb_mods_plot_uplifts_between$modcat <- factor(
  comb_mods_plot_uplifts_between$modcat,
  levels = rev(unique(comb_mods_plot_uplifts_between$modcat))
)

comb_mods_plot_uplifts_between <- comb_mods_plot_uplifts_between %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_comb_mods_uplifts_between)))

# Compute x-axis limits
x_min <- min(comb_mods_plot_uplifts_between$ci.lb)
x_max <- max(comb_mods_plot_uplifts_between$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = comb_mods_plot_uplifts_between,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(comb_mods_plot_uplifts_between, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Hassles & SWB

Within-Person Associations

Regression Coefficient Table
# All Moderators Combined

comb_mods_hassles_within <- setNames(
  lapply(
    comb_mods_within,
    run_ma_mod,
    data = hassles_within,
    SamV = V_hassles_within
  ),
  comb_mods_within
)

comb_mods_results_hassles_within <- lapply(
  comb_mods_hassles_within,
  extract_mod_results,
  data = hassles_within,
  SamV = V_hassles_within
) %>%
  bind_rows(.id = "moderator")


comb_mods_table_hassles_within <- comb_mods_results_hassles_within %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

comb_mods_table_hassles_within$R2_Level1 <- ifelse(comb_mods_table_hassles_within$R2_Level1 < 0, 0, comb_mods_table_hassles_within$R2_Level1)
comb_mods_table_hassles_within$R2_Level2 <- ifelse(comb_mods_table_hassles_within$R2_Level2 < 0, 0, comb_mods_table_hassles_within$R2_Level2)
comb_mods_table_hassles_within$R2_Total <- ifelse(comb_mods_table_hassles_within$R2_Total < 0, 0, comb_mods_table_hassles_within$R2_Total)

names(comb_mods_table_hassles_within) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                                           "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                                           "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(comb_mods_table_hassles_within) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                              "College", "Northern Europe", "Southern Europe", "Asia",
                                              "ESM", "Work/Achievement", "Social", "Health",
                                              "Other event ","Open-response", "Interview", "Numeric count", 
                                              "Scale score", "Positive affect", "Negative affect", "Global well-being",
                                              "Prospective")

order_comb_mods_hassles_within <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe", "Southern Europe", "Asia",
  "Work/Achievement", "Social", "Health", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Positive affect", "Negative affect", "Global well-being",
  "SWB reliability",
  "ESM",
  "Prospective"
)

comb_mods_table_hassles_within <- comb_mods_table_hassles_within[order_comb_mods_hassles_within, ]

kable(round(comb_mods_table_hassles_within, 3),
      caption = "**Results of Multivariate Moderator Analyses for the Within-Person Association Between Daily Hassles and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 7) %>%
  pack_rows("Daily event type", 8, 11) %>%
  pack_rows("Daily event measurement", 12, 13) %>%
  pack_rows("Daily event data type", 14, 15) %>%
  pack_rows("SWB dimension", 16, 18) %>%
  column_spec(c(3:6), bold = ifelse(comb_mods_table_hassles_within[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 115: Results of Multivariate Moderator Analyses for the Within-Person Association Between Daily Hassles and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 362 0.002 0.002 1.188 0.257 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
College 362 -0.036 0.031 -1.164 0.252 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
% Female 362 0.000 0.000 -0.669 0.527 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Mean age 362 -0.001 0.001 -0.910 0.376 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Region
Northern Europe 362 -0.032 0.033 -0.970 0.342 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Southern Europe 362 -0.033 0.195 -0.168 0.890 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Asia 362 0.044 0.030 1.438 0.234 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Daily event type
Work/Achievement 362 0.052 0.020 2.669 0.013 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Social 362 0.087 0.021 4.166 0.000 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Health 362 0.037 0.064 0.581 0.589 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Other event 362 0.145 0.048 3.026 0.037 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Daily event measurement
Open-response 362 -0.015 0.051 -0.287 0.786 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Interview 362 0.086 0.049 1.759 0.131 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Daily event data type
Numeric count 362 0.045 0.036 1.246 0.223 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Scale score 362 -0.046 0.034 -1.376 0.181 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
SWB dimension
Positive affect 362 0.077 0.014 5.424 0.014 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Negative affect 362 -0.066 0.017 -3.913 0.019 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Global well-being 362 -0.048 0.022 -2.212 0.080 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
SWB reliability 362 -0.020 0.084 -0.234 0.817 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
ESM 362 -0.056 0.031 -1.824 0.079 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809
Prospective 362 0.208 0.020 10.131 0.000 0.008 0.004 63.188 34.667 97.855 64.719 0 51.809

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
comb_mods_plot_hassles_within <- comb_mods_results_hassles_within

comb_mods_plot_hassles_within$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                          "College", "Northern Europe", "Southern Europe", "Asia",
                                          "ESM", "Work/Achievement", "Social", "Health",
                                          "Other event", "Open-response", "Interview", "Numeric count",
                                          "Scale score", "Positive affect", "Negative affect", "Global well-being",
                                          "Prospective")

comb_mods_plot_hassles_within <- comb_mods_plot_hassles_within %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Health", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score", "Other type") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Southern Europe", "Asia", "Australia") ~ "Region",
      modlabel %in% c("Thesis", "Unpublished") ~ "Publication type",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel == "Prospective" ~ "Correlation lag",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      term %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

comb_mods_plot_hassles_within <- comb_mods_plot_hassles_within %>%
  mutate(modcat = factor(modcat, levels = order_modcat_within)) %>%
  arrange(modcat)

comb_mods_plot_hassles_within$modcat <- factor(
  comb_mods_plot_hassles_within$modcat,
  levels = rev(unique(comb_mods_plot_hassles_within$modcat))
)

comb_mods_plot_hassles_within <- comb_mods_plot_hassles_within %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_comb_mods_hassles_within)))

# Compute x-axis limits
x_min <- min(comb_mods_plot_hassles_within$ci.lb)
x_max <- max(comb_mods_plot_hassles_within$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = comb_mods_plot_hassles_within,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(comb_mods_plot_hassles_within, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Between-Person Associations

Regression Coefficient Table
# All Moderators Combined

comb_mods_hassles_between <- setNames(
  lapply(
    comb_mods_within,
    run_ma_mod,
    data = hassles_between,
    SamV = V_hassles_between
  ),
  comb_mods_within
)

comb_mods_results_hassles_between <- lapply(
  comb_mods_hassles_between,
  extract_mod_results,
  data = hassles_between,
  SamV = V_hassles_between
) %>%
  bind_rows(.id = "moderator")


comb_mods_table_hassles_between <- comb_mods_results_hassles_between %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

comb_mods_table_hassles_between$R2_Level1 <- ifelse(comb_mods_table_hassles_between$R2_Level1 < 0, 0, comb_mods_table_hassles_between$R2_Level1)
comb_mods_table_hassles_between$R2_Level2 <- ifelse(comb_mods_table_hassles_between$R2_Level2 < 0, 0, comb_mods_table_hassles_between$R2_Level2)
comb_mods_table_hassles_between$R2_Total <- ifelse(comb_mods_table_hassles_between$R2_Total < 0, 0, comb_mods_table_hassles_between$R2_Total)

names(comb_mods_table_hassles_between) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                                            "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                                            "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(comb_mods_table_hassles_between) <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                                "College", "Northern Europe", "Southern Europe", "Asia",
                                                "Australia", "ESM", "Work/Achievement", "Social",
                                                "Health", "Other event", "Open-response", "Interview",
                                                "Numeric count", "Domain satisfaction", "Scale score", 
                                                "Positive affect", "Negative affect",
                                                "Global well-being")

order_comb_mods_hassles_between <- c(
  "Publication year",
  "College",
  "% Female",
  "Mean age",
  "Northern Europe","Southern Europe", "Asia", "Australia",
  "Work/Achievement", "Social", "Health", "Other event",
  "Open-response", "Interview",
  "Numeric count", "Scale score",
  "Positive affect", "Negative affect", "Global well-being",
  "SWB reliability",
  "ESM"
)

comb_mods_table_hassles_between <- comb_mods_table_hassles_between[order_comb_mods_hassles_between, ]

kable(round(comb_mods_table_hassles_between, 3),
      caption = "**Results of Multivariate Moderator Analyses for the Between-Person Association Between Daily Hassles and SWB**",
      escape = FALSE,
      label = NA,
      digits = 3) %>%
  pack_rows("Region", 5, 8) %>%
  pack_rows("Daily event type", 9, 12) %>%
  pack_rows("Daily event measurement", 13, 14) %>%
  pack_rows("Daily event data type", 15, 16) %>%
  pack_rows("SWB dimension", 17, 19) %>%
  column_spec(c(3:6), bold = ifelse(comb_mods_table_hassles_between[,5] < 0.05, TRUE, FALSE)) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 116: Results of Multivariate Moderator Analyses for the Between-Person Association Between Daily Hassles and SWB
ES b SE t p τ2Level1 τ2Level2 I2Level1 I2Level2 I2Total R2Level1 R2Level2 R2Total
Publication year 375 -0.006 0.002 -2.352 0.026 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
College 375 0.065 0.041 1.565 0.123 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
% Female 375 0.000 0.000 0.827 0.426 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Mean age 375 0.001 0.001 1.201 0.240 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Region
Northern Europe 375 -0.052 0.041 -1.247 0.224 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Southern Europe 375 -0.154 0.226 -0.682 0.605 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Asia 375 0.078 0.072 1.082 0.300 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Australia 375 -0.121 0.067 -1.814 0.134 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Daily event type
Work/Achievement 375 0.019 0.025 0.785 0.438 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Social 375 0.056 0.025 2.246 0.029 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Health 375 0.092 0.045 2.052 0.071 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Other event 375 0.105 0.051 2.047 0.070 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Daily event measurement
Open-response 375 -0.031 0.048 -0.640 0.543 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Interview 375 0.053 0.093 0.576 0.611 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Daily event data type
Numeric count 375 0.025 0.041 0.614 0.543 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Scale score 375 0.084 0.054 1.566 0.195 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
SWB dimension
Positive affect 375 0.129 0.031 4.168 0.011 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Negative affect 375 -0.182 0.031 -5.850 0.002 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
Global well-being 375 0.057 0.044 1.300 0.338 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
SWB reliability 375 0.286 0.166 1.719 0.094 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519
ESM 375 0.042 0.035 1.202 0.238 0.019 0.01 57.661 29.786 87.447 61.631 0 45.519

Note. Level-specific \(R^2\) values were calculated as the proportional reduction in the estimated random-effect variance components relative to the corresponding null model fitted to the same observations (see the corresponding analysis code for more details). Because the addition of moderators changes how remaining residual heterogeneity is partitioned between the within- and between-study levels, individual variance components may increase or decrease after including a moderator. Consequently, \(R^2\) values can get negative. Negative \(R^2\) values were truncated to 0.000% for presentation.

Regression Coefficient Plot
comb_mods_plot_hassles_between <- comb_mods_results_hassles_between

comb_mods_plot_hassles_between$modlabel <- c("% Female", "Mean age", "Publication year", "SWB reliability",
                                            "College", "Northern Europe", "Southern Europe", "Asia",
                                            "Australia", "ESM", "Work/Achievement", "Social",
                                            "Health", "Other event", "Open-response", "Interview", "Numeric count",
                                            "Scale score", "Domain satisfaction", "Positive affect", "Negative affect", "Global well-being")

comb_mods_plot_hassles_between <- comb_mods_plot_hassles_between %>%
  mutate(
    modcat = case_when(
      modlabel %in% c("Work/Achievement", "Social", "Health", "Other event") ~ "Daily event type",
      modlabel %in% c("Open-response", "Interview", "Other measure") ~ "Daily event measurement",
      modlabel %in% c("Numeric count", "Scale score", "Other type") ~ "Daily event data type",
      modlabel %in% c("Domain satisfaction", "Positive affect", "Negative affect", "Global well-being") ~ "SWB dimension",
      modlabel %in% c("College") ~ "Sample type",
      modlabel %in% c("Northern Europe", "Southern Europe", "Asia", "Australia") ~ "Region",
      modlabel %in% c("ESM") ~ "Study design",
      modlabel %in% c("Thesis", "Unpublished") ~ "Publication type",
      TRUE ~ modlabel
    )
  ) %>%
  mutate(
    modtype = ifelse(
      term %in% c("Female_c", "AgeM_c", "Year_c", "WbReliability_c"),
      "continuous",
      "categorical"
    ),
    significance = ifelse(
      p < .05,
      "significant",
      "non-significant"
    )
  )

comb_mods_plot_hassles_between <- comb_mods_plot_hassles_between %>%
  mutate(modcat = factor(modcat, levels = order_modcat_between)) %>%
  arrange(modcat)

comb_mods_plot_hassles_between$modcat <- factor(
  comb_mods_plot_hassles_between$modcat,
  levels = rev(unique(comb_mods_plot_hassles_between$modcat))
)

comb_mods_plot_hassles_between <- comb_mods_plot_hassles_between %>%
  mutate(modlabel = factor(modlabel, levels = rev(order_comb_mods_hassles_between)))

# Compute x-axis limits
x_min <- min(comb_mods_plot_hassles_between$ci.lb)
x_max <- max(comb_mods_plot_hassles_between$ci.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.05

plot <- ggplot(data = comb_mods_plot_hassles_between,
       aes(
         x = b,
         y = modcat,
         group = modlabel
         )
       ) +
  
   geom_point_interactive(
    aes(
      colour = significance,
      tooltip = paste0(
      "<b>", modlabel, "</b>",
      " (",ifelse(modtype == "categorical", as.character(modcat), "Continuous"), ")",
      "<br>b = ", round(b, 3),
      "<br>95% CI = [", round(ci.lb, 3), ", ", round(ci.ub, 3), "]",
      "<br>p = ", round(p, 3),
      "<br>ES = ", k
      ),
      data_id = modlabel
    ),
    position = position_dodge(width = 0.75),
    size = 2.5
  ) +

  geom_errorbarh(
    aes(
      colour = significance,
      xmin = ci.lb,
      xmax = ci.ub
      ),
    position = position_dodge(width = 0.75),
    height = 0.15,
    linewidth = .5
    ) +
geom_text(
  data = subset(comb_mods_plot_hassles_between, modtype == "categorical"),
  aes(
    x = ci.ub + right_pad,
    label = modlabel
  ),
  position = position_dodge(width = 0.75),
  hjust = 0,
  size = 3
) +
geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
    ) +
  
  theme_pub() +

  labs(
    x = "Meta-regression coefficient (b)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +
  
  theme(
    axis.text.y = element_text(hjust = 1)
    )

girafe(
  ggobj = plot,
  height_svg = 10,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Hover over the points in the plot to display more information for the corresponding moderator. Significant moderation effects are depicted in black, non-significant moderation effects are depicted in grey.

Exploratory Moderator Analyses

Correlation Lag Across Daily Diary & ESM

Daily Diary

Uplifts & SWB
# Create subsets of the data and the variance/covariance-matrix
daily_diary <- uplifts_within$StudyDesign == "daily_diary"

uplifts_within_dd <- uplifts_within[daily_diary, ]

V_uplifts_within_dd <- V_uplifts_within[daily_diary, daily_diary]

# Run moderator analysis
corr_mod_uplifts_within_dd <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = uplifts_within_dd,
    SamV = V_uplifts_within_dd
  ),
  corr_mods
)

corr_mod_results_uplifts_within_dd <- lapply(
  corr_mod_uplifts_within_dd,
  extract_mod_results,
  data = uplifts_within_dd,
  SamV = V_uplifts_within_dd
) %>%
  bind_rows(.id = "moderator")

# Create table

corr_mod_results_uplifts_within_dd <- corr_mod_results_uplifts_within_dd %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

corr_mod_results_uplifts_within_dd$R2_Level1 <- ifelse(corr_mod_results_uplifts_within_dd$R2_Level1 < 0, 0, corr_mod_results_uplifts_within_dd$R2_Level1)
corr_mod_results_uplifts_within_dd$R2_Level2 <- ifelse(corr_mod_results_uplifts_within_dd$R2_Level2 < 0, 0, corr_mod_results_uplifts_within_dd$R2_Level2)
corr_mod_results_uplifts_within_dd$R2_Total <- ifelse(corr_mod_results_uplifts_within_dd$R2_Total < 0, 0, corr_mod_results_uplifts_within_dd$R2_Total)

names(corr_mod_results_uplifts_within_dd) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(corr_mod_results_uplifts_within_dd) <- c("Prospective")

# Set moderator levels
corr_cats_uplifts_within_dd <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels = c("concurrent", "prospective")
  )
)

# Create model matrix for the moderator
corr_mods_uplifts_within_dd <- 
  model.matrix(~ CorrLag, data = corr_cats_uplifts_within_dd)[, -1]

# Get predictions
pred_corr_mods_uplifts_within_dd <- predict(
  corr_mod_uplifts_within_dd$CorrLag$robust,
  newmods = corr_mods_uplifts_within_dd
  )

# Create plotting data
df_pred_corr_mods_uplifts_within_dd <- data.frame(
  label = c("Concurrent", "Prospective"),
  r = tanh(pred_corr_mods_uplifts_within_dd$pred),
  r.lb = tanh(pred_corr_mods_uplifts_within_dd$ci.lb),
  r.ub = tanh(pred_corr_mods_uplifts_within_dd$ci.ub),
  k = corr_mod_uplifts_within_dd$CorrLag$robust$k) %>%
  mutate(
    significance = if_else(
      (r.lb > 0 & r.ub > 0) | (r.lb < 0 & r.ub < 0),
      "significant",
      "non-significant"
    ),
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ",
      round(r.ub, 3), "]",
      "<br>ES =", k
    )
  )

# Compute x-axis limits
x_min <- min(df_pred_corr_mods_uplifts_within_dd$r.lb)
x_max <- max(df_pred_corr_mods_uplifts_within_dd$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.20

# Create plot
simple_slopes_uplifts_within_dd <-
  ggplot(
    df_pred_corr_mods_uplifts_within_dd,
    aes(
      x = r,
      y = label,
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.1,
    linewidth = 0.5
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = label
    ),
    size = 3,
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_uplifts_within_dd,
  height_svg = 3,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Hassles & SWB
# Create subsets of the data and the variance/covariance-matrix
daily_diary <- hassles_within$StudyDesign == "daily_diary"

hassles_within_dd <- hassles_within[daily_diary, ]

V_hassles_within_dd <- V_hassles_within[daily_diary, daily_diary]

# Run moderator analysis
corr_mod_hassles_within_dd <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = hassles_within_dd,
    SamV = V_hassles_within_dd
  ),
  corr_mods
)

corr_mod_results_hassles_within_dd <- lapply(
  corr_mod_hassles_within_dd,
  extract_mod_results,
  data = hassles_within_dd,
  SamV = V_hassles_within_dd
) %>%
  bind_rows(.id = "moderator")

# Create table

corr_mod_results_hassles_within_dd <- corr_mod_results_hassles_within_dd %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

corr_mod_results_hassles_within_dd$R2_Level1 <- ifelse(corr_mod_results_hassles_within_dd$R2_Level1 < 0, 0, corr_mod_results_hassles_within_dd$R2_Level1)
corr_mod_results_hassles_within_dd$R2_Level2 <- ifelse(corr_mod_results_hassles_within_dd$R2_Level2 < 0, 0, corr_mod_results_hassles_within_dd$R2_Level2)
corr_mod_results_hassles_within_dd$R2_Total <- ifelse(corr_mod_results_hassles_within_dd$R2_Total < 0, 0, corr_mod_results_hassles_within_dd$R2_Total)

names(corr_mod_results_hassles_within_dd) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(corr_mod_results_hassles_within_dd) <- c("Prospective")

# Set moderator levels
corr_cats_hassles_within_dd <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels = c("concurrent", "prospective")
  )
)

# Create model matrix for the moderator
corr_mods_hassles_within_dd <- 
  model.matrix(~ CorrLag, data = corr_cats_hassles_within_dd)[, -1]

# Get predictions
pred_corr_mods_hassles_within_dd <- predict(
  corr_mod_hassles_within_dd$CorrLag$robust,
  newmods = corr_mods_hassles_within_dd
  )

# Create plotting data
df_pred_corr_mods_hassles_within_dd <- data.frame(
  label = c("Concurrent", "Prospective"),
  r = tanh(pred_corr_mods_hassles_within_dd$pred),
  r.lb = tanh(pred_corr_mods_hassles_within_dd$ci.lb),
  r.ub = tanh(pred_corr_mods_hassles_within_dd$ci.ub),
  k = corr_mod_hassles_within_dd$CorrLag$robust$k) %>%
  mutate(
    significance = if_else(
      (r.lb > 0 & r.ub > 0) | (r.lb < 0 & r.ub < 0),
      "significant",
      "non-significant"
    ),
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ",
      round(r.ub, 3), "]",
      "<br>ES =", k
    )
  )

# Compute x-axis limits
x_min <- min(df_pred_corr_mods_hassles_within_dd$r.lb)
x_max <- max(df_pred_corr_mods_hassles_within_dd$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.20

# Create plot
simple_slopes_hassles_within_dd <-
  ggplot(
    df_pred_corr_mods_hassles_within_dd,
    aes(
      x = r,
      y = label,
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.1,
    linewidth = 0.5
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = label
    ),
    size = 3,
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_hassles_within_dd,
  height_svg = 3,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

ESM

Uplifts & SWB
# Create subsets of the data and the variance/covariance-matrix
esm <- uplifts_within$StudyDesign == "esm"

uplifts_within_esm <- uplifts_within[esm, ]

V_uplifts_within_esm <- V_uplifts_within[esm, esm]

# Run moderator analysis
corr_mod_uplifts_within_esm <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = uplifts_within_esm,
    SamV = V_uplifts_within_esm
  ),
  corr_mods
)

corr_mod_results_uplifts_within_esm <- lapply(
  corr_mod_uplifts_within_esm,
  extract_mod_results,
  data = uplifts_within_esm,
  SamV = V_uplifts_within_esm
) %>%
  bind_rows(.id = "moderator")

# Create table

corr_mod_results_uplifts_within_esm <- corr_mod_results_uplifts_within_esm %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

corr_mod_results_uplifts_within_esm$R2_Level1 <- ifelse(corr_mod_results_uplifts_within_esm$R2_Level1 < 0, 0, corr_mod_results_uplifts_within_esm$R2_Level1)
corr_mod_results_uplifts_within_esm$R2_Level2 <- ifelse(corr_mod_results_uplifts_within_esm$R2_Level2 < 0, 0, corr_mod_results_uplifts_within_esm$R2_Level2)
corr_mod_results_uplifts_within_esm$R2_Total <- ifelse(corr_mod_results_uplifts_within_esm$R2_Total < 0, 0, corr_mod_results_uplifts_within_esm$R2_Total)

names(corr_mod_results_uplifts_within_esm) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(corr_mod_results_uplifts_within_esm) <- c("Prospective")

# Set moderator levels
corr_cats_uplifts_within_esm <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels = c("concurrent", "prospective")
  )
)

# Create model matrix for the moderator
corr_mods_uplifts_within_esm <- 
  model.matrix(~ CorrLag, data = corr_cats_uplifts_within_esm)[, -1]

# Get predictions
pred_corr_mods_uplifts_within_esm <- predict(
  corr_mod_uplifts_within_esm$CorrLag$robust,
  newmods = corr_mods_uplifts_within_esm
  )

# Create plotting data
df_pred_corr_mods_uplifts_within_esm <- data.frame(
  label = c("Concurrent", "Prospective"),
  r = tanh(pred_corr_mods_uplifts_within_esm$pred),
  r.lb = tanh(pred_corr_mods_uplifts_within_esm$ci.lb),
  r.ub = tanh(pred_corr_mods_uplifts_within_esm$ci.ub),
  k = corr_mod_uplifts_within_esm$CorrLag$robust$k) %>%
  mutate(
    significance = if_else(
      (r.lb > 0 & r.ub > 0) | (r.lb < 0 & r.ub < 0),
      "significant",
      "non-significant"
    ),
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ",
      round(r.ub, 3), "]",
      "<br>ES =", k
    )
  )

# Compute x-axis limits
x_min <- min(df_pred_corr_mods_uplifts_within_esm$r.lb)
x_max <- max(df_pred_corr_mods_uplifts_within_esm$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.20

# Create plot
simple_slopes_uplifts_within_esm <-
  ggplot(
    df_pred_corr_mods_uplifts_within_esm,
    aes(
      x = r,
      y = label,
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.1,
    linewidth = 0.5
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = label
    ),
    size = 3,
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_uplifts_within_esm,
  height_svg = 3,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Hassles & SWB
# Create subsets of the data and the variance/covariance-matrix
esm <- hassles_within$StudyDesign == "esm"

hassles_within_esm <- hassles_within[esm, ]

V_hassles_within_esm <- V_hassles_within[esm, esm]

# Run moderator analysis
corr_mod_hassles_within_esm <- setNames(
  lapply(
    corr_mods,
    run_ma_mod,
    data = hassles_within_esm,
    SamV = V_hassles_within_esm
  ),
  corr_mods
)

corr_mod_results_hassles_within_esm <- lapply(
  corr_mod_hassles_within_esm,
  extract_mod_results,
  data = hassles_within_esm,
  SamV = V_hassles_within_esm
) %>%
  bind_rows(.id = "moderator")

# Create table

corr_mod_results_hassles_within_esm <- corr_mod_results_hassles_within_esm %>%
  select(
    -moderator, -term, -ci.lb, -ci.ub
  )

corr_mod_results_hassles_within_esm$R2_Level1 <- ifelse(corr_mod_results_hassles_within_esm$R2_Level1 < 0, 0, corr_mod_results_hassles_within_esm$R2_Level1)
corr_mod_results_hassles_within_esm$R2_Level2 <- ifelse(corr_mod_results_hassles_within_esm$R2_Level2 < 0, 0, corr_mod_results_hassles_within_esm$R2_Level2)
corr_mod_results_hassles_within_esm$R2_Total <- ifelse(corr_mod_results_hassles_within_esm$R2_Total < 0, 0, corr_mod_results_hassles_within_esm$R2_Total)

names(corr_mod_results_hassles_within_esm) <- c("ES", "*b*", "*SE*", "*t*", "*p*", "τ^2^~Level1~", "τ^2^~Level2~",
                               "*I*^2^~Level1~","*I*^2^~Level2~", "*I*^2^~Total~",
                               "R^2^~Level1~","R^2^~Level2~", "R^2^~Total~")

row.names(corr_mod_results_hassles_within_esm) <- c("Prospective")

# Set moderator levels
corr_cats_hassles_within_esm <- data.frame(
  CorrLag = factor(
    c("concurrent", "prospective"),
    levels = c("concurrent", "prospective")
  )
)

# Create model matrix for the moderator
corr_mods_hassles_within_esm <- 
  model.matrix(~ CorrLag, data = corr_cats_hassles_within_esm)[, -1]

# Get predictions
pred_corr_mods_hassles_within_esm <- predict(
  corr_mod_hassles_within_esm$CorrLag$robust,
  newmods = corr_mods_hassles_within_esm
  )

# Create plotting data
df_pred_corr_mods_hassles_within_esm <- data.frame(
  label = c("Concurrent", "Prospective"),
  r = tanh(pred_corr_mods_hassles_within_esm$pred),
  r.lb = tanh(pred_corr_mods_hassles_within_esm$ci.lb),
  r.ub = tanh(pred_corr_mods_hassles_within_esm$ci.ub),
  k = corr_mod_hassles_within_esm$CorrLag$robust$k) %>%
  mutate(
    significance = if_else(
      (r.lb > 0 & r.ub > 0) | (r.lb < 0 & r.ub < 0),
      "significant",
      "non-significant"
    ),
    tooltip = paste0(
      "<b>", label, "</b>",
      "<br>Predicted r = ", round(r, 3),
      "<br>95% CI = [", round(r.lb, 3), ", ",
      round(r.ub, 3), "]</b>",
      "<br>ES =", k
    )
  )

# Compute x-axis limits
x_min <- min(df_pred_corr_mods_hassles_within_esm$r.lb)
x_max <- max(df_pred_corr_mods_hassles_within_esm$r.ub)
x_range <- x_max - x_min
right_pad <- x_range * 0.20

# Create plot
simple_slopes_hassles_within_esm <-
  ggplot(
    df_pred_corr_mods_hassles_within_esm,
    aes(
      x = r,
      y = label,
      color = significance
      )
  ) +

  geom_errorbarh(
    aes(
      xmin = r.lb,
      xmax = r.ub
    ),
    height = 0.1,
    linewidth = 0.5
  ) +

  geom_point_interactive(
    aes(
      tooltip = tooltip,
      data_id = label
    ),
    size = 3,
  ) +

  geom_vline(
    xintercept = 0,
    linetype = "dashed",
    colour = "grey75"
  ) +

  coord_cartesian(
    xlim = c(
      x_min,
      x_max + right_pad
    ),
    clip = "off"
  ) +

  labs(
    x = "Predicted correlation (r)",
    y = "Moderator category"
  ) +
  
  scale_colour_manual(
  values = c(
    "significant" = "black",
    "non-significant" = "grey50"
  ),
  guide = "none"
  ) +

  theme_pub() +

  theme(
    axis.text.y = element_text(hjust = 1),
    panel.grid.major.y = element_blank()
  )

# Interactive plot
girafe(
  ggobj = simple_slopes_hassles_within_esm,
  height_svg = 3,
  width_svg = 8,
  options = list(
    opts_hover(css = "fill:#D55E00;r:3.5pt;"),
    opts_tooltip(
      css = "
        background-color: white;
        color: black;
        font-family: Arial;
        font-size: 14px;
        padding: 8px;
        border: 1px solid grey;
        border-radius: 5px;
        box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
      "
    )
  )
)

Note. Points represent model-predicted correlations. Hover over the points in the plot to display more information for the corresponding moderator. Significant predicted correlations are depicted in black, non-significant correlations are depicted in grey.

Section 5: Publication Bias

Funnel Plots

funnel_uplifts_within <- funnel(
ma_uplifts_within[["model"]],
refline = ma_uplifts_within[["model"]]$b[1],
atransf = transf.ztor,
level=c(90, 95, 99),
shade=c("white", "red", "orange"), 
main="Daily Uplifts & SWB (Within-Person)", 
xlab = "Correlation (r)",
ylab = "Standard error"
)

funnel_uplifts_between <- funnel(
ma_uplifts_between[["model"]],
refline = ma_uplifts_between[["model"]]$b[1],
atransf = transf.ztor,
level=c(90, 95, 99),
shade=c("white", "red", "orange"), 
main="Daily Uplifts & SWB (Between-Person)", 
xlab = "Correlation (r)",
ylab = "Standard error"
)

funnel_hassles_within <- funnel(
ma_hassles_within[["model"]],
refline = ma_hassles_within[["model"]]$b[1],
atransf = transf.ztor,
level=c(90, 95, 99),
shade=c("white", "red", "orange"), 
main="Daily Hassles & SWB (Within-Person)", 
xlab = "Correlation (r)",
ylab = "Standard error"
)

funnel_hassles_between <- funnel(
ma_hassles_between[["model"]],
atransf = transf.ztor,
refline = ma_hassles_between[["model"]]$b[1],
level=c(90, 95, 99),
shade=c("white", "red", "orange"), 
main="Daily Hassles & SWB (Between-Person)", 
xlab = "Correlation (r)",
ylab = "Standard error"
)

Egger’s Regression Test

# Define Function for Regression Test

run_ma_egger <- function(data, SamV) {
  
  ma_egger <- rma.mv(
    yi = ES,
    V = SamV,
    mods = ~ sqrt(SamVar),
    random = list(~ 1 | EffSizeID,
                  ~ 1 | StudyID),
    data = data,
    sparse = TRUE
  )
  
  robust_ma_egger <- robust(ma_egger, cluster = data$StudyID, clubSandwich = TRUE)
  
  list(
    model = ma_egger,
    robust = robust_ma_egger
  )
}

# Define Function to Extract Results from Regression Test

extract_egger <- function(results) {
  as.data.frame(
    round(
      cbind(
        b  = results[["robust"]]$b[2],
        se = results[["robust"]]$se[2],
        z  = results[["robust"]]$zval[2],
        p  = results[["robust"]]$pval[2]
      ),
      3
    )
  )
}

# Run Models for Egger's Regression Test and Extract Results

ma_egger_uplifts_within <- run_ma_egger(uplifts_within, V_uplifts_within)
ma_egger_results_uplifts_within <- extract_egger(ma_egger_uplifts_within)

ma_egger_uplifts_between <- run_ma_egger(uplifts_between, V_uplifts_between)
ma_egger_results_uplifts_between <- extract_egger(ma_egger_uplifts_between)

ma_egger_hassles_within <- run_ma_egger(hassles_within, V_hassles_within)
ma_egger_results_hassles_within <- extract_egger(ma_egger_hassles_within)

ma_egger_hassles_between <- run_ma_egger(hassles_between, V_hassles_between)
ma_egger_results_hassles_between <- extract_egger(ma_egger_hassles_between)

# Create table

egger_results <- as.data.frame(
  rbind(
    ma_egger_results_uplifts_within,
    ma_egger_results_uplifts_between,
    ma_egger_results_hassles_within,
    ma_egger_results_hassles_between
  )
)

egger_results <- cbind(
  corrtype = c(
    "Within-person",
    "Between-person",
    "Within-person",
    "Between-person"
  ),
  egger_results
)

names(egger_results) <- c("", "*b*", "*SE*", "*t*", "*p*")

kable(egger_results,
      caption="**Egger's Regression Test of Publication Bias**",
      escape=FALSE,
      label = NA) %>% 
  pack_rows("Daily Uplifts & SWB", 1, 2) %>%
  pack_rows("Daily Hassles & SWB", 3, 4) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left")
Table 117: Egger’s Regression Test of Publication Bias
b SE t p
Daily Uplifts & SWB
Within-person -1.802 1.035 -1.741 0.110
Between-person -0.162 0.487 -0.332 0.745
Daily Hassles & SWB
Within-person 1.691 0.802 2.108 0.055
Between-person -0.073 0.307 -0.239 0.812

Note. Across all four meta-analytic models, the standard error was not a significant moderator of the effect sizes, providing no evidence for publication bias or small-study effects.

PET-PEESE

# The PET models correspond to the previously estimated models for Egger's Regression Test
# Consequently, no separate model computation is required.

# Define Function for PEESE

run_ma_peese <- function(data, SamV) {
  
  ma_peese <- rma.mv(
    yi = ES,
    V = SamV,
    mods = ~ SamVar,
    random = list(~ 1 | EffSizeID,
                  ~ 1 | StudyID),
    data = data,
    sparse = TRUE
  )
  
  robust_ma_peese <- robust(ma_peese, cluster = data$StudyID, clubSandwich = TRUE)
  
  list(
    model = ma_peese,
    robust = robust_ma_peese
  )
}

# Run Models for PEESE

ma_peese_uplifts_within <- run_ma_peese(uplifts_within, V_uplifts_within)

ma_peese_uplifts_between <- run_ma_peese(uplifts_between, V_uplifts_between)

ma_peese_hassles_within <- run_ma_peese(hassles_within, V_hassles_within)

ma_peese_hassles_between <- run_ma_peese(hassles_between, V_hassles_between)


# Define Function to Decide Between PET/PEESE

decide_petpeese <- function(pet, peese) {
  
  if(pet[["robust"]]$pval[1] < 0.05){
    
    output <- back_transform(peese)
    output$Method <- "PEESE"
    
  } else {
    
    output <- back_transform(pet)
    output$Method <- "PET"
  }
  
  output
  
}

# Extract Resuts PET/PEESE

corrected_results <- rbind(

  decide_petpeese(
    ma_egger_uplifts_within,
    ma_peese_uplifts_within
  ),

  decide_petpeese(
    ma_egger_uplifts_between,
    ma_peese_uplifts_between
  ),

  decide_petpeese(
    ma_egger_hassles_within,
    ma_peese_hassles_within
  ),

  decide_petpeese(
    ma_egger_hassles_between,
    ma_peese_hassles_between
  )
) %>%
  select(-ES)
  

# Create table

original_results <- rbind(
  results_ma_uplifts_within,
  results_ma_uplifts_between,
  results_ma_hassles_within,
  results_ma_hassles_between
) %>%
  select(-ES)

corrected_results_table <- corrected_results %>%
  mutate(across(where(is.numeric), \(x) round(x, 3))) %>%
  mutate('CI (95%)' = paste0("[", ci.lb, ", ", ci.ub, "]")) %>%
  select(-ci.lb, -ci.ub) %>%
  setNames(c("Correlation (*r*)", "*t*", "*p*", "Method", "CI (95%)"))

original_results_table <- original_results %>%
  select(-"I2_Level1", -"I2_Level2", -"I2_Total") %>%
  mutate(across(where(is.numeric), \(x) round(x, 3))) %>%
  mutate('CI (95%)' = paste0("[", ci.lb, ", ", ci.ub, "]")) %>%
  select(-ci.lb, -ci.ub) %>%
  setNames(c("Correlation (*r*)", "*t*", "*p*", "CI (95%)"))

petpeese_table <- cbind(
    corrected_results_table,
    original_results_table
)

petpeese_table <- petpeese_table %>%
  relocate(Method, .after = last_col())

petpeese_table <- cbind(
  " " = c(
    "Within-person",
    "Between-person",
    "Within-person",
    "Between-person"
  ),
  petpeese_table
)


kable(petpeese_table,
      caption="**PET-PEESE Bias-Corrected Meta-Analysis Results**",
      escape = FALSE,
      label = NA,
      row.names = FALSE
      ) %>%
  pack_rows("Daily Uplifts & SWB", 1, 2) %>%
  pack_rows("Daily Uplifts & SWB", 3, 4) %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed"), 
                fixed_thead = T, full_width = TRUE, position="left") %>% 
  add_header_above(c(" " = 1, "Adjusted Estimates" = 4, "Original Estimates" = 4, " " = 1))
Table 118: PET-PEESE Bias-Corrected Meta-Analysis Results
Adjusted Estimates
Original Estimates
Correlation (r) t p CI (95%) Correlation (r) t p CI (95%) Method
Daily Uplifts & SWB
Within-person 0.180 9.977 0 [0.143, 0.216] 0.160 9.517 0 [0.127, 0.193] PEESE
Between-person 0.219 9.172 0 [0.169, 0.268] 0.209 13.726 0 [0.179, 0.239] PEESE
Daily Uplifts & SWB
Within-person -0.197 -18.292 0 [-0.218, -0.176] -0.183 -19.962 0 [-0.201, -0.165] PEESE
Between-person -0.275 -17.126 0 [-0.305, -0.244] -0.279 -25.719 0 [-0.299, -0.259] PEESE

Note. The table presents the results of the PET-PEESE approach (Stanley and Doucouliagos, 2014) conducted to assess the potential influence of publication bias. Because the PET intercepts were statistically significant for all models, the corresponding PEESE models were estimated. Comparison of the PEESE-adjusted correlations with the original meta-analytic correlations revealed only negligible differences across all models (absolute differences ≤ .020). Therefore, the correction for potential small-study effects had a negligible impact on the estimated correlations, providing no evidence for significant publication bias.