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 94 0.88679245
## 2 Hispanic / Latino 4 0.03773585
## 3 Two or more races 6 0.05660377
## 4 White 2 0.01886792
descriptives_table(df, "T1_C1_gender")
## [1] Count Proportion
## <0 rows> (or 0-length row.names)
descriptives_table(df, "T1_C1_Class_Level")
## Category Count Proportion
## 1 Junior 67 0.6261682
## 2 Senior 40 0.3738318
descriptives_table(df_juniors, "T1_C1_race")
## Category Count Proportion
## 1 Black or African American 57 0.86363636
## 2 Hispanic / Latino 2 0.03030303
## 3 Two or more races 6 0.09090909
## 4 White 1 0.01515152
descriptives_table(df_juniors, "T1_C1_gender")
## [1] Count Proportion
## <0 rows> (or 0-length row.names)
descriptives_table(df_juniors, "T1_C1_Class_Level")
## Category Count Proportion
## 1 Junior 67 1
descriptives_table(df_seniors, "T1_C1_race")
## Category Count Proportion
## 1 Black or African American 37 0.925
## 2 Hispanic / Latino 2 0.050
## 3 White 1 0.025
descriptives_table(df_seniors, "T1_C1_gender")
## [1] Count Proportion
## <0 rows> (or 0-length row.names)
descriptives_table(df_seniors, "T1_C1_Class_Level")
## Category Count Proportion
## 1 Senior 40 1
T-test NEW
ttest <- nice_t_test(data = df, response = names(df)[c(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`.
##
ttesta <- nice_t_test(data = df, response = names(df)[c(287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test.
##
ttest_a <- merge(ttest, ttesta, by = "Dependent Variable")
knitr::kable(ttest_a)
|
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.0822701
|
86.98717
|
0.2821236
|
0.2293644
|
-0.1882184
|
0.6456394
|
1.0818414
|
87
|
0.2823126
|
0.2293644
|
-0.1882184
|
0.6456394
|
|
T1_C_AD
|
1.0019742
|
78.24564
|
0.3194447
|
0.2131883
|
-0.2041600
|
0.6293198
|
1.0055435
|
87
|
0.3174238
|
0.2131883
|
-0.2041600
|
0.6293198
|
|
T2_C_ACB
|
0.6544069
|
71.54792
|
0.5149479
|
0.1465896
|
-0.3055737
|
0.5977667
|
0.6369748
|
74
|
0.5261070
|
0.1465896
|
-0.3055737
|
0.5977667
|
|
T2_C_AD
|
0.9230971
|
69.47529
|
0.3591514
|
0.2140682
|
-0.2390164
|
0.6657166
|
0.9301891
|
74
|
0.3552978
|
0.2140682
|
-0.2390164
|
0.6657166
|
T-test Juniors NEW
ttestj <- nice_t_test(data = df_juniors, response = names(df_juniors)[c(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`.
##
ttestja <- nice_t_test(data = df_juniors, response = names(df_juniors)[c(287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test.
##
ttest_ja <- merge(ttestj, ttestja, by = "Dependent Variable")
knitr::kable(ttest_ja)
|
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.5260964
|
50.45828
|
0.1332302
|
0.4198521
|
-0.1267951
|
0.9624810
|
1.5280125
|
51
|
0.1326884
|
0.4198521
|
-0.1267951
|
0.9624810
|
|
T1_C_AD
|
1.1812972
|
43.09230
|
0.2439633
|
0.3276329
|
-0.2213365
|
0.8733773
|
1.1812972
|
50
|
0.2430731
|
0.3276329
|
-0.2213365
|
0.8733773
|
|
T2_C_ACB
|
0.8894671
|
43.56058
|
0.3786380
|
0.2523048
|
-0.3344204
|
0.8361934
|
0.8482977
|
44
|
0.4008636
|
0.2523048
|
-0.3344204
|
0.8361934
|
|
T2_C_AD
|
1.7130063
|
42.63076
|
0.0939764
|
0.4812942
|
-0.1128595
|
1.0701454
|
1.6182045
|
44
|
0.1127658
|
0.4812942
|
-0.1128595
|
1.0701454
|
T-test Seniors NEW
ttests <- nice_t_test(data = df_seniors, response = names(df_seniors)[c(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`.
##
ttestsa <- nice_t_test(data = df_seniors, response = names(df_seniors)[c(287,291,296,300)] , group = "T1_Condition", var.equal=TRUE)
## Using Student t-test.
##
ttest_sa <- merge(ttests, ttestsa, by = "Dependent Variable")
knitr::kable(ttest_sa)
|
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.2413611
|
33.55534
|
0.8107441
|
-0.0805806
|
-0.7346012
|
0.5746192
|
-0.2413685
|
34
|
0.8107193
|
-0.0805806
|
-0.7346012
|
0.5746192
|
|
T1_C_AD
|
0.1364297
|
32.91005
|
0.8923128
|
0.0451213
|
-0.5999535
|
0.6895538
|
0.1371809
|
35
|
0.8916739
|
0.0451213
|
-0.5999535
|
0.6895538
|
|
T2_C_ACB
|
0.1322876
|
24.09626
|
0.8958553
|
0.0483046
|
-0.6679130
|
0.7636638
|
0.1322876
|
28
|
0.8957029
|
0.0483046
|
-0.6679130
|
0.7636638
|
|
T2_C_AD
|
0.1441233
|
26.37435
|
0.8864988
|
0.0526264
|
-0.6636503
|
0.7679680
|
0.1441233
|
28
|
0.8864355
|
0.0526264
|
-0.6636503
|
0.7679680
|
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_C1_gender")
## [1] Count Proportion
## <0 rows> (or 0-length row.names)
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_juniors, "T1_C1_Class_Level")
## Category Count Proportion
## 1 Junior 76 1
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)
descriptives_table(df1_seniors, "T1_C1_Class_Level")
## Category Count Proportion
## 1 Senior 46 1
T-test ORIGINAL
ttest1 <- nice_t_test(data = df1, response = names(df1)[c(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`.
##
ttest1a <- nice_t_test(data = df1, response = names(df1)[c(381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test.
##
ttest1_1a <- merge(ttest1, ttest1a, by = "Dependent Variable")
knitr::kable(ttest1_1a)
|
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.2317435
|
97.96597
|
0.2209934
|
0.2461045
|
-0.1480963
|
0.6390604
|
1.2302761
|
98
|
0.2215387
|
0.2461045
|
-0.1480963
|
0.6390604
|
|
T1_C_AD
|
0.5345607
|
90.95821
|
0.5942579
|
0.1074512
|
-0.2851811
|
0.4995367
|
0.5371485
|
98
|
0.5923826
|
0.1074512
|
-0.2851811
|
0.4995367
|
|
T2_C_ACB
|
0.8096621
|
72.27913
|
0.4207920
|
0.1810792
|
-0.2681167
|
0.6290750
|
0.7928051
|
75
|
0.4303922
|
0.1810792
|
-0.2681167
|
0.6290750
|
|
T2_C_AD
|
0.8472621
|
71.56320
|
0.3996737
|
0.1946403
|
-0.2547452
|
0.6427363
|
0.8521785
|
75
|
0.3968281
|
0.1946403
|
-0.2547452
|
0.6427363
|
T-test Juniors ORIGINAL
ttest1j <- nice_t_test(data = df1_juniors, response = names(df1_juniors)[c(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`.
##
ttest1ja <- nice_t_test(data = df1_juniors, response = names(df1_juniors)[c(381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test.
##
ttest1j_1ja <- merge(ttest1j, ttest1ja, by = "Dependent Variable")
knitr::kable(ttest1j_1ja)
|
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.782325
|
57.97100
|
0.0799332
|
0.4590473
|
-0.0560341
|
0.9702799
|
1.776895
|
58
|
0.0808296
|
0.4590473
|
-0.0560341
|
0.9702799
|
|
T1_C_AD
|
1.038762
|
48.18783
|
0.3040999
|
0.2754841
|
-0.2391876
|
0.7877672
|
1.056648
|
57
|
0.2951301
|
0.2754841
|
-0.2391876
|
0.7877672
|
|
T2_C_ACB
|
1.066634
|
44.21520
|
0.2919267
|
0.3015547
|
-0.2784870
|
0.8782921
|
1.027812
|
45
|
0.3095317
|
0.3015547
|
-0.2784870
|
0.8782921
|
|
T2_C_AD
|
1.479322
|
43.54660
|
0.1462526
|
0.4161441
|
-0.1675125
|
0.9952862
|
1.418375
|
45
|
0.1629700
|
0.4161441
|
-0.1675125
|
0.9952862
|
T-test Seniors ORIGINAL
ttest1s <- nice_t_test(data = df1_seniors, response = names(df1_seniors)[c(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`.
##
ttest1sa <- nice_t_test(data = df1_seniors, response = names(df1_seniors)[c(381,385,390,394)] , group = "T1_C1_Condition", var.equal = TRUE)
## Using Student t-test.
##
ttest1s_1sa <- merge(ttest1s, ttest1sa, by = "Dependent Variable")
knitr::kable(ttest1s_1sa)
|
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.3156634
|
37.99895
|
0.7539853
|
-0.0998215
|
-0.7193666
|
0.5210038
|
-0.3156634
|
38
|
0.7539852
|
-0.0998215
|
-0.7193666
|
0.5210038
|
|
T1_C_AD
|
-0.4524157
|
38.80227
|
0.6534889
|
-0.1409254
|
-0.7531923
|
0.4731378
|
-0.4510473
|
39
|
0.6544535
|
-0.1409254
|
-0.7531923
|
0.4731378
|
|
T2_C_ACB
|
0.1322876
|
24.09626
|
0.8958553
|
0.0483046
|
-0.6679130
|
0.7636638
|
0.1322876
|
28
|
0.8957029
|
0.0483046
|
-0.6679130
|
0.7636638
|
|
T2_C_AD
|
0.1441233
|
26.37435
|
0.8864988
|
0.0526264
|
-0.6636503
|
0.7679680
|
0.1441233
|
28
|
0.8864355
|
0.0526264
|
-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.0822701
|
86.98717
|
0.2821236
|
0.2293644
|
-0.1882184
|
0.6456394
|
1.2317435
|
97.96597
|
0.2209934
|
0.2461045
|
-0.1480963
|
0.6390604
|
|
T1_C_AD
|
1.0019742
|
78.24564
|
0.3194447
|
0.2131883
|
-0.2041600
|
0.6293198
|
0.5345607
|
90.95821
|
0.5942579
|
0.1074512
|
-0.2851811
|
0.4995367
|
|
T2_C_ACB
|
0.6544069
|
71.54792
|
0.5149479
|
0.1465896
|
-0.3055737
|
0.5977667
|
0.8096621
|
72.27913
|
0.4207920
|
0.1810792
|
-0.2681167
|
0.6290750
|
|
T2_C_AD
|
0.9230971
|
69.47529
|
0.3591514
|
0.2140682
|
-0.2390164
|
0.6657166
|
0.8472621
|
71.56320
|
0.3996737
|
0.1946403
|
-0.2547452
|
0.6427363
|
#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.5260964
|
50.45828
|
0.1332302
|
0.4198521
|
-0.1267951
|
0.9624810
|
1.782325
|
57.97100
|
0.0799332
|
0.4590473
|
-0.0560341
|
0.9702799
|
|
T1_C_AD
|
1.1812972
|
43.09230
|
0.2439633
|
0.3276329
|
-0.2213365
|
0.8733773
|
1.038762
|
48.18783
|
0.3040999
|
0.2754841
|
-0.2391876
|
0.7877672
|
|
T2_C_ACB
|
0.8894671
|
43.56058
|
0.3786380
|
0.2523048
|
-0.3344204
|
0.8361934
|
1.066634
|
44.21520
|
0.2919267
|
0.3015547
|
-0.2784870
|
0.8782921
|
|
T2_C_AD
|
1.7130063
|
42.63076
|
0.0939764
|
0.4812942
|
-0.1128595
|
1.0701454
|
1.479322
|
43.54660
|
0.1462526
|
0.4161441
|
-0.1675125
|
0.9952862
|
#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.2413611
|
33.55534
|
0.8107441
|
-0.0805806
|
-0.7346012
|
0.5746192
|
-0.3156634
|
37.99895
|
0.7539853
|
-0.0998215
|
-0.7193666
|
0.5210038
|
|
T1_C_AD
|
0.1364297
|
32.91005
|
0.8923128
|
0.0451213
|
-0.5999535
|
0.6895538
|
-0.4524157
|
38.80227
|
0.6534889
|
-0.1409254
|
-0.7531923
|
0.4731378
|
|
T2_C_ACB
|
0.1322876
|
24.09626
|
0.8958553
|
0.0483046
|
-0.6679130
|
0.7636638
|
0.1322876
|
24.09626
|
0.8958553
|
0.0483046
|
-0.6679130
|
0.7636638
|
|
T2_C_AD
|
0.1441233
|
26.37435
|
0.8864988
|
0.0526264
|
-0.6636503
|
0.7679680
|
0.1441233
|
26.37435
|
0.8864988
|
0.0526264
|
-0.6636503
|
0.7679680
|
#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")
