Descriptives NEW

descriptives_table <- function(data, category) {
  count_table <- table(data[[category]])
  prop_table <- prop.table(count_table)
  combined_table <- data.frame(
    Category = names(count_table),
    Count = as.numeric(count_table),
    Proportion = as.numeric(prop_table))

  return(combined_table)
}
descriptives_table(df, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American    90 0.88235294
## 2         Hispanic / Latino     4 0.03921569
## 3         Two or more races     6 0.05882353
## 4                     White     2 0.01960784
descriptives_table(df, "T1_Q2_gender")
##     Category Count Proportion
## 1     Female    45 0.43689320
## 2       Male    55 0.53398058
## 3 Non-binary     3 0.02912621
descriptives_table(df, "T1_C1_Class_Level")
##   Category Count Proportion
## 1   Junior    66  0.6407767
## 2   Senior    37  0.3592233
descriptives_table(df_juniors, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American    56 0.86153846
## 2         Hispanic / Latino     2 0.03076923
## 3         Two or more races     6 0.09230769
## 4                     White     1 0.01538462
descriptives_table(df_juniors, "T1_C1_gender")
## [1] Count      Proportion
## <0 rows> (or 0-length row.names)
descriptives_table(df_seniors, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American    34 0.91891892
## 2         Hispanic / Latino     2 0.05405405
## 3                     White     1 0.02702703
descriptives_table(df_seniors, "T1_C1_gender")
## [1] Count      Proportion
## <0 rows> (or 0-length row.names)

Summary Stats NEW

#function to do it all at once

calculate_summary_stats_with_category <- function(data, category_var, vars) {
  # Create an empty data frame for the results
  summary_df <- data.frame()
  
  # Loop through unique values of the categorical variable
  for (category in unique(data[[category_var]])) {
    # Subset the data for the current category
    subset_data <- data[data[[category_var]] == category, vars, drop = FALSE]
    
    # Calculate mean and standard deviation for each variable, ignoring NA values
    means <- apply(subset_data, 2, function(x) mean(x, na.rm = TRUE))
    sds <- apply(subset_data, 2, function(x) sd(x, na.rm = TRUE))
    
    # Create a summary dataframe for the current category
    category_summary <- data.frame(
      Category = category,
      Variable = names(means),
      Mean = means,
      SD = sds
    )
    
    # Combine with the overall summary dataframe
    summary_df <- rbind(summary_df, category_summary)
  }
  
  # Return the summary dataframe
  return(summary_df)
}

calculate_summary_stats_with_category(data = df, category_var = "T1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
##                                       Category                         Variable
## T1_C_ACB                          Intervention                         T1_C_ACB
## T1_C_AD                           Intervention                          T1_C_AD
## T2_C_ACB                          Intervention                         T2_C_ACB
## T2_C_AD                           Intervention                          T2_C_AD
## T1_Q131_psych_measures_1          Intervention         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded  Intervention T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_1          Intervention         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded  Intervention T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_3          Intervention         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_6          Intervention         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_11         Intervention        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_3          Intervention         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_6          Intervention         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_11         Intervention        T2_Q131_psych_measures_11
## T1_C_ACB1                              Control                         T1_C_ACB
## T1_C_AD1                               Control                          T1_C_AD
## T2_C_ACB1                              Control                         T2_C_ACB
## T2_C_AD1                               Control                          T2_C_AD
## T1_Q131_psych_measures_12              Control         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded1      Control T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_12              Control         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded1      Control T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_31              Control         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_61              Control         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_111             Control        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_31              Control         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_61              Control         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_111             Control        T2_Q131_psych_measures_11
##                                       Mean        SD
## T1_C_ACB                          5.119048 1.3740164
## T1_C_AD                           5.793651 0.6785621
## T2_C_ACB                          5.265625 1.1638671
## T2_C_AD                           5.750000 1.0608714
## T1_Q131_psych_measures_1          5.190476 1.5809552
## T1_Q131_psych_measures_7_recoded  5.047619 1.5452899
## T2_Q131_psych_measures_1          5.250000 1.5026858
## T2_Q131_psych_measures_7_recoded  5.242424 1.4148830
## T1_Q131_psych_measures_3          5.119048 1.5957624
## T1_Q131_psych_measures_6          6.238095 0.9055257
## T1_Q131_psych_measures_11         6.023810 1.0238163
## T2_Q131_psych_measures_3          4.718750 1.8532339
## T2_Q131_psych_measures_6          6.060606 1.2231975
## T2_Q131_psych_measures_11         6.406250 1.1875531
## T1_C_ACB1                         4.755814 1.3200473
## T1_C_AD1                          5.457364 1.1103726
## T2_C_ACB1                         5.025000 1.6249260
## T2_C_AD1                          5.483333 0.9396308
## T1_Q131_psych_measures_12         5.318182 1.4268640
## T1_Q131_psych_measures_7_recoded1 4.209302 1.7121156
## T2_Q131_psych_measures_12         5.225000 1.6406300
## T2_Q131_psych_measures_7_recoded1 4.829268 1.7734492
## T1_Q131_psych_measures_31         5.045455 1.6837741
## T1_Q131_psych_measures_61         5.465116 1.5788609
## T1_Q131_psych_measures_111        5.886364 1.0829741
## T2_Q131_psych_measures_31         4.900000 1.4464811
## T2_Q131_psych_measures_61         5.725000 1.1980219
## T2_Q131_psych_measures_111        5.829268 0.9975580

Summary Stats Juniors NEW

calculate_summary_stats_with_category(data = df_juniors, category_var = "T1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
##                                       Category                         Variable
## T1_C_ACB                          Intervention                         T1_C_ACB
## T1_C_AD                           Intervention                          T1_C_AD
## T2_C_ACB                          Intervention                         T2_C_ACB
## T2_C_AD                           Intervention                          T2_C_AD
## T1_Q131_psych_measures_1          Intervention         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded  Intervention T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_1          Intervention         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded  Intervention T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_3          Intervention         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_6          Intervention         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_11         Intervention        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_3          Intervention         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_6          Intervention         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_11         Intervention        T2_Q131_psych_measures_11
## T1_C_ACB1                              Control                         T1_C_ACB
## T1_C_AD1                               Control                          T1_C_AD
## T2_C_ACB1                              Control                         T2_C_ACB
## T2_C_AD1                               Control                          T2_C_AD
## T1_Q131_psych_measures_12              Control         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded1      Control T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_12              Control         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded1      Control T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_31              Control         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_61              Control         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_111             Control        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_31              Control         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_61              Control         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_111             Control        T2_Q131_psych_measures_11
##                                       Mean        SD
## T1_C_ACB                          5.220000 1.4367208
## T1_C_AD                           5.826667 0.6812298
## T2_C_ACB                          5.526316 1.1603841
## T2_C_AD                           5.964912 0.5199090
## T1_Q131_psych_measures_1          5.280000 1.5416441
## T1_Q131_psych_measures_7_recoded  5.160000 1.5989580
## T2_Q131_psych_measures_1          5.526316 1.3067526
## T2_Q131_psych_measures_7_recoded  5.526316 1.5043796
## T1_Q131_psych_measures_3          4.840000 1.5459625
## T1_Q131_psych_measures_6          6.400000 0.9574271
## T1_Q131_psych_measures_11         6.240000 0.8793937
## T2_Q131_psych_measures_3          4.894737 1.4100724
## T2_Q131_psych_measures_6          6.315789 0.8200699
## T2_Q131_psych_measures_11         6.684211 0.6710383
## T1_C_ACB1                         4.592593 1.3376000
## T1_C_AD1                          5.435897 1.1576575
## T2_C_ACB1                         5.134615 1.6465582
## T2_C_AD1                          5.589744 0.8289629
## T1_Q131_psych_measures_12         5.222222 1.5525001
## T1_Q131_psych_measures_7_recoded1 3.962963 1.7646416
## T2_Q131_psych_measures_12         5.269231 1.6627133
## T2_Q131_psych_measures_7_recoded1 5.000000 1.7888544
## T1_Q131_psych_measures_31         4.851852 1.8124294
## T1_Q131_psych_measures_61         5.576923 1.4191005
## T1_Q131_psych_measures_111        5.925926 1.1742731
## T2_Q131_psych_measures_31         5.000000 1.4966630
## T2_Q131_psych_measures_61         5.807692 1.1668498
## T2_Q131_psych_measures_111        5.961538 0.8236878

Summary Stats Seniors NEW

calculate_summary_stats_with_category(data = df_seniors, category_var = "T1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
##                                       Category                         Variable
## T1_C_ACB                          Intervention                         T1_C_ACB
## T1_C_AD                           Intervention                          T1_C_AD
## T2_C_ACB                          Intervention                         T2_C_ACB
## T2_C_AD                           Intervention                          T2_C_AD
## T1_Q131_psych_measures_1          Intervention         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded  Intervention T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_1          Intervention         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded  Intervention T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_3          Intervention         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_6          Intervention         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_11         Intervention        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_3          Intervention         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_6          Intervention         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_11         Intervention        T2_Q131_psych_measures_11
## T1_C_ACB1                              Control                         T1_C_ACB
## T1_C_AD1                               Control                          T1_C_AD
## T2_C_ACB1                              Control                         T2_C_ACB
## T2_C_AD1                               Control                          T2_C_AD
## T1_Q131_psych_measures_12              Control         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded1      Control T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_12              Control         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded1      Control T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_31              Control         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_61              Control         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_111             Control        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_31              Control         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_61              Control         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_111             Control        T2_Q131_psych_measures_11
##                                       Mean        SD
## T1_C_ACB                          4.970588 1.3046861
## T1_C_AD                           5.745098 0.6925137
## T2_C_ACB                          4.884615 1.1021541
## T2_C_AD                           5.435897 1.5237904
## T1_Q131_psych_measures_1          5.058824 1.6759545
## T1_Q131_psych_measures_7_recoded  4.882353 1.4950900
## T2_Q131_psych_measures_1          4.846154 1.7246330
## T2_Q131_psych_measures_7_recoded  4.857143 1.2314559
## T1_Q131_psych_measures_3          5.529412 1.6247172
## T1_Q131_psych_measures_6          6.000000 0.7905694
## T1_Q131_psych_measures_11         5.705882 1.1599949
## T2_Q131_psych_measures_3          4.461538 2.4019223
## T2_Q131_psych_measures_6          5.714286 1.5898027
## T2_Q131_psych_measures_11         6.000000 1.6329932
## T1_C_ACB1                         5.031250 1.2841177
## T1_C_AD1                          5.490196 1.0679527
## T2_C_ACB1                         4.821429 1.6244187
## T2_C_AD1                          5.285714 1.1236170
## T1_Q131_psych_measures_12         5.470588 1.2307339
## T1_Q131_psych_measures_7_recoded1 4.625000 1.5864005
## T2_Q131_psych_measures_12         5.142857 1.6574839
## T2_Q131_psych_measures_7_recoded1 4.533333 1.7674302
## T1_Q131_psych_measures_31         5.352941 1.4552138
## T1_Q131_psych_measures_61         5.294118 1.8290949
## T1_Q131_psych_measures_111        5.823529 0.9510057
## T2_Q131_psych_measures_31         4.714286 1.3827827
## T2_Q131_psych_measures_61         5.571429 1.2838815
## T2_Q131_psych_measures_111        5.600000 1.2421180

T-test NEW

ttest <- nice_t_test(data = df, response = names(df)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttest
##                  Dependent Variable           t       df           p
## 1          T1_Q131_psych_measures_1 -0.39264987 82.17556 0.695594767
## 2          T1_Q131_psych_measures_3  0.20809944 83.99633 0.835655080
## 3          T1_Q131_psych_measures_6  2.77670496 67.24008 0.007107509
## 4  T1_Q131_psych_measures_7_recoded  2.37087158 82.49215 0.020077735
## 5         T1_Q131_psych_measures_11  0.60499890 83.99305 0.546810802
## 6          T2_Q131_psych_measures_1  0.06733283 68.67434 0.946512392
## 7          T2_Q131_psych_measures_3 -0.45364264 57.68829 0.651788035
## 8          T2_Q131_psych_measures_6  1.17759288 67.83239 0.243074146
## 9  T2_Q131_psych_measures_7_recoded  1.11471063 71.99763 0.268681636
## 10        T2_Q131_psych_measures_11  2.20707116 60.35943 0.031122617
## 11                         T1_C_ACB  1.24241941 82.66308 0.217594909
## 12                          T1_C_AD  1.68914094 69.80381 0.095654860
## 13                         T2_C_ACB  0.73104722 69.23723 0.467217169
## 14                          T2_C_AD  1.11457146 62.54072 0.269299020
##              d    CI_lower  CI_upper
## 1  -0.08490791 -0.50766123 0.3383496
## 2   0.04483540 -0.37816299 0.4675675
## 3   0.59878288  0.16223371 1.0318807
## 4   0.51372460  0.07992179 0.9445335
## 5   0.13034049 -0.29331487 0.5532226
## 6   0.01581252 -0.44909731 0.4839424
## 7  -0.11057800 -0.57539014 0.3550214
## 8   0.27749030 -0.18663906 0.7396870
## 9   0.25442352 -0.20669356 0.7137906
## 10  0.53196927  0.05966325 1.0006588
## 11  0.26966582 -0.15831163 0.6960355
## 12  0.36446661 -0.06540596 0.7921818
## 13  0.16720718 -0.29905462 0.6322809
## 14  0.26796712 -0.19993315 0.7339732
ttesta <- nice_t_test(data = df, response = names(df)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test. 
## 
ttesta
##                  Dependent Variable           t df           p           d
## 1          T1_Q131_psych_measures_1 -0.39359530 84 0.694877139 -0.08490791
## 2          T1_Q131_psych_measures_3  0.20783696 84 0.835859351  0.04483540
## 3          T1_Q131_psych_measures_6  2.76006166 83 0.007110222  0.59878288
## 4  T1_Q131_psych_measures_7_recoded  2.36798952 83 0.020209904  0.51372460
## 5         T1_Q131_psych_measures_11  0.60420052 84 0.547338763  0.13034049
## 6          T2_Q131_psych_measures_1  0.06667143 70 0.947033340  0.01581252
## 7          T2_Q131_psych_measures_3 -0.46623777 70 0.642492981 -0.11057800
## 8          T2_Q131_psych_measures_6  1.17997644 71 0.241948038  0.27749030
## 9  T2_Q131_psych_measures_7_recoded  1.08790328 72 0.280266153  0.25442352
## 10        T2_Q131_psych_measures_11  2.25523618 71 0.027202600  0.53196927
## 11                         T1_C_ACB  1.24301199 83 0.217363370  0.26966582
## 12                          T1_C_AD  1.67999180 83 0.096719293  0.36446661
## 13                         T2_C_ACB  0.70500735 70 0.483144958  0.16720718
## 14                          T2_C_AD  1.12984860 70 0.262396784  0.26796712
##       CI_lower  CI_upper
## 1  -0.50766123 0.3383496
## 2  -0.37816299 0.4675675
## 3   0.16223371 1.0318807
## 4   0.07992179 0.9445335
## 5  -0.29331487 0.5532226
## 6  -0.44909731 0.4839424
## 7  -0.57539014 0.3550214
## 8  -0.18663906 0.7396870
## 9  -0.20669356 0.7137906
## 10  0.05966325 1.0006588
## 11 -0.15831163 0.6960355
## 12 -0.06540596 0.7921818
## 13 -0.29905462 0.6322809
## 14 -0.19993315 0.7339732

T-test Juniors NEW

ttestj <- nice_t_test(data = df_juniors, response = names(df_juniors)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttestj
##                  Dependent Variable          t       df           p
## 1          T1_Q131_psych_measures_1  0.1345725 49.74561 0.893492871
## 2          T1_Q131_psych_measures_3 -0.0254269 49.68184 0.979816316
## 3          T1_Q131_psych_measures_6  2.4364370 44.00062 0.018948431
## 4  T1_Q131_psych_measures_7_recoded  2.5661357 49.97989 0.013328245
## 5         T1_Q131_psych_measures_11  1.0967652 47.96963 0.278219510
## 6          T2_Q131_psych_measures_1  0.5803922 42.72670 0.564698841
## 7          T2_Q131_psych_measures_3 -0.2409825 40.21363 0.810793112
## 8          T2_Q131_psych_measures_6  1.7151125 42.95871 0.093530651
## 9  T2_Q131_psych_measures_7_recoded  1.0694681 42.07337 0.290956260
## 10        T2_Q131_psych_measures_11  3.2385571 42.42672 0.002336208
## 11                         T1_C_ACB  1.6263011 48.90484 0.110313033
## 12                          T1_C_AD  1.4758308 40.74441 0.147676281
## 13                         T2_C_ACB  0.9359604 42.96552 0.354524743
## 14                          T2_C_AD  1.8606349 42.18237 0.069776110
##               d    CI_lower  CI_upper
## 1   0.037341062 -0.50689281 0.5812026
## 2  -0.007013853 -0.55097930 0.5370216
## 3   0.677377461  0.10904958 1.2391821
## 4   0.709504414  0.14476902 1.2675773
## 5   0.301071979 -0.24758662 0.8467610
## 6   0.168706619 -0.42488429 0.7603486
## 7  -0.072046715 -0.66337342 0.5201147
## 8   0.490483810 -0.11278928 1.0882324
## 9   0.314094781 -0.28294470 0.9075363
## 10  0.946511801  0.31729449 1.5658329
## 11  0.452654354 -0.10069682 1.0016023
## 12  0.409398577 -0.14756839 0.9622837
## 13  0.267767158 -0.32800574 0.8604628
## 14  0.523969393 -0.08073509 1.1227960
ttestja <- nice_t_test(data = df_juniors, response = names(df_juniors)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test. 
## 
ttestja
##                  Dependent Variable          t df           p            d
## 1          T1_Q131_psych_measures_1  0.1345355 50 0.893519252  0.037341062
## 2          T1_Q131_psych_measures_3 -0.0252701 50 0.979940113 -0.007013853
## 3          T1_Q131_psych_measures_6  2.4182563 49 0.019357353  0.677377461
## 4  T1_Q131_psych_measures_7_recoded  2.5562617 50 0.013665076  0.709504414
## 5         T1_Q131_psych_measures_11  1.0847273 50 0.283245143  0.301071979
## 6          T2_Q131_psych_measures_1  0.5589711 43 0.579081151  0.168706619
## 7          T2_Q131_psych_measures_3 -0.2387104 43 0.812464154 -0.072046715
## 8          T2_Q131_psych_measures_6  1.6251067 43 0.111448116  0.490483810
## 9  T2_Q131_psych_measures_7_recoded  1.0406817 43 0.303839529  0.314094781
## 10        T2_Q131_psych_measures_11  3.1360520 43 0.003085661  0.946511801
## 11                         T1_C_ACB  1.6308609 50 0.109203631  0.452654354
## 12                          T1_C_AD  1.4615643 49 0.150244465  0.409398577
## 13                         T2_C_ACB  0.8871857 43 0.379914398  0.267767158
## 14                          T2_C_AD  1.7360536 43 0.089715615  0.523969393
##       CI_lower  CI_upper
## 1  -0.50689281 0.5812026
## 2  -0.55097930 0.5370216
## 3   0.10904958 1.2391821
## 4   0.14476902 1.2675773
## 5  -0.24758662 0.8467610
## 6  -0.42488429 0.7603486
## 7  -0.66337342 0.5201147
## 8  -0.11278928 1.0882324
## 9  -0.28294470 0.9075363
## 10  0.31729449 1.5658329
## 11 -0.10069682 1.0016023
## 12 -0.14756839 0.9622837
## 13 -0.32800574 0.8604628
## 14 -0.08073509 1.1227960

T-test Seniors NEW

ttests <- nice_t_test(data = df_seniors, response = names(df_seniors)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttests
##                  Dependent Variable          t       df         p           d
## 1          T1_Q131_psych_measures_1 -0.8164966 29.36878 0.4207900 -0.28005602
## 2          T1_Q131_psych_measures_3  0.3335908 31.61923 0.7408906  0.11442071
## 3          T1_Q131_psych_measures_6  1.4605935 21.77643 0.1584058  0.50097943
## 4  T1_Q131_psych_measures_7_recoded  0.4789012 30.54774 0.6354193  0.16711786
## 5         T1_Q131_psych_measures_11 -0.3233808 30.81525 0.7485913 -0.11091871
## 6          T2_Q131_psych_measures_1 -0.4551065 24.66404 0.6530136 -0.17555905
## 7          T2_Q131_psych_measures_3 -0.3317691 18.87269 0.7437196 -0.13028353
## 8          T2_Q131_psych_measures_6  0.2615742 24.89655 0.7958016  0.09886575
## 9  T2_Q131_psych_measures_7_recoded  0.5755086 25.05233 0.5700811  0.21123401
## 10        T2_Q131_psych_measures_11  0.7207671 22.25519 0.4785562  0.27858920
## 11                         T1_C_ACB -0.1345750 30.93253 0.8938198 -0.04685122
## 12                          T1_C_AD  0.8257089 27.43396 0.4160923  0.28321583
## 13                         T2_C_ACB  0.1190039 22.96915 0.9063069  0.04518858
## 14                          T2_C_AD  0.2896773 21.99976 0.7747757  0.11285149
##      CI_lower  CI_upper
## 1  -0.9536252 0.3978282
## 2  -0.5593098 0.7863735
## 3  -0.1860857 1.1804892
## 4  -0.5181607 0.8497217
## 5  -0.7828638 0.5627497
## 6  -0.9302784 0.5826395
## 7  -0.8847533 0.6267724
## 8  -0.6433581 0.8392004
## 9  -0.5212022 0.9397995
## 10 -0.4705559 1.0224565
## 11 -0.7292594 0.6363091
## 12 -0.3947708 0.9568397
## 13 -0.7102722 0.7997505
## 14 -0.6438189 0.8672806
ttestsa <- nice_t_test(data = df_seniors, response = names(df_seniors)[c(104,106,109,110,114,162,164,167,168,172,287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test. 
## 
ttestsa
##                  Dependent Variable          t df         p           d
## 1          T1_Q131_psych_measures_1 -0.8164966 32 0.4202532 -0.28005602
## 2          T1_Q131_psych_measures_3  0.3335908 32 0.7408645  0.11442071
## 3          T1_Q131_psych_measures_6  1.4605935 32 0.1538768  0.50097943
## 4  T1_Q131_psych_measures_7_recoded  0.4797891 31 0.6347453  0.16711786
## 5         T1_Q131_psych_measures_11 -0.3233808 32 0.7485107 -0.11091871
## 6          T2_Q131_psych_measures_1 -0.4558028 25 0.6524663 -0.17555905
## 7          T2_Q131_psych_measures_3 -0.3382543 25 0.7379958 -0.13028353
## 8          T2_Q131_psych_measures_6  0.2615742 26 0.7957108  0.09886575
## 9  T2_Q131_psych_measures_7_recoded  0.5684267 27 0.5744430  0.21123401
## 10        T2_Q131_psych_measures_11  0.7351950 26 0.4688010  0.27858920
## 11                         T1_C_ACB -0.1345081 31 0.8938703 -0.04685122
## 12                          T1_C_AD  0.8257089 32 0.4150830  0.28321583
## 13                         T2_C_ACB  0.1173228 25 0.9075417  0.04518858
## 14                          T2_C_AD  0.2929956 25 0.7719438  0.11285149
##      CI_lower  CI_upper
## 1  -0.9536252 0.3978282
## 2  -0.5593098 0.7863735
## 3  -0.1860857 1.1804892
## 4  -0.5181607 0.8497217
## 5  -0.7828638 0.5627497
## 6  -0.9302784 0.5826395
## 7  -0.8847533 0.6267724
## 8  -0.6433581 0.8392004
## 9  -0.5212022 0.9397995
## 10 -0.4705559 1.0224565
## 11 -0.7292594 0.6363091
## 12 -0.3947708 0.9568397
## 13 -0.7102722 0.7997505
## 14 -0.6438189 0.8672806

Summary NEW

# New results from Danika's analysis
knitr::include_graphics("All_NEW.png")

knitr::include_graphics("Juniors_NEW.png")

knitr::include_graphics("Seniors_NEW.png")

Descriptives ORIGINAL

descriptives_table <- function(data, category) {
  count_table <- table(data[[category]])
  prop_table <- prop.table(count_table)
  combined_table <- data.frame(
    Category = names(count_table),
    Count = as.numeric(count_table),
    Proportion = as.numeric(prop_table))

  return(combined_table)
}
descriptives_table(df1, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American   108 0.89256198
## 2         Hispanic / Latino     4 0.03305785
## 3         Two or more races     7 0.05785124
## 4                     White     2 0.01652893
descriptives_table(df1, "T1_Q2_gender")
##     Category Count Proportion
## 1     Female    55 0.45081967
## 2       Male    64 0.52459016
## 3 Non-binary     3 0.02459016
descriptives_table(df1, "T1_C1_Class_Level")
##   Category Count Proportion
## 1   Junior    76  0.6229508
## 2   Senior    46  0.3770492
descriptives_table(df1_juniors, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American    65 0.86666667
## 2         Hispanic / Latino     2 0.02666667
## 3         Two or more races     7 0.09333333
## 4                     White     1 0.01333333
descriptives_table(df1_juniors, "T1_C1_gender")
## [1] Count      Proportion
## <0 rows> (or 0-length row.names)
descriptives_table(df1_seniors, "T1_C1_race")
##                    Category Count Proportion
## 1 Black or African American    43 0.93478261
## 2         Hispanic / Latino     2 0.04347826
## 3                     White     1 0.02173913
descriptives_table(df1_seniors, "T1_C1_gender")
## [1] Count      Proportion
## <0 rows> (or 0-length row.names)

Summary Stats OLD

calculate_summary_stats_with_category(data = df1, category_var = "T1_C1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
##                                       Category                         Variable
## T1_C_ACB                          Intervention                         T1_C_ACB
## T1_C_AD                           Intervention                          T1_C_AD
## T2_C_ACB                          Intervention                         T2_C_ACB
## T2_C_AD                           Intervention                          T2_C_AD
## T1_Q131_psych_measures_1          Intervention         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded  Intervention T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_1          Intervention         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded  Intervention T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_3          Intervention         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_6          Intervention         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_11         Intervention        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_3          Intervention         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_6          Intervention         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_11         Intervention        T2_Q131_psych_measures_11
## T1_C_ACB1                              Control                         T1_C_ACB
## T1_C_AD1                               Control                          T1_C_AD
## T2_C_ACB1                              Control                         T2_C_ACB
## T2_C_AD1                               Control                          T2_C_AD
## T1_Q131_psych_measures_12              Control         T1_Q131_psych_measures_1
## T1_Q131_psych_measures_7_recoded1      Control T1_Q131_psych_measures_7_recoded
## T2_Q131_psych_measures_12              Control         T2_Q131_psych_measures_1
## T2_Q131_psych_measures_7_recoded1      Control T2_Q131_psych_measures_7_recoded
## T1_Q131_psych_measures_31              Control         T1_Q131_psych_measures_3
## T1_Q131_psych_measures_61              Control         T1_Q131_psych_measures_6
## T1_Q131_psych_measures_111             Control        T1_Q131_psych_measures_11
## T2_Q131_psych_measures_31              Control         T2_Q131_psych_measures_3
## T2_Q131_psych_measures_61              Control         T2_Q131_psych_measures_6
## T2_Q131_psych_measures_111             Control        T2_Q131_psych_measures_11
##                                       Mean        SD
## T1_C_ACB                          5.068627 1.3528474
## T1_C_AD                           5.633987 0.8413082
## T2_C_ACB                          5.236111 1.1740413
## T2_C_AD                           5.685185 1.0171371
## T1_Q131_psych_measures_1          5.156863 1.5539955
## T1_Q131_psych_measures_7_recoded  4.980392 1.4763495
## T2_Q131_psych_measures_1          5.250000 1.4808299
## T2_Q131_psych_measures_7_recoded  5.189189 1.4110248
## T1_Q131_psych_measures_3          5.039216 1.5226396
## T1_Q131_psych_measures_6          6.058824 1.0846523
## T1_Q131_psych_measures_11         5.803922 1.1139050
## T2_Q131_psych_measures_3          4.722222 1.7665319
## T2_Q131_psych_measures_6          5.945946 1.2460147
## T2_Q131_psych_measures_11         6.333333 1.1710801
## T1_C_ACB1                         4.744898 1.2752551
## T1_C_AD1                          5.530612 1.0734989
## T2_C_ACB1                         4.975610 1.6353563
## T2_C_AD1                          5.495935 0.9313131
## T1_Q131_psych_measures_12         5.420000 1.3863769
## T1_Q131_psych_measures_7_recoded1 4.081633 1.7776006
## T2_Q131_psych_measures_12         5.146341 1.6964813
## T2_Q131_psych_measures_7_recoded1 4.809524 1.7563556
## T1_Q131_psych_measures_31         5.160000 1.6457738
## T1_Q131_psych_measures_61         5.551020 1.5283600
## T1_Q131_psych_measures_111        5.900000 1.0546302
## T2_Q131_psych_measures_31         4.902439 1.4283711
## T2_Q131_psych_measures_61         5.731707 1.1837312
## T2_Q131_psych_measures_111        5.857143 1.0017406

Summary Stats Juniors OLD

calculate_summary_stats_with_category(data = df1_juniors, category_var = "T1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
## data frame with 0 columns and 0 rows

Summary Stats Seniors OLD

calculate_summary_stats_with_category(data = df1_seniors, category_var = "T1_Condition" , vars = c("T1_C_ACB", "T1_C_AD", "T2_C_ACB", "T2_C_AD","T1_Q131_psych_measures_1",  "T1_Q131_psych_measures_7_recoded", "T2_Q131_psych_measures_1", "T2_Q131_psych_measures_7_recoded", "T1_Q131_psych_measures_3", "T1_Q131_psych_measures_6", "T1_Q131_psych_measures_11", "T2_Q131_psych_measures_3", "T2_Q131_psych_measures_6", "T2_Q131_psych_measures_11"))
## data frame with 0 columns and 0 rows

T-test ORIGINAL

ttest1 <- nice_t_test(data = df1, response = names(df1)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttest1
##                  Dependent Variable          t       df           p           d
## 1          T1_Q131_psych_measures_1 -0.8983785 98.13724 0.371182664 -0.17858968
## 2          T1_Q131_psych_measures_3 -0.3826605 98.06682 0.702799658 -0.07621514
## 3          T1_Q131_psych_measures_6  1.9092615 86.29545 0.059551403  0.38448461
## 4  T1_Q131_psych_measures_7_recoded  2.7447110 93.34566 0.007264322  0.55109244
## 5         T1_Q131_psych_measures_11 -0.4451989 98.88127 0.657149089 -0.08855385
## 6          T2_Q131_psych_measures_1  0.2862785 74.99871 0.775454094  0.06480820
## 7          T2_Q131_psych_measures_3 -0.4878815 67.30949 0.627219285 -0.11297968
## 8          T2_Q131_psych_measures_6  0.7764259 74.21483 0.439965113  0.17652679
## 9  T2_Q131_psych_measures_7_recoded  1.0642869 76.38729 0.290551502  0.23667222
## 10        T2_Q131_psych_measures_11  1.9126164 69.37459 0.059926133  0.43968761
## 11                         T1_C_ACB  1.2317435 97.96597 0.220993380  0.24610446
## 12                          T1_C_AD  0.5345607 90.95821 0.594257935  0.10745118
## 13                         T2_C_ACB  0.8096621 72.27913 0.420791953  0.18107923
## 14                          T2_C_AD  0.8472621 71.56320 0.399673747  0.19464030
##       CI_lower  CI_upper
## 1  -0.56899795 0.2127159
## 2  -0.46623365 0.3141875
## 3  -0.01221716 0.7792618
## 4   0.15016724 0.9493091
## 5  -0.47859180 0.3019302
## 6  -0.38318921 0.5123744
## 7  -0.56063010 0.3354215
## 8  -0.26936223 0.6212607
## 9  -0.20757510 0.6793956
## 10 -0.01232314 0.8888765
## 11 -0.14809632 0.6390604
## 12 -0.28518110 0.4995367
## 13 -0.26811674 0.6290750
## 14 -0.25474519 0.6427363
ttest1a <- nice_t_test(data = df1, response = names(df1)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test. 
## 
ttest1a
##                  Dependent Variable          t df           p           d
## 1          T1_Q131_psych_measures_1 -0.8973581 99 0.371704956 -0.17858968
## 2          T1_Q131_psych_measures_3 -0.3829576 99 0.702572248 -0.07621514
## 3          T1_Q131_psych_measures_6  1.9220385 98 0.057505432  0.38448461
## 4  T1_Q131_psych_measures_7_recoded  2.7549110 98 0.006999776  0.55109244
## 5         T1_Q131_psych_measures_11 -0.4449558 99 0.657323039 -0.08855385
## 6          T2_Q131_psych_measures_1  0.2837447 75 0.777387856  0.06480820
## 7          T2_Q131_psych_measures_3 -0.4946502 75 0.622292999 -0.11297968
## 8          T2_Q131_psych_measures_6  0.7784955 76 0.438694062  0.17652679
## 9  T2_Q131_psych_measures_7_recoded  1.0496856 77 0.297146126  0.23667222
## 10        T2_Q131_psych_measures_11  1.9358550 76 0.056604520  0.43968761
## 11                         T1_C_ACB  1.2302761 98 0.221538721  0.24610446
## 12                          T1_C_AD  0.5371485 98 0.592382582  0.10745118
## 13                         T2_C_ACB  0.7928051 75 0.430392166  0.18107923
## 14                          T2_C_AD  0.8521785 75 0.396828080  0.19464030
##       CI_lower  CI_upper
## 1  -0.56899795 0.2127159
## 2  -0.46623365 0.3141875
## 3  -0.01221716 0.7792618
## 4   0.15016724 0.9493091
## 5  -0.47859180 0.3019302
## 6  -0.38318921 0.5123744
## 7  -0.56063010 0.3354215
## 8  -0.26936223 0.6212607
## 9  -0.20757510 0.6793956
## 10 -0.01232314 0.8888765
## 11 -0.14809632 0.6390604
## 12 -0.28518110 0.4995367
## 13 -0.26811674 0.6290750
## 14 -0.25474519 0.6427363

T-test Juniors ORIGINAL

ttest1j <- nice_t_test(data = df1_juniors, response = names(df1_juniors)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttest1j
##                  Dependent Variable           t       df           p
## 1          T1_Q131_psych_measures_1  0.03081797 57.72519 0.975521013
## 2          T1_Q131_psych_measures_3 -0.22136048 54.25480 0.825642796
## 3          T1_Q131_psych_measures_6  2.09190653 50.46765 0.041497902
## 4  T1_Q131_psych_measures_7_recoded  2.91299454 55.77216 0.005140973
## 5         T1_Q131_psych_measures_11  0.61225963 55.12509 0.542883360
## 6          T2_Q131_psych_measures_1  0.81377095 44.92821 0.420068272
## 7          T2_Q131_psych_measures_3 -0.34323540 44.39074 0.733041658
## 8          T2_Q131_psych_measures_6  1.25244043 44.99534 0.216880140
## 9  T2_Q131_psych_measures_7_recoded  1.09035527 44.90985 0.281372524
## 10        T2_Q131_psych_measures_11  2.87861783 44.44777 0.006120233
## 11                         T1_C_ACB  1.78232506 57.97100 0.079933196
## 12                          T1_C_AD  1.03876165 48.18783 0.304099903
## 13                         T2_C_ACB  1.06663440 44.21520 0.291926652
## 14                          T2_C_AD  1.47932188 43.54660 0.146252581
##               d    CI_lower  CI_upper
## 1   0.007961899 -0.49841643 0.5142716
## 2  -0.057568683 -0.56377093 0.4491286
## 3   0.552775680  0.02951812 1.0713702
## 4   0.755943197  0.22828718 1.2775229
## 5   0.159041081 -0.34880550 0.6655240
## 6   0.232275112 -0.34603425 0.8080280
## 7  -0.099602384 -0.67446081 0.4763582
## 8   0.358591898 -0.22313317 0.9364059
## 9   0.313986821 -0.26640206 0.8909387
## 10  0.834829241  0.23035655 1.4307817
## 11  0.459047304 -0.05603414 0.9702799
## 12  0.275484119 -0.23918756 0.7877672
## 13  0.301554687 -0.27848700 0.8782921
## 14  0.416144062 -0.16751252 0.9952862
ttest1ja <- nice_t_test(data = df1_juniors, response = names(df1_juniors)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test. 
## 
ttest1ja
##                  Dependent Variable           t df           p            d
## 1          T1_Q131_psych_measures_1  0.03081917 58 0.975519563  0.007961899
## 2          T1_Q131_psych_measures_3 -0.22283865 58 0.824444004 -0.057568683
## 3          T1_Q131_psych_measures_6  2.12022907 57 0.038351619  0.552775680
## 4  T1_Q131_psych_measures_7_recoded  2.92612843 58 0.004893160  0.755943197
## 5         T1_Q131_psych_measures_11  0.61562116 58 0.540552910  0.159041081
## 6          T2_Q131_psych_measures_1  0.79168072 45 0.432700291  0.232275112
## 7          T2_Q131_psych_measures_3 -0.33948229 45 0.735825778 -0.099602384
## 8          T2_Q131_psych_measures_6  1.22221572 45 0.227989528  0.358591898
## 9  T2_Q131_psych_measures_7_recoded  1.07018488 45 0.290242857  0.313986821
## 10        T2_Q131_psych_measures_11  2.84541125 45 0.006654442  0.834829241
## 11                         T1_C_ACB  1.77689457 58 0.080829606  0.459047304
## 12                          T1_C_AD  1.05664822 57 0.295130064  0.275484119
## 13                         T2_C_ACB  1.02781150 45 0.309531683  0.301554687
## 14                          T2_C_AD  1.41837509 45 0.162969970  0.416144062
##       CI_lower  CI_upper
## 1  -0.49841643 0.5142716
## 2  -0.56377093 0.4491286
## 3   0.02951812 1.0713702
## 4   0.22828718 1.2775229
## 5  -0.34880550 0.6655240
## 6  -0.34603425 0.8080280
## 7  -0.67446081 0.4763582
## 8  -0.22313317 0.9364059
## 9  -0.26640206 0.8909387
## 10  0.23035655 1.4307817
## 11 -0.05603414 0.9702799
## 12 -0.23918756 0.7877672
## 13 -0.27848700 0.8782921
## 14 -0.16751252 0.9952862

T-test Seniors ORIGINAL

ttest1s <- nice_t_test(data = df1_seniors, response = names(df1_seniors)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition")
## Using Welch t-test (base R's default; cf. https://doi.org/10.5334/irsp.82).
## For the Student t-test, use `var.equal = TRUE`. 
## 
ttest1s
##                  Dependent Variable           t       df         p           d
## 1          T1_Q131_psych_measures_1 -1.53868199 34.80943 0.1329237 -0.48435858
## 2          T1_Q131_psych_measures_3 -0.27409067 37.79439 0.7855075 -0.08591383
## 3          T1_Q131_psych_measures_6  0.50787035 32.98462 0.6149239  0.15681820
## 4  T1_Q131_psych_measures_7_recoded  0.77092827 35.55953 0.4458419  0.24378893
## 5         T1_Q131_psych_measures_11 -1.47157559 35.10478 0.1500441 -0.46307130
## 6          T2_Q131_psych_measures_1 -0.32032150 27.73515 0.7511255 -0.11696487
## 7          T2_Q131_psych_measures_3 -0.29478221 22.68328 0.7708413 -0.10763924
## 8          T2_Q131_psych_measures_6  0.04981944 28.37279 0.9606153  0.01777757
## 9  T2_Q131_psych_measures_7_recoded  0.48038446 26.66176 0.6348722  0.16984156
## 10        T2_Q131_psych_measures_11  0.48731809 27.06817 0.6299564  0.17632445
## 11                         T1_C_ACB -0.31566340 37.99895 0.7539853 -0.09982153
## 12                          T1_C_AD -0.45241570 38.80227 0.6534889 -0.14092542
## 13                         T2_C_ACB  0.13228757 24.09626 0.8958553  0.04830459
## 14                          T2_C_AD  0.14412326 26.37435 0.8864988  0.05262637
##      CI_lower  CI_upper
## 1  -1.1030264 0.1403215
## 2  -0.6980323 0.5273015
## 3  -0.4575344 0.7691731
## 4  -0.3799953 0.8644000
## 5  -1.0810698 0.1606896
## 6  -0.8322543 0.6003999
## 7  -0.8229118 0.6095435
## 8  -0.6867962 0.7220462
## 9  -0.5258345 0.8627096
## 10 -0.5310366 0.8806710
## 11 -0.7193666 0.5210038
## 12 -0.7531923 0.4731378
## 13 -0.6679130 0.7636638
## 14 -0.6636503 0.7679680
ttest1sa <- nice_t_test(data = df1_seniors, response = names(df1_seniors)[c(146,148,151,152,156,256,258,261,262,266,381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test. 
## 
ttest1sa
##                  Dependent Variable           t df         p           d
## 1          T1_Q131_psych_measures_1 -1.55024277 39 0.1291611 -0.48435858
## 2          T1_Q131_psych_measures_3 -0.27497663 39 0.7847857 -0.08591383
## 3          T1_Q131_psych_measures_6  0.50191384 39 0.6185501  0.15681820
## 4  T1_Q131_psych_measures_7_recoded  0.77092827 38 0.4455167  0.24378893
## 5         T1_Q131_psych_measures_11 -1.48211048 39 0.1463467 -0.46307130
## 6          T2_Q131_psych_measures_1 -0.32032150 28 0.7511029 -0.11696487
## 7          T2_Q131_psych_measures_3 -0.29478221 28 0.7703349 -0.10763924
## 8          T2_Q131_psych_measures_6  0.04946489 29 0.9608879  0.01777757
## 9  T2_Q131_psych_measures_7_recoded  0.48038446 30 0.6344386  0.16984156
## 10        T2_Q131_psych_measures_11  0.49061104 29 0.6273935  0.17632445
## 11                         T1_C_ACB -0.31566340 38 0.7539852 -0.09982153
## 12                          T1_C_AD -0.45104726 39 0.6544535 -0.14092542
## 13                         T2_C_ACB  0.13228757 28 0.8957029  0.04830459
## 14                          T2_C_AD  0.14412326 28 0.8864355  0.05262637
##      CI_lower  CI_upper
## 1  -1.1030264 0.1403215
## 2  -0.6980323 0.5273015
## 3  -0.4575344 0.7691731
## 4  -0.3799953 0.8644000
## 5  -1.0810698 0.1606896
## 6  -0.8322543 0.6003999
## 7  -0.8229118 0.6095435
## 8  -0.6867962 0.7220462
## 9  -0.5258345 0.8627096
## 10 -0.5310366 0.8806710
## 11 -0.7193666 0.5210038
## 12 -0.7531923 0.4731378
## 13 -0.6679130 0.7636638
## 14 -0.6636503 0.7679680

T-test NEW v OLD

ttest_1 <- merge(ttest, ttest1, by = "Dependent Variable")
knitr::kable(ttest_1)
Dependent Variable t.x df.x p.x d.x CI_lower.x CI_upper.x t.y df.y p.y d.y CI_lower.y CI_upper.y
T1_C_ACB 1.2424194 82.66308 0.2175949 0.2696658 -0.1583116 0.6960355 1.2317435 97.96597 0.2209934 0.2461045 -0.1480963 0.6390604
T1_C_AD 1.6891409 69.80381 0.0956549 0.3644666 -0.0654060 0.7921818 0.5345607 90.95821 0.5942579 0.1074512 -0.2851811 0.4995367
T1_Q131_psych_measures_1 -0.3926499 82.17556 0.6955948 -0.0849079 -0.5076612 0.3383496 -0.8983785 98.13724 0.3711827 -0.1785897 -0.5689980 0.2127159
T1_Q131_psych_measures_11 0.6049989 83.99305 0.5468108 0.1303405 -0.2933149 0.5532226 -0.4451989 98.88127 0.6571491 -0.0885539 -0.4785918 0.3019302
T1_Q131_psych_measures_3 0.2080994 83.99633 0.8356551 0.0448354 -0.3781630 0.4675675 -0.3826605 98.06682 0.7027997 -0.0762151 -0.4662336 0.3141875
T1_Q131_psych_measures_6 2.7767050 67.24008 0.0071075 0.5987829 0.1622337 1.0318807 1.9092615 86.29545 0.0595514 0.3844846 -0.0122172 0.7792618
T1_Q131_psych_measures_7_recoded 2.3708716 82.49215 0.0200777 0.5137246 0.0799218 0.9445335 2.7447110 93.34566 0.0072643 0.5510924 0.1501672 0.9493091
T2_C_ACB 0.7310472 69.23723 0.4672172 0.1672072 -0.2990546 0.6322809 0.8096621 72.27913 0.4207920 0.1810792 -0.2681167 0.6290750
T2_C_AD 1.1145715 62.54072 0.2692990 0.2679671 -0.1999331 0.7339732 0.8472621 71.56320 0.3996737 0.1946403 -0.2547452 0.6427363
T2_Q131_psych_measures_1 0.0673328 68.67434 0.9465124 0.0158125 -0.4490973 0.4839424 0.2862785 74.99871 0.7754541 0.0648082 -0.3831892 0.5123744
T2_Q131_psych_measures_11 2.2070712 60.35943 0.0311226 0.5319693 0.0596633 1.0006588 1.9126164 69.37459 0.0599261 0.4396876 -0.0123231 0.8888765
T2_Q131_psych_measures_3 -0.4536426 57.68829 0.6517880 -0.1105780 -0.5753901 0.3550214 -0.4878815 67.30949 0.6272193 -0.1129797 -0.5606301 0.3354215
T2_Q131_psych_measures_6 1.1775929 67.83239 0.2430741 0.2774903 -0.1866391 0.7396870 0.7764259 74.21483 0.4399651 0.1765268 -0.2693622 0.6212607
T2_Q131_psych_measures_7_recoded 1.1147106 71.99763 0.2686816 0.2544235 -0.2066936 0.7137906 1.0642869 76.38729 0.2905515 0.2366722 -0.2075751 0.6793956
#Differences: None

T-test Juniors NEW v OLD

ttestj_1j <- merge(ttestj, ttest1j, by = "Dependent Variable")
knitr::kable(ttestj_1j)
Dependent Variable t.x df.x p.x d.x CI_lower.x CI_upper.x t.y df.y p.y d.y CI_lower.y CI_upper.y
T1_C_ACB 1.6263011 48.90484 0.1103130 0.4526544 -0.1006968 1.0016023 1.7823251 57.97100 0.0799332 0.4590473 -0.0560341 0.9702799
T1_C_AD 1.4758308 40.74441 0.1476763 0.4093986 -0.1475684 0.9622837 1.0387617 48.18783 0.3040999 0.2754841 -0.2391876 0.7877672
T1_Q131_psych_measures_1 0.1345725 49.74561 0.8934929 0.0373411 -0.5068928 0.5812026 0.0308180 57.72519 0.9755210 0.0079619 -0.4984164 0.5142716
T1_Q131_psych_measures_11 1.0967652 47.96963 0.2782195 0.3010720 -0.2475866 0.8467610 0.6122596 55.12509 0.5428834 0.1590411 -0.3488055 0.6655240
T1_Q131_psych_measures_3 -0.0254269 49.68184 0.9798163 -0.0070139 -0.5509793 0.5370216 -0.2213605 54.25480 0.8256428 -0.0575687 -0.5637709 0.4491286
T1_Q131_psych_measures_6 2.4364370 44.00062 0.0189484 0.6773775 0.1090496 1.2391821 2.0919065 50.46765 0.0414979 0.5527757 0.0295181 1.0713702
T1_Q131_psych_measures_7_recoded 2.5661357 49.97989 0.0133282 0.7095044 0.1447690 1.2675773 2.9129945 55.77216 0.0051410 0.7559432 0.2282872 1.2775229
T2_C_ACB 0.9359604 42.96552 0.3545247 0.2677672 -0.3280057 0.8604628 1.0666344 44.21520 0.2919267 0.3015547 -0.2784870 0.8782921
T2_C_AD 1.8606349 42.18237 0.0697761 0.5239694 -0.0807351 1.1227960 1.4793219 43.54660 0.1462526 0.4161441 -0.1675125 0.9952862
T2_Q131_psych_measures_1 0.5803922 42.72670 0.5646988 0.1687066 -0.4248843 0.7603486 0.8137710 44.92821 0.4200683 0.2322751 -0.3460342 0.8080280
T2_Q131_psych_measures_11 3.2385571 42.42672 0.0023362 0.9465118 0.3172945 1.5658329 2.8786178 44.44777 0.0061202 0.8348292 0.2303566 1.4307817
T2_Q131_psych_measures_3 -0.2409825 40.21363 0.8107931 -0.0720467 -0.6633734 0.5201147 -0.3432354 44.39074 0.7330417 -0.0996024 -0.6744608 0.4763582
T2_Q131_psych_measures_6 1.7151125 42.95871 0.0935307 0.4904838 -0.1127893 1.0882324 1.2524404 44.99534 0.2168801 0.3585919 -0.2231332 0.9364059
T2_Q131_psych_measures_7_recoded 1.0694681 42.07337 0.2909563 0.3140948 -0.2829447 0.9075363 1.0903553 44.90985 0.2813725 0.3139868 -0.2664021 0.8909387
#Differences: No changes in significance, but T1_C_ACB lower p-value in OLD and T2_C_AD lower p-value in NEW.

T-test Seniors NEW v OLD

ttests_1s <- merge(ttests, ttest1s, by = "Dependent Variable")
knitr::kable(ttests_1s)
Dependent Variable t.x df.x p.x d.x CI_lower.x CI_upper.x t.y df.y p.y d.y CI_lower.y CI_upper.y
T1_C_ACB -0.1345750 30.93253 0.8938198 -0.0468512 -0.7292594 0.6363091 -0.3156634 37.99895 0.7539853 -0.0998215 -0.7193666 0.5210038
T1_C_AD 0.8257089 27.43396 0.4160923 0.2832158 -0.3947708 0.9568397 -0.4524157 38.80227 0.6534889 -0.1409254 -0.7531923 0.4731378
T1_Q131_psych_measures_1 -0.8164966 29.36878 0.4207900 -0.2800560 -0.9536252 0.3978282 -1.5386820 34.80943 0.1329237 -0.4843586 -1.1030264 0.1403215
T1_Q131_psych_measures_11 -0.3233808 30.81525 0.7485913 -0.1109187 -0.7828638 0.5627497 -1.4715756 35.10478 0.1500441 -0.4630713 -1.0810698 0.1606896
T1_Q131_psych_measures_3 0.3335908 31.61923 0.7408906 0.1144207 -0.5593098 0.7863735 -0.2740907 37.79439 0.7855075 -0.0859138 -0.6980323 0.5273015
T1_Q131_psych_measures_6 1.4605935 21.77643 0.1584058 0.5009794 -0.1860857 1.1804892 0.5078703 32.98462 0.6149239 0.1568182 -0.4575344 0.7691731
T1_Q131_psych_measures_7_recoded 0.4789012 30.54774 0.6354193 0.1671179 -0.5181607 0.8497217 0.7709283 35.55953 0.4458419 0.2437889 -0.3799953 0.8644000
T2_C_ACB 0.1190039 22.96915 0.9063069 0.0451886 -0.7102722 0.7997505 0.1322876 24.09626 0.8958553 0.0483046 -0.6679130 0.7636638
T2_C_AD 0.2896773 21.99976 0.7747757 0.1128515 -0.6438189 0.8672806 0.1441233 26.37435 0.8864988 0.0526264 -0.6636503 0.7679680
T2_Q131_psych_measures_1 -0.4551065 24.66404 0.6530136 -0.1755590 -0.9302784 0.5826395 -0.3203215 27.73515 0.7511255 -0.1169649 -0.8322543 0.6003999
T2_Q131_psych_measures_11 0.7207671 22.25519 0.4785562 0.2785892 -0.4705559 1.0224565 0.4873181 27.06817 0.6299564 0.1763245 -0.5310366 0.8806710
T2_Q131_psych_measures_3 -0.3317691 18.87269 0.7437196 -0.1302835 -0.8847533 0.6267724 -0.2947822 22.68328 0.7708413 -0.1076392 -0.8229118 0.6095435
T2_Q131_psych_measures_6 0.2615742 24.89655 0.7958016 0.0988657 -0.6433581 0.8392004 0.0498194 28.37279 0.9606153 0.0177776 -0.6867962 0.7220462
T2_Q131_psych_measures_7_recoded 0.5755086 25.05233 0.5700811 0.2112340 -0.5212022 0.9397995 0.4803845 26.66176 0.6348722 0.1698416 -0.5258345 0.8627096
#Differences: None

Summary ORIGINAL

# Proximal effects: Increased appreciation of difference for all students but especially juniors (Students with different backgrounds and experiences can find their own way of being successful at college; T1_Q131_psych_measures_6). Increased anticipated college belonging for all students but especially juniors (I do not think I would fit in well at college.; T1_Q131_psych_measures_7). Increased expectancy of success in college for all students but especially seniors (I expect that the academic experience at college will be difficult for me.; T1_Q131_psych_measures_2). Increased college fit for seniors (I think I would fit in at some colleges but not other colleges.; T1_Q131_psych_measures_8).

# Distal effects: Increased appreciation of differences for juniors (There are different ways to be successful as a college student; T2_Q131_psych_measures_11). Increased likelihood of applying to college (When thinking about college ... - I plan to go to college after graduating high school; T2_Q58_2).

# Original results from last year's analysis
knitr::include_graphics("T-test.png")

knitr::include_graphics("Juniors.png")

knitr::include_graphics("Seniors.png")