Path: fracciones/script/fracciones_analyses_111524.Rmd
IMPORANT: Run this chuck to remove excluded participants.
## estimulo distancia_abs dis condicion distance
## 72 6_11_8_11 0.18181818 2 CO Numerator
## 73 18_19_12_19 0.31578947 6 CO Numerator
## 74 4_17_4_39 0.13273002 0 IC Numerator
## 75 12_13_12_19 0.29149798 0 IC Numerator
## 76 6_13_6_47 0.33387889 0 IC Numerator
## 77 25_33_31_33 0.18181818 6 CO Numerator
## 78 19_41_8_41 0.26829268 11 CO Numerator
## 79 13_35_13_24 0.17023810 0 IC Numerator
## 80 14_25_14_27 0.04148148 0 IC Numerator
## 81 8_11_8_17 0.25668449 0 IC Numerator
## 82 23_49_23_30 0.29727891 0 IC Numerator
## 83 7_15_4_15 0.20000000 3 CO Numerator
## 84 28_51_28_47 0.04672507 0 IC Numerator
## 85 9_22_9_16 0.15340909 0 IC Numerator
## 86 22_53_14_53 0.15094340 8 CO Numerator
## 87 22_49_18_49 0.08163265 4 CO Numerator
## 88 18_25_18_35 0.20571429 0 IC Numerator
## 89 29_30_23_30 0.20000000 6 CO Numerator
## 90 27_28_27_46 0.37732919 0 IC Numerator
## 91 19_29_19_22 0.20846395 0 IC Numerator
## 92 29_33_29_40 0.15378788 0 IC Numerator
## 93 11_28_19_28 0.28571429 8 CO Numerator
## 94 16_21_20_21 0.19047619 4 CO Numerator
## 95 31_43_31_36 0.14018088 0 IC Numerator
## 96 31_42_25_42 0.14285714 6 CO Numerator
## 97 6_37_14_37 0.21621622 8 CO Numerator
## 98 7_25_7_13 0.25846154 0 IC Numerator
## 99 4_13_9_13 0.38461538 5 CO Numerator
## 100 18_31_18_41 0.14162077 0 IC Numerator
## 101 21_55_21_41 0.13037694 0 IC Numerator
## 102 16_31_16_21 0.24577573 0 IC Numerator
## 103 17_23_20_23 0.13043478 3 CO Numerator
## 104 5_39_14_39 0.23076923 9 CO Numerator
## 105 17_38_15_38 0.05263158 2 CO Numerator
## 106 13_36_23_36 0.27777778 10 CO Numerator
## 107 16_37_12_37 0.10810811 4 CO Numerator
## 721 6_11_8_11 0.18181818 0 CO Denominator
## 731 18_19_12_19 0.31578947 0 CO Denominator
## 741 4_17_4_39 0.13273002 22 IC Denominator
## 751 12_13_12_19 0.29149798 6 IC Denominator
## 761 6_13_6_47 0.33387889 34 IC Denominator
## 771 25_33_31_33 0.18181818 0 CO Denominator
## 781 19_41_8_41 0.26829268 0 CO Denominator
## 791 13_35_13_24 0.17023810 11 IC Denominator
## 801 14_25_14_27 0.04148148 2 IC Denominator
## 811 8_11_8_17 0.25668449 6 IC Denominator
## 821 23_49_23_30 0.29727891 19 IC Denominator
## 831 7_15_4_15 0.20000000 0 CO Denominator
## 841 28_51_28_47 0.04672507 4 IC Denominator
## 851 9_22_9_16 0.15340909 6 IC Denominator
## 861 22_53_14_53 0.15094340 0 CO Denominator
## 871 22_49_18_49 0.08163265 0 CO Denominator
## 881 18_25_18_35 0.20571429 10 IC Denominator
## 891 29_30_23_30 0.20000000 0 CO Denominator
## 901 27_28_27_46 0.37732919 18 IC Denominator
## 911 19_29_19_22 0.20846395 7 IC Denominator
## 921 29_33_29_40 0.15378788 7 IC Denominator
## 931 11_28_19_28 0.28571429 0 CO Denominator
## 941 16_21_20_21 0.19047619 0 CO Denominator
## 951 31_43_31_36 0.14018088 7 IC Denominator
## 961 31_42_25_42 0.14285714 0 CO Denominator
## 971 6_37_14_37 0.21621622 0 CO Denominator
## 981 7_25_7_13 0.25846154 12 IC Denominator
## 991 4_13_9_13 0.38461538 0 CO Denominator
## 1001 18_31_18_41 0.14162077 10 IC Denominator
## 1011 21_55_21_41 0.13037694 14 IC Denominator
## 1021 16_31_16_21 0.24577573 10 IC Denominator
## 1031 17_23_20_23 0.13043478 0 CO Denominator
## 1041 5_39_14_39 0.23076923 0 CO Denominator
## 1051 17_38_15_38 0.05263158 0 CO Denominator
## 1061 13_36_23_36 0.27777778 0 CO Denominator
## 1071 16_37_12_37 0.10810811 0 CO Denominator
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_cc_den, condicion == "IC")$distancia_abs and subset(fraction_stimuli_cc_den, condicion == "IC")$dis
## t = 2.5599, df = 16, p-value = 0.02098
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.09644704 0.80366217
## sample estimates:
## cor
## 0.5390449
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_cc_num, condicion == "CO")$distancia_abs and subset(fraction_stimuli_cc_num, condicion == "CO")$dis
## t = 2.3511, df = 16, p-value = 0.03186
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.05221099 0.78733430
## sample estimates:
## cor
## 0.5067292
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_wcc_den, condicion == "CO")$distancia_abs and subset(fraction_stimuli_wcc_den, condicion == "CO")$dis
## t = -1.9073, df = 16, p-value = 0.07459
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.74714341 0.04563189
## sample estimates:
## cor
## -0.4304077
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_wcc_den, condicion == "IC")$distancia_abs and subset(fraction_stimuli_wcc_den, condicion == "IC")$dis
## t = 0.68787, df = 16, p-value = 0.5014
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.3229434 0.5896904
## sample estimates:
## cor
## 0.1694795
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_wcc_num, condicion == "CO")$distancia_abs and subset(fraction_stimuli_wcc_num, condicion == "CO")$dis
## t = 1.0723, df = 16, p-value = 0.2995
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.2365301 0.6475255
## sample estimates:
## cor
## 0.2589337
##
## Pearson's product-moment correlation
##
## data: subset(fraction_stimuli_wcc_num, condicion == "IC")$distancia_abs and subset(fraction_stimuli_wcc_num, condicion == "IC")$dis
## t = 0.13582, df = 16, p-value = 0.8937
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.4399036 0.4929954
## sample estimates:
## cor
## 0.0339362
## `geom_smooth()` using formula = 'y ~ x'
## `geom_smooth()` using formula = 'y ~ x'
Figure 2. Relationships between rational distance and componential distance among the fraction comparison stimuli. A. Among Shared Component fractions, the relations between rational and componential distance (for the metric that varied) were strong and positive. B. For Distinct Component fractions, the relations between rational and componential distances varied depending on their relation to whole-number rules. While Compatible trials had weak positive correlations between numerator, denominator, and rational distances, Misleading trials had a moderate negative correlation between denominator and rational distance and a weak relation between numerator and rational distances. Note. Green lines represent the relationship between componential distances and rational distance among the misleading trials, while black lines represent those among the compatible trials.
## [1] 26.26316
## [1] 4.385942
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## Warning: The `fun.y` argument of `stat_summary()` is deprecated as of ggplot2 3.3.0.
## ℹ Please use the `fun` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## [1] 76
## [1] 4.644737
## [1] 2.063679
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## componet N responses sd se ci
## 1 size 76 0.36184211 0.3881467 0.04452349 0.08869533
## 2 arithmetic 76 0.37828947 0.2565587 0.02942930 0.05862618
## 3 density_a 76 0.54276316 0.1843374 0.02114495 0.04212289
## 4 density_b 76 0.05921053 0.1676724 0.01923334 0.03831479
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## operation_type N accuracy2 sd se ci
## 1 addition 76 0.5431287 0.3272128 0.03753388 0.07477132
## 2 subtraction 76 0.5734284 0.2913695 0.03342237 0.06658077
##
## Paired t-test
##
## data: agg_aritmetica_acc_spread$addition and agg_aritmetica_acc_spread$subtraction
## t = -1.1841, df = 75, p-value = 0.2401
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.08127723 0.02067782
## sample estimates:
## mean difference
## -0.03029971
## Warning in cohensD(accuracy2 ~ operation_type, data = agg_aritmetica_acc, :
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 0.1358202
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## condicion N accuracy sd se ci
## 1 color 76 0.9184942 0.09615398 0.011029617 0.02197212
## 2 palabra 76 0.9433480 0.06341463 0.007274157 0.01449086
## 3 stroop 76 0.7986111 0.18184723 0.020859308 0.04155387
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Converting "condicion" to factor for ANOVA.
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 2 condicion 2 150 45.16412 4.430816e-16 * 0.2075977
##
## $`Mauchly's Test for Sphericity`
## Effect W p p<.05
## 2 condicion 0.5727135 1.105821e-09 *
##
## $`Sphericity Corrections`
## Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
## 2 condicion 0.7006302 5.461145e-12 * 0.709902 4.076913e-12 *
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Converting "condicion" to factor for ANOVA.
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 75 179.3096200 1.963271 6849.90610 1.838829e-75 *
## 2 condicion 2 150 0.9104397 1.511885 45.16412 4.430816e-16 *
## ges pes
## 1 0.9809877 0.9891695
## 2 0.2075977 0.3758536
##
## $`Mauchly's Test for Sphericity`
## Effect W p p<.05
## 2 condicion 0.5727135 1.105821e-09 *
##
## $`Sphericity Corrections`
## Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
## 2 condicion 0.7006302 5.461145e-12 * 0.709902 4.076913e-12 *
##
## Paired t-test
##
## data: agg_stroop_spread$`color ` and agg_stroop_spread$palabra
## t = -2.5883, df = 75, p-value = 0.01158
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.043982947 -0.005724656
## sample estimates:
## mean difference
## -0.0248538
##
## Paired t-test
##
## data: agg_stroop_spread$palabra and agg_stroop_spread$stroop
## t = 7.6151, df = 75, p-value = 6.424e-11
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.1068738 0.1825999
## sample estimates:
## mean difference
## 0.1447368
##
## Paired t-test
##
## data: agg_stroop_spread$`color ` and agg_stroop_spread$stroop
## t = 6.48, df = 75, p-value = 8.612e-09
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.08302804 0.15673804
## sample estimates:
## mean difference
## 0.119883
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## condicion N accuracy sd se ci
## 1 congruente 76 0.9490662 0.05430178 0.006228841 0.01240849
## 2 incongruente 76 0.8849745 0.18988180 0.021780936 0.04338985
## 3 mixto 76 0.7696742 0.16228684 0.018615577 0.03708413
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Converting "condicion" to factor for ANOVA.
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 2 condicion 2 150 37.90558 4.741746e-14 * 0.2040247
##
## $`Mauchly's Test for Sphericity`
## Effect W p p<.05
## 2 condicion 0.9664057 0.2824239
##
## $`Sphericity Corrections`
## Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
## 2 condicion 0.9674976 1.134843e-13 * 0.9926752 5.772145e-14 *
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Converting "condicion" to factor for ANOVA.
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 75 171.743063 2.415214 5333.16332 1.955892e-71 *
## 2 condicion 2 150 1.256113 2.485346 37.90558 4.741746e-14 *
## ges pes
## 1 0.9722574 0.9861321
## 2 0.2040247 0.3357282
##
## $`Mauchly's Test for Sphericity`
## Effect W p p<.05
## 2 condicion 0.9664057 0.2824239
##
## $`Sphericity Corrections`
## Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
## 2 condicion 0.9674976 1.134843e-13 * 0.9926752 5.772145e-14 *
##
## Paired t-test
##
## data: agg_flechas_spread$congruente and agg_flechas_spread$incongruente
## t = 2.9549, df = 75, p-value = 0.004177
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.02088324 0.10730012
## sample estimates:
## mean difference
## 0.06409168
##
## Paired t-test
##
## data: agg_flechas_spread$incongruente and agg_flechas_spread$mixto
## t = 5.2557, df = 75, p-value = 1.339e-06
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.0715977 0.1590030
## sample estimates:
## mean difference
## 0.1153003
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## [1] 76
## [1] 0.1701803
## [1] 0.1840856
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.75, :
## Ignoring unknown parameters: `shape`
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Warning: Removed 2 rows containing missing values or values outside the scale range
## (`stat_bindot()`).
## Warning: Removed 2 rows containing non-finite outside the scale range
## (`stat_summary()`).
## Removed 2 rows containing non-finite outside the scale range
## (`stat_summary()`).
## Removed 2 rows containing non-finite outside the scale range
## (`stat_summary()`).
Figure 4. Performance on math achievement, procedural and conceptual fraction knowledge assessments, and executive function tasks. A. WRAT math computation raw scores (math achievement). Participants’ scores ranged from low average to high average performance (Abreu-Mendoza et al., 2019). B. Accuracy in the fraction arithmetic task (procedural fraction knowledge). Participants performed similarly in addition and subtraction arithmetic problems. C. Proportion of correct responses in the Conceptual Assessment of Rational Numbers (CARN, conceptual knowledge). Students had overall low conceptual knowledge and had particular difficulty reporting the numbers between two rational problems (Density B). D. Accuracy in the Stroop task (inhibitory control). Participants had the lowest accuracy when there was a mismatch between the color word and the color ink (interference condition). E. Performance on the visuospatial 2-back task (working memory). Students had overall low performance. F. Accuracy in the arrow task (cognitive flexibility). Participants had the lowest accuracy when they had to switch between congruent and incongruent rules (mixed block). Note. White diamonds represent the means, solid black lines are the medians, and dashed lines are chance-level performance.
agg_seleccion_acc = aggregate(accuracy~participant*condicion*bloque, dataset, mean)
agg_seleccion_acc$bloque = as.factor(agg_seleccion_acc$bloque)
levels(agg_seleccion_acc$bloque)[levels(agg_seleccion_acc$bloque ) == "WCC"] <- "Distinct Components"
agg_seleccion_acc$bloque = as.factor(agg_seleccion_acc$bloque)
levels(agg_seleccion_acc$bloque)[levels(agg_seleccion_acc$bloque ) == "CC"] <- "Shared Components"
length(unique(agg_seleccion_acc$participant))
## [1] 76
agg_pre_data_fractions_descriptives = summarySE(agg_seleccion_acc, "accuracy", c("bloque","condicion"))
kable(agg_pre_data_fractions_descriptives)
| bloque | condicion | N | accuracy | sd | se | ci |
|---|---|---|---|---|---|---|
| Shared Components | CO | 76 | 0.8281196 | 0.2416509 | 0.0277193 | 0.0552196 |
| Shared Components | IC | 76 | 0.7371646 | 0.3137455 | 0.0359891 | 0.0716939 |
| Distinct Components | CO | 76 | 0.5844513 | 0.2874034 | 0.0329674 | 0.0656745 |
| Distinct Components | IC | 76 | 0.7258342 | 0.3172508 | 0.0363912 | 0.0724949 |
kable(ezANOVA(agg_seleccion_acc, dv = .(accuracy), wid = .(participant), within = .c(bloque, condicion)))
## Warning: Converting "condicion" to factor for ANOVA.
|
ezANOVA.pes(ezANOVA(agg_seleccion_acc, dv = .(accuracy), wid = .(participant), within = .c(bloque, condicion), detailed=T))
## Warning: Converting "condicion" to factor for ANOVA.
## $ANOVA
## Effect DFn DFd SSn SSd F p
## 1 (Intercept) 1 75 157.10912586 9.154166 1287.193652 5.698646e-49
## 2 bloque 1 75 1.23546250 1.929246 48.028976 1.254072e-09
## 3 condicion 1 75 0.04831639 11.249800 0.322115 5.720344e-01
## 4 bloque:condicion 1 75 1.02563702 3.172806 24.244399 4.912789e-06
## p<.05 ges pes
## 1 * 0.860329121 0.944941749
## 2 * 0.046200229 0.390387513
## 3 0.001890732 0.004276499
## 4 * 0.038657107 0.244289849
agg_dataset_bloque_cond_cc = subset(agg_seleccion_acc, bloque =="Shared Components")
t.test(accuracy ~ condicion, agg_dataset_bloque_cond_cc, paired = T)
##
## Paired t-test
##
## data: accuracy by condicion
## t = 2.1441, df = 75, p-value = 0.03527
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.006447837 0.175462208
## sample estimates:
## mean difference
## 0.09095502
cohensD(accuracy ~ condicion, data = agg_dataset_bloque_cond_cc, method = "paired")
## Warning in cohensD(accuracy ~ condicion, data = agg_dataset_bloque_cond_cc, :
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 0.2459449
agg_dataset_bloque_cond_wcc = subset(agg_seleccion_acc, bloque =="Distinct Components")
t.test(accuracy ~ condicion, agg_dataset_bloque_cond_wcc, paired = T)
##
## Paired t-test
##
## data: accuracy by condicion
## t = -2.4758, df = 75, p-value = 0.01555
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.25514242 -0.02762332
## sample estimates:
## mean difference
## -0.1413829
cohensD(accuracy ~ condicion, data = agg_dataset_bloque_cond_wcc, method = "paired")
## Warning in cohensD(accuracy ~ condicion, data = agg_dataset_bloque_cond_wcc, :
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 0.283997
#This is just to confirm that the cohen's d procedure is correctly done
agg_dataset_bloque_cond_wcc_spread= spread(agg_dataset_bloque_cond_wcc, key = "condicion", value = "accuracy")
cohensD(agg_dataset_bloque_cond_wcc_spread$CO, agg_dataset_bloque_cond_wcc_spread$IC, method = "paired")
## [1] 0.283997
## Warning: `position_dodge()` requires non-overlapping x intervals.
## `position_dodge()` requires non-overlapping x intervals.
## Warning: Using the `size` aesthetic with geom_polygon was deprecated in ggplot2 3.4.0.
## ℹ Please use the `linewidth` aesthetic instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Supplementary Figure 1. Performance of fraction comparison strategy profiles across the Shared Components and Distinct Components blocks. K-means cluster analyses revealed four strategy profiles. 1) Students in the Full Whole-Number Bias profile had above-chance level performance in trials where fractions were compatible with whole-number rules (e.g., 18/19 vs. 12/19) but below-chance level in trials that were misleading with these rules (e.g., 23/49 vs. 23/30) in trials of both blocks. 2) In contrast, students in the Full Reversed Bias profile had the opposite pattern: below-chance level performance in compatible trials, but above-chance level performance in misleading trials. 3) Students in the Partial Reversed Bias profile had a similar pattern of performance as their peers in the full reversed biased profile; however, they only show the reversed bias in the distinct components block. 4) Students in the High-Performing profile had above-chance level performance for all trials across the two blocks. Notes. Grey lines represent individual participants. Horizontal black bars represent the means and error bars represent 1 standard error. Density clouds show the probability density of the observed accuracy scores.
dataset_cc = subset(dataset, bloque == "CC")
dataset_wcc = subset(dataset, bloque == "WCC")
agg_aritmetica_acc_combined = aggregate(accuracy2~participant, aritmetica, mean)
unique(as.character(agg_aritmetica_acc_combined$participant))
## [1] "p003" "p008" "p021" "p024" "p034" "p042" "p045" "p070" "p075"
## [10] "p076" "p097" "p098" "p110" "p111 " "p118" "p153" "p164" "p167"
## [19] "p169" "p174" "p175" "p176" "p179" "p205" "p227" "p236" "p242"
## [28] "p245" "p246" "p268" "p270" "p286" "p287" "p297" "p302" "p307"
## [37] "p309" "p312" "p319" "p322" "p331" "p337" "p340" "p341" "p342"
## [46] "p344" "p347" "p351" "p364" "p365" "p371" "p398" "p401" "p402"
## [55] "p404" "p417" "p422" "p427" "p433" "p438" "p458" "p465" "p466"
## [64] "p468" "p492" "p495" "p501" "p510" "p512" "p517" "p575" "p579"
## [73] "p594" "p598" "p638" "p643"
agg_aritmetica_acc_combined[agg_aritmetica_acc_combined == "p111 "] <- "p111"
agg_dataset_bloque_cond_cc_spread= spread(agg_dataset_bloque_cond_cc, key = "condicion", value = "accuracy")
names(agg_dataset_bloque_cond_cc_spread) = c("participant","bloque","cc_co","cc_ic")
names(agg_dataset_bloque_cond_wcc_spread) = c("participant","bloque","wcc_co","wcc_ic")
allmeasures = wrat[c("participant","TOTAL_WRAT")]
allmeasures = allmeasures %>%
left_join(carn[c("participant","TOTALCARN")], by = "participant")
allmeasures = allmeasures %>%
left_join(agg_aritmetica_acc_combined[c("participant","accuracy2")], by = "participant")
allmeasures = allmeasures %>%
left_join(agg_stroop_spread[c("participant","palabra","stroop")], by = "participant")
allmeasures = allmeasures %>%
left_join(agg_flechas_spread[c("participant","mixto")], by = "participant")
allmeasures = allmeasures %>%
left_join(twoback[c("participant","matthews_coefficient")], by = "participant")
allmeasures = allmeasures %>%
left_join(agg_dataset_bloque_cond_cc_spread[c("participant","cc_co","cc_ic")], by = "participant")
allmeasures = allmeasures %>%
left_join(agg_dataset_bloque_cond_wcc_spread[c("participant","wcc_co","wcc_ic")], by = "participant")
allmeasures$interference = allmeasures$stroop-allmeasures$palabra
allmeasures = allmeasures %>%
left_join(wrat[c("participant","EDAD_EXPE")], by = "participant")
M = (cor(as.matrix(allmeasures[-1])))
M2 = (rcorr(as.matrix(allmeasures[c("EDAD_EXPE","TOTAL_WRAT", "TOTALCARN", "accuracy2", "stroop", "mixto", "matthews_coefficient", "cc_co", "cc_ic", "wcc_co", "wcc_ic")])))
M2
## EDAD_EXPE TOTAL_WRAT TOTALCARN accuracy2 stroop mixto
## EDAD_EXPE 1.00 0.11 -0.07 0.05 0.14 0.10
## TOTAL_WRAT 0.11 1.00 0.30 0.59 0.14 0.43
## TOTALCARN -0.07 0.30 1.00 0.37 0.10 0.14
## accuracy2 0.05 0.59 0.37 1.00 0.21 0.43
## stroop 0.14 0.14 0.10 0.21 1.00 0.20
## mixto 0.10 0.43 0.14 0.43 0.20 1.00
## matthews_coefficient 0.21 0.06 0.09 0.12 0.15 0.08
## cc_co -0.20 0.22 0.37 0.34 0.18 0.33
## cc_ic 0.13 0.52 0.31 0.43 -0.04 0.36
## wcc_co -0.04 -0.13 0.02 -0.07 0.08 0.00
## wcc_ic 0.00 0.49 0.28 0.35 -0.05 0.27
## matthews_coefficient cc_co cc_ic wcc_co wcc_ic
## EDAD_EXPE 0.21 -0.20 0.13 -0.04 0.00
## TOTAL_WRAT 0.06 0.22 0.52 -0.13 0.49
## TOTALCARN 0.09 0.37 0.31 0.02 0.28
## accuracy2 0.12 0.34 0.43 -0.07 0.35
## stroop 0.15 0.18 -0.04 0.08 -0.05
## mixto 0.08 0.33 0.36 0.00 0.27
## matthews_coefficient 1.00 0.03 0.03 0.04 -0.05
## cc_co 0.03 1.00 0.13 0.41 0.22
## cc_ic 0.03 0.13 1.00 -0.25 0.74
## wcc_co 0.04 0.41 -0.25 1.00 -0.35
## wcc_ic -0.05 0.22 0.74 -0.35 1.00
##
## n
## EDAD_EXPE TOTAL_WRAT TOTALCARN accuracy2 stroop mixto
## EDAD_EXPE 76 76 76 76 76 76
## TOTAL_WRAT 76 76 76 76 76 76
## TOTALCARN 76 76 76 76 76 76
## accuracy2 76 76 76 76 76 76
## stroop 76 76 76 76 76 76
## mixto 76 76 76 76 76 76
## matthews_coefficient 74 74 74 74 74 74
## cc_co 76 76 76 76 76 76
## cc_ic 76 76 76 76 76 76
## wcc_co 76 76 76 76 76 76
## wcc_ic 76 76 76 76 76 76
## matthews_coefficient cc_co cc_ic wcc_co wcc_ic
## EDAD_EXPE 74 76 76 76 76
## TOTAL_WRAT 74 76 76 76 76
## TOTALCARN 74 76 76 76 76
## accuracy2 74 76 76 76 76
## stroop 74 76 76 76 76
## mixto 74 76 76 76 76
## matthews_coefficient 74 74 74 74 74
## cc_co 74 76 76 76 76
## cc_ic 74 76 76 76 76
## wcc_co 74 76 76 76 76
## wcc_ic 74 76 76 76 76
##
## P
## EDAD_EXPE TOTAL_WRAT TOTALCARN accuracy2 stroop mixto
## EDAD_EXPE 0.3228 0.5494 0.6987 0.2407 0.4039
## TOTAL_WRAT 0.3228 0.0083 0.0000 0.2132 0.0001
## TOTALCARN 0.5494 0.0083 0.0009 0.3765 0.2205
## accuracy2 0.6987 0.0000 0.0009 0.0713 0.0000
## stroop 0.2407 0.2132 0.3765 0.0713 0.0859
## mixto 0.4039 0.0001 0.2205 0.0000 0.0859
## matthews_coefficient 0.0719 0.6335 0.4601 0.2896 0.2154 0.5066
## cc_co 0.0879 0.0594 0.0009 0.0023 0.1210 0.0035
## cc_ic 0.2507 0.0000 0.0059 0.0001 0.7080 0.0014
## wcc_co 0.7462 0.2709 0.8423 0.5408 0.4820 0.9873
## wcc_ic 0.9671 0.0000 0.0130 0.0020 0.6760 0.0168
## matthews_coefficient cc_co cc_ic wcc_co wcc_ic
## EDAD_EXPE 0.0719 0.0879 0.2507 0.7462 0.9671
## TOTAL_WRAT 0.6335 0.0594 0.0000 0.2709 0.0000
## TOTALCARN 0.4601 0.0009 0.0059 0.8423 0.0130
## accuracy2 0.2896 0.0023 0.0001 0.5408 0.0020
## stroop 0.2154 0.1210 0.7080 0.4820 0.6760
## mixto 0.5066 0.0035 0.0014 0.9873 0.0168
## matthews_coefficient 0.8253 0.8115 0.7532 0.7005
## cc_co 0.8253 0.2545 0.0002 0.0579
## cc_ic 0.8115 0.2545 0.0302 0.0000
## wcc_co 0.7532 0.0002 0.0302 0.0017
## wcc_ic 0.7005 0.0579 0.0000 0.0017
colMeans(allmeasures[c("EDAD_EXPE","TOTAL_WRAT", "TOTALCARN", "accuracy2", "stroop", "mixto", "matthews_coefficient", "cc_co", "cc_ic", "wcc_co", "wcc_ic")],
na.rm = T)
## EDAD_EXPE TOTAL_WRAT TOTALCARN
## 16.1877632 26.2631579 4.6447368
## accuracy2 stroop mixto
## 0.5579486 0.7986111 0.7696742
## matthews_coefficient cc_co cc_ic
## 0.1701803 0.8281196 0.7371646
## wcc_co wcc_ic
## 0.5844513 0.7258342
sapply(allmeasures[c("EDAD_EXPE","TOTAL_WRAT", "TOTALCARN", "accuracy2", "stroop", "mixto", "matthews_coefficient", "cc_co", "cc_ic", "wcc_co", "wcc_ic")], sd)
## EDAD_EXPE TOTAL_WRAT TOTALCARN
## 0.3799003 4.3859425 2.0636792
## accuracy2 stroop mixto
## 0.2899697 0.1818472 0.1622868
## matthews_coefficient cc_co cc_ic
## NA 0.2416509 0.3137455
## wcc_co wcc_ic
## 0.2874034 0.3172508
sd(allmeasures$matthews_coefficient, na.rm = T)
## [1] 0.1840856
agg_dataset_spread = agg_seleccion_acc
agg_dataset_spread$type = paste(agg_dataset_spread$bloque, agg_dataset_spread$condicion, sep = "_")
agg_dataset_spread = subset(agg_dataset_spread, select = -c(bloque, condicion))
agg_dataset_spread = spread(agg_dataset_spread, "type", "accuracy")
length(agg_dataset_spread$participant)
## [1] 76
agg_datasetv2_spread <- agg_dataset_spread[, -1]
set.seed(240) # Setting seed
kmax = 10 # the maximum number of clusters we will examine; you can change this
totwss = rep(0,kmax) # will be filled with total sum of within group sum squares
kmfit = list() # create and empty list
for (i in 1:kmax){
kclus = kmeans(agg_datasetv2_spread,centers=i,iter.max=20)
totwss[i] = kclus$tot.withinss
kmfit[[i]] = kclus
}
kmeansAIC = function(fit){
m = ncol(fit$centers)
n = length(fit$cluster)
k = nrow(fit$centers)
D = fit$tot.withinss
return(D + 2*m*k)
}
aic=sapply(kmfit,kmeansAIC)
#mult.fig(1,main="Simulated data with two clusters")
#plot(seq(1,kmax),aic,xlab="Number of clusters",ylab="AIC",pch=20,cex=2)
n = nrow(agg_datasetv2_spread)
rsq = 1-(totwss*(n-1))/(totwss[1]*(n-seq(1,kmax)))
cbind(aic,rsq)
## aic rsq
## [1,] 33.50602 0.0000000
## [2,] 35.90675 0.2089803
## [3,] 32.48787 0.6581035
## [4,] 38.29195 0.7430364
## [5,] 45.89884 0.7556983
## [6,] 52.47602 0.8119765
## [7,] 60.31820 0.8159770
## [8,] 68.15720 0.8202329
## [9,] 75.71654 0.8368893
## [10,] 83.16136 0.8591529
set.seed(240) # Setting seed
n_clust <- n_clusters(agg_datasetv2_spread,
package = c("easystats", "NbClust", "mclust"),
standardize = FALSE, n_max = 10)
n_clust
## # Method Agreement Procedure:
##
## The choice of 4 clusters is supported by 10 (34.48%) methods out of 29 (Gap_Maechler2012, Ch, Hartigan, Scott, Marriot, Friedman, Cindex, PtBiserial, SDindex, Mixture (VEI)).
# Fitting K-Means clustering Model
# to training dataset
set.seed(240) # Setting seed
kmeans.re <- kmeans(agg_datasetv2_spread, centers = 3, nstart = 30)
kmeans.re
## K-means clustering with 3 clusters of sizes 16, 42, 18
##
## Cluster means:
## Distinct Components_CO Distinct Components_IC Shared Components_CO
## 1 0.8049428 0.1913807 0.7642974
## 2 0.6795051 0.8979147 0.9510582
## 3 0.1666667 0.7993827 0.5979938
## Shared Components_IC
## 1 0.2465278
## 2 0.9123872
## 3 0.7644336
##
## Clustering vector:
## [1] 2 2 2 2 2 3 2 1 3 2 2 3 3 1 2 3 1 2 2 2 2 2 2 2 2 2 2 3 2 2 2 2 2 2 3 2 1 2
## [39] 2 2 2 2 2 3 3 2 3 1 3 3 2 2 2 1 1 1 3 3 1 1 2 2 1 3 1 1 2 3 2 2 3 3 1 1 1 2
##
## Within cluster sum of squares by cluster:
## [1] 2.808910 1.454119 4.224846
## (between_SS / total_SS = 66.7 %)
##
## Available components:
##
## [1] "cluster" "centers" "totss" "withinss" "tot.withinss"
## [6] "betweenss" "size" "iter" "ifault"
clusterclass = as.data.frame(kmeans.re$cluster)
names(clusterclass) ="cluster"
agg_datasetv2_spread_pid = cbind(agg_dataset_spread,clusterclass )
plot(seq(1,kmax),aic,xlab="Number of clusters",ylab="AIC",pch=20,cex=2)
Supplementary Figure 2. Scree plot of the Akaike Information Criterion (AIC) values for different numbers of clusters.
agg_seleccion_acc_cluster = agg_seleccion_acc %>%
left_join(agg_datasetv2_spread_pid[c("participant","cluster")], by = "participant")
summarySE(agg_seleccion_acc_cluster, "accuracy", c("cluster", "condicion", "bloque"))
## cluster condicion bloque N accuracy sd se
## 1 1 CO Shared Components 16 0.7642974 0.14676502 0.03669125
## 2 1 CO Distinct Components 16 0.8049428 0.20278550 0.05069638
## 3 1 IC Shared Components 16 0.2465278 0.26524990 0.06631248
## 4 1 IC Distinct Components 16 0.1913807 0.23289741 0.05822435
## 5 2 CO Shared Components 42 0.9510582 0.06962971 0.01074410
## 6 2 CO Distinct Components 42 0.6795051 0.13564640 0.02093069
## 7 2 IC Shared Components 42 0.9123872 0.08611603 0.01328799
## 8 2 IC Distinct Components 42 0.8979147 0.06929717 0.01069279
## 9 3 CO Shared Components 18 0.5979938 0.36011118 0.08487902
## 10 3 CO Distinct Components 18 0.1666667 0.17568209 0.04140867
## 11 3 IC Shared Components 18 0.7644336 0.22606634 0.05328435
## 12 3 IC Distinct Components 18 0.7993827 0.19201590 0.04525858
## ci
## 1 0.07820556
## 2 0.10805677
## 3 0.14134170
## 4 0.12410227
## 5 0.02169814
## 6 0.04227039
## 7 0.02683564
## 8 0.02159452
## 9 0.17907908
## 10 0.08736465
## 11 0.11242014
## 12 0.09548726
agg_seleccion_acc_cluster$cluster = as.factor(as.character(agg_seleccion_acc_cluster$cluster))
levels(agg_seleccion_acc_cluster$cluster)[levels(agg_seleccion_acc_cluster$cluster ) == 1] <- "Whole-Number\nBias"
levels(agg_seleccion_acc_cluster$cluster)[levels(agg_seleccion_acc_cluster$cluster ) == 3] <- "Reverse\nBias"
levels(agg_seleccion_acc_cluster$cluster)[levels(agg_seleccion_acc_cluster$cluster ) == 2] <- "High\nPerforming"
summarySE(agg_seleccion_acc_cluster, "accuracy", c("bloque","condicion","cluster"))
## bloque condicion cluster N accuracy sd
## 1 Shared Components CO Whole-Number\nBias 16 0.7642974 0.14676502
## 2 Shared Components CO High\nPerforming 42 0.9510582 0.06962971
## 3 Shared Components CO Reverse\nBias 18 0.5979938 0.36011118
## 4 Shared Components IC Whole-Number\nBias 16 0.2465278 0.26524990
## 5 Shared Components IC High\nPerforming 42 0.9123872 0.08611603
## 6 Shared Components IC Reverse\nBias 18 0.7644336 0.22606634
## 7 Distinct Components CO Whole-Number\nBias 16 0.8049428 0.20278550
## 8 Distinct Components CO High\nPerforming 42 0.6795051 0.13564640
## 9 Distinct Components CO Reverse\nBias 18 0.1666667 0.17568209
## 10 Distinct Components IC Whole-Number\nBias 16 0.1913807 0.23289741
## 11 Distinct Components IC High\nPerforming 42 0.8979147 0.06929717
## 12 Distinct Components IC Reverse\nBias 18 0.7993827 0.19201590
## se ci
## 1 0.03669125 0.07820556
## 2 0.01074410 0.02169814
## 3 0.08487902 0.17907908
## 4 0.06631248 0.14134170
## 5 0.01328799 0.02683564
## 6 0.05328435 0.11242014
## 7 0.05069638 0.10805677
## 8 0.02093069 0.04227039
## 9 0.04140867 0.08736465
## 10 0.05822435 0.12410227
## 11 0.01069279 0.02159452
## 12 0.04525858 0.09548726
ezANOVA(agg_seleccion_acc_cluster, dv = .(accuracy), wid = .(participant), within = .c(bloque, condicion), between = .(cluster))
## Warning: Converting "condicion" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 2 cluster 2 73 196.296082 4.256746e-30 * 0.476275764
## 3 bloque 1 73 56.444327 1.153660e-10 * 0.127061576
## 5 condicion 1 73 1.189443 2.790287e-01 0.005660181
## 4 cluster:bloque 2 73 7.570526 1.028677e-03 * 0.037577857
## 6 cluster:condicion 2 73 101.972693 7.309681e-22 * 0.493936213
## 7 bloque:condicion 1 73 30.075793 5.678524e-07 * 0.107808461
## 8 cluster:bloque:condicion 2 73 10.019702 1.428702e-04 * 0.074513118
ezANOVA.pes(ezANOVA(agg_seleccion_acc_cluster, dv = .(accuracy), wid = .(participant), within = .c(bloque, condicion), between = .(cluster), detailed=T))
## Warning: Converting "condicion" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd SSn SSd F
## 1 (Intercept) 1 73 157.10912586 1.435278 7990.763697
## 2 cluster 2 73 7.71888820 1.435278 196.296082
## 3 bloque 1 73 1.23546250 1.597836 56.444327
## 5 condicion 1 73 0.04831639 2.965333 1.189443
## 4 cluster:bloque 2 73 0.33140980 1.597836 7.570526
## 6 cluster:condicion 2 73 8.28446653 2.965333 101.972693
## 7 bloque:condicion 1 73 1.02563702 2.489427 30.075793
## 8 cluster:bloque:condicion 2 73 0.68337865 2.489427 10.019702
## p p<.05 ges pes
## 1 2.473821e-76 * 0.948743792 0.99094716
## 2 4.256746e-30 * 0.476275764 0.84321042
## 3 1.153660e-10 * 0.127061576 0.43605099
## 5 2.790287e-01 0.005660181 0.01603252
## 4 1.028677e-03 * 0.037577857 0.17178207
## 6 7.309681e-22 * 0.493936213 0.73641012
## 7 5.678524e-07 * 0.107808461 0.29178328
## 8 1.428702e-04 * 0.074513118 0.21538621
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
{ezANOVA.pes(ezANOVA(., dv = .(accuracy), wid = .(participant), within = .c(condicion), between = .(cluster), detailed=T))}
## Warning: Converting "condicion" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 73 93.104359 1.936981 3508.872495 1.817219e-63 *
## 2 cluster 2 73 4.696658 1.936981 88.502707 3.062886e-20 *
## 3 condicion 1 73 0.314367 3.017679 7.604782 7.350640e-03 *
## 4 cluster:condicion 2 73 2.111040 3.017679 25.533846 3.915090e-09 *
## ges pes
## 1 0.9494727 0.97961960
## 2 0.4866339 0.70800632
## 3 0.0596632 0.09434653
## 4 0.2987729 0.41161153
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="Whole-Number\nBias") %>%
{t.test(.$accuracy ~ .$condicion, paired = T)}
##
## Paired t-test
##
## data: .$accuracy by .$condicion
## t = 5.639, df = 15, p-value = 4.711e-05
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.3220614 0.7134778
## sample estimates:
## mean difference
## 0.5177696
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="Whole-Number\nBias") %>%
{cohensD(accuracy ~ condicion, data = ., method = "paired")}
## Warning in cohensD(accuracy ~ condicion, data = ., method = "paired"):
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 1.409752
# agg_seleccion_acc_cluster %>%
# subset(., bloque =="Common Components") %>%
# subset(., cluster =="Full Reversed\nBiased") %>%
# {t.test(.$accuracy ~ .$condicion, paired = T)}
#
# agg_seleccion_acc_cluster %>%
# subset(., bloque =="Common Components") %>%
# subset(., cluster =="Full Reversed\nBiased") %>%
# {cohensD(accuracy ~ condicion, data = ., method = "paired")}
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="Reverse\nBias") %>%
{t.test(.$accuracy ~ .$condicion, paired = T)}
##
## Paired t-test
##
## data: .$accuracy by .$condicion
## t = -1.529, df = 17, p-value = 0.1446
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.39609708 0.06321764
## sample estimates:
## mean difference
## -0.1664397
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="Reverse\nBias") %>%
aggregate(accuracy ~ participant, ., mean) %>%
{t.test(.$accuracy, mu =.5)}
##
## One Sample t-test
##
## data: .$accuracy
## t = 3.993, df = 17, p-value = 0.0009415
## alternative hypothesis: true mean is not equal to 0.5
## 95 percent confidence interval:
## 0.5854631 0.7769643
## sample estimates:
## mean of x
## 0.6812137
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="Reverse\nBias") %>%
{cohensD(accuracy ~ condicion, data = ., method = "paired")}
## Warning in cohensD(accuracy ~ condicion, data = ., method = "paired"):
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 0.3604001
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="High\nPerforming") %>%
{t.test(.$accuracy ~ .$condicion, paired = T)}
##
## Paired t-test
##
## data: .$accuracy by .$condicion
## t = 2.582, df = 41, p-value = 0.01349
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.008424469 0.068917579
## sample estimates:
## mean difference
## 0.03867102
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., cluster =="High\nPerforming") %>%
{cohensD(accuracy ~ condicion, data = ., method = "paired")}
## Warning in cohensD(accuracy ~ condicion, data = ., method = "paired"):
## calculating paired samples Cohen's d using formula input. Results will be
## incorrect if cases do not appear in the same order for both levels of the
## grouping factor
## [1] 0.3984169
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., condicion =="CO") %>%
{pairwise.t.test(.$accuracy, .$cluster, p.adj = "none", paired = F)}
##
## Pairwise comparisons using t tests with pooled SD
##
## data: .$accuracy and .$cluster
##
## Whole-Number\nBias High\nPerforming
## High\nPerforming 0.0015 -
## Reverse\nBias 0.0145 9.3e-09
##
## P value adjustment method: none
# agg_seleccion_acc_cluster %>%
# subset(., bloque =="Common Components") %>%
# subset(., condicion =="CO") %>%
# subset(., cluster =="High\nPerforming" | cluster =="Full Reversed\nBiased") %>%
# {t.test(.$accuracy ~ .$cluster, paired = F)}
#
# agg_seleccion_acc_cluster %>%
# subset(., bloque =="Common Components") %>%
# subset(., condicion =="CO") %>%
# subset(., cluster =="High\nPerforming" | cluster =="Full Reversed\nBiased") %>%
# {cohensD(accuracy ~ as.numeric(cluster), data = ., method = "pooled")}
agg_seleccion_acc_cluster %>%
subset(., bloque =="Shared Components") %>%
subset(., condicion =="IC") %>%
{pairwise.t.test(.$accuracy, .$cluster, p.adj = "none", paired = F)}
##
## Pairwise comparisons using t tests with pooled SD
##
## data: .$accuracy and .$cluster
##
## Whole-Number\nBias High\nPerforming
## High\nPerforming < 2e-16 -
## Reverse\nBias 9.3e-13 0.0036
##
## P value adjustment method: none
agg_seleccion_acc_cluster %>%
subset(., bloque =="Distinct Components") %>%
{ezANOVA.pes(ezANOVA(., dv = .(accuracy), wid = .(participant), within = .c(condicion), between = .(cluster), detailed=T))}
## Warning: Converting "condicion" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 73 65.2402292 1.096133 4344.85330 8.577969e-67 *
## 2 cluster 2 73 3.3536395 1.096133 111.67245 6.175579e-23 *
## 3 condicion 1 73 0.7595864 2.437081 22.75255 9.187396e-06 *
## 4 cluster:condicion 2 73 6.8568052 2.437081 102.69390 6.047173e-22 *
## ges pes
## 1 0.9486253 0.9834761
## 2 0.4869625 0.7536654
## 3 0.1769442 0.2376182
## 4 0.6599415 0.7377759
agg_seleccion_acc_cluster %>%
subset(., bloque =="Distinct Components") %>%
subset(., cluster =="High\nPerforming") %>%
{t.test(.$accuracy ~ .$condicion, paired = T)}
##
## Paired t-test
##
## data: .$accuracy by .$condicion
## t = -8.9908, df = 41, p-value = 3.026e-11
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -0.2674696 -0.1693496
## sample estimates:
## mean difference
## -0.2184096
agg_seleccion_acc_cluster %>%
subset(., bloque =="Distinct Components") %>%
subset(., condicion =="CO") %>%
{pairwise.t.test(.$accuracy, .$cluster, p.adj = "none", paired = F)}
##
## Pairwise comparisons using t tests with pooled SD
##
## data: .$accuracy and .$cluster
##
## Whole-Number\nBias High\nPerforming
## High\nPerforming 0.0099 -
## Reverse\nBias <2e-16 <2e-16
##
## P value adjustment method: none
agg_seleccion_acc_cluster %>%
subset(., bloque =="Distinct Components") %>%
subset(., condicion =="IC") %>%
{pairwise.t.test(.$accuracy, .$cluster, p.adj = "none", paired = F)}
##
## Pairwise comparisons using t tests with pooled SD
##
## data: .$accuracy and .$cluster
##
## Whole-Number\nBias High\nPerforming
## High\nPerforming <2e-16 -
## Reverse\nBias <2e-16 0.022
##
## P value adjustment method: none
## cluster N accuracy sd se ci
## 1 Whole-Number\nBias 16 0.4981618 0.11109169 0.02777292 0.05919658
## 2 Reverse\nBias 18 0.4830247 0.09118715 0.02149302 0.04534630
## 3 High\nPerforming 42 0.7887099 0.07351612 0.01134378 0.02290923
## Warning: `position_dodge()` requires non-overlapping x intervals.
## `position_dodge()` requires non-overlapping x intervals.
## `position_dodge()` requires non-overlapping x intervals.
## Warning in x + params$x: longer object length is not a multiple of shorter
## object length
## Warning in x + params$x: longer object length is not a multiple of shorter
## object length
## Warning: `position_dodge()` requires non-overlapping x intervals.
## `position_dodge()` requires non-overlapping x intervals.
## `position_dodge()` requires non-overlapping x intervals.
## Warning in x + params$x: longer object length is not a multiple of shorter
## object length
## Warning in x + params$x: longer object length is not a multiple of shorter
## object length
Figure 5. Performance of fraction comparison strategy profiles across the Shared Component and Distinct Component blocks. K-means cluster analyses revealed three strategy profiles. 1) Students in the Whole-Number Bias profile had above-chance level performance in trials where fractions were compatible with whole-number rules (e.g., 18/19 vs. 12/19) but below-chance level in trials that were misleading with these rules (e.g., 23/49 vs. 23/30) in trials of both blocks. 2) In contrast, students in the Reverse Bias profile had the opposite pattern: below-chance level performance in compatible trials and above-chance level performance in misleading trials. However, this bias was only found in the Distinct Component block. 3) Students in the High-Performing profile had above-chance level performance for all trials across the two blocks. Notes. Grey lines represent individual participants. Horizontal black bars represent the means and error bars represent ±1 standard errors. Density clouds show the probability density of the observed accuracy scores. p <.05, p <.01, p <.001.
allmeasures_clusters = allmeasures %>%
left_join(agg_datasetv2_spread_pid[c(1,6)], by = "participant")
allmeasures_clusters$cluster = as.factor(allmeasures_clusters$cluster)
levels(allmeasures_clusters$cluster)[levels(allmeasures_clusters$cluster ) == 1] <- "Whole-Number\nBias"
#levels(allmeasures_clusters$cluster)[levels(allmeasures_clusters$cluster ) == 2] <- "Full Reversed\nBiased"
levels(allmeasures_clusters$cluster)[levels(allmeasures_clusters$cluster ) == 3] <- "Reverse\nBias"
levels(allmeasures_clusters$cluster)[levels(allmeasures_clusters$cluster ) == 2] <- "High\nPerforming"
allmeasures_clusters$cluster <- factor(allmeasures_clusters$cluster, levels=c("Whole-Number\nBias",
"Reverse\nBias", "High\nPerforming"))
####################################################################################################
ezANOVA(allmeasures_clusters, dv = .(TOTAL_WRAT), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 73 10.63697 8.830595e-05 * 0.2256608
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 73 11.23084 395.9534 1.035287 0.3602789
summarySE(allmeasures_clusters,"TOTAL_WRAT","cluster")
## cluster N TOTAL_WRAT sd se ci
## 1 Whole-Number\nBias 16 22.43750 3.054368 0.7635921 1.627558
## 2 Reverse\nBias 18 26.22222 4.621631 1.0893290 2.298283
## 3 High\nPerforming 42 27.73810 3.870208 0.5971861 1.206042
pairwise.t.test(allmeasures_clusters$TOTAL_WRAT, allmeasures_clusters$cluster, p.adj = "fdr", paired = F)[3]
## $p.value
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 9.380228e-03 NA
## High\nPerforming 4.984181e-05 0.1731927
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(TOTAL_WRAT ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.9545617
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(TOTAL_WRAT ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 1.444497
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(TOTAL_WRAT ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.3692992
####################################################################################################
ezANOVA(allmeasures_clusters, dv = .(TOTALCARN), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 73 4.716379 0.01184788 * 0.1144297
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 73 5.384346 126.2867 1.55621 0.21785
summarySE(allmeasures_clusters,"TOTALCARN","cluster")
## cluster N TOTALCARN sd se ci
## 1 Whole-Number\nBias 16 3.437500 1.152895 0.2882237 0.6143343
## 2 Reverse\nBias 18 4.444444 1.854160 0.4370297 0.9220520
## 3 High\nPerforming 42 5.190476 2.233209 0.3445917 0.6959170
pairwise.t.test(allmeasures_clusters$TOTALCARN, allmeasures_clusters$cluster, p.adj = "fdr", paired = F)[3]
## $p.value
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 0.18269205 NA
## High\nPerforming 0.01010623 0.1826921
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(TOTALCARN ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.6433873
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(TOTALCARN ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.8756799
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(TOTALCARN ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.3503959
####################################################################################################
ezANOVA(allmeasures_clusters, dv = .(accuracy2), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 73 7.059496 0.001574583 * 0.1620656
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 73 0.01071112 1.404401 0.2783791 0.7578098
summarySE(allmeasures_clusters,"accuracy2","cluster")
## cluster N accuracy2 sd se ci
## 1 Whole-Number\nBias 16 0.3519006 0.2846989 0.07117474 0.15170536
## 2 Reverse\nBias 18 0.5336257 0.2957242 0.06970286 0.14706018
## 3 High\nPerforming 42 0.6468672 0.2509332 0.03871983 0.07819628
pairwise.t.test(allmeasures_clusters$accuracy2, allmeasures_clusters$cluster, p.adj = "fdr", paired = F)[3]
## $p.value
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 0.07968367 NA
## High\nPerforming 0.00112063 0.1394738
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(accuracy2 ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.625327
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(accuracy2 ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 1.132713
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(accuracy2 ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.4275723
####################################################################################################
ezANOVA(allmeasures_clusters, dv = .(stroop), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 73 1.174084 0.3148697 0.03116424
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 73 0.01891564 1.549016 0.4457158 0.6420967
summarySE(allmeasures_clusters,"stroop","cluster")
## cluster N stroop sd se ci
## 1 Whole-Number\nBias 16 0.7934028 0.1958859 0.04897147 0.10438021
## 2 Reverse\nBias 18 0.7453704 0.2181510 0.05141869 0.10848395
## 3 High\nPerforming 42 0.8234127 0.1575919 0.02431695 0.04910908
pairwise.t.test(allmeasures_clusters$stroop, allmeasures_clusters$cluster, p.adj = "fdr", paired = F)[3]
## $p.value
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 0.5751371 NA
## High\nPerforming 0.5751371 0.3933116
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(stroop ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.2309126
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(stroop ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.1778854
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(stroop ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.4396861
####################################################################################################
ezANOVA(allmeasures_clusters, dv = .(mixto), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 73 5.329177 0.006913442 * 0.1274033
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 73 0.06158626 0.9282478 2.421658 0.09587516
summarySE(allmeasures_clusters,"mixto","cluster")
## cluster N mixto sd se ci
## 1 Whole-Number\nBias 16 0.6833333 0.1786656 0.04466640 0.09520417
## 2 Reverse\nBias 18 0.7301587 0.2023472 0.04769369 0.10062488
## 3 High\nPerforming 42 0.8195011 0.1156893 0.01785124 0.03605131
pairwise.t.test(allmeasures_clusters$mixto, allmeasures_clusters$cluster, p.adj = "fdr", paired = F)[3]
## $p.value
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 0.37804063 NA
## High\nPerforming 0.01055716 0.06387682
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(mixto ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.2443771
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(mixto ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 1.005226
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(mixto ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.6098487
####################################################################################################
allmeasures_clusters_matt = subset(allmeasures_clusters, !is.na(matthews_coefficient))
ezANOVA(allmeasures_clusters_matt, dv = .(matthews_coefficient), wid = .(participant), between = .c(cluster))
## Warning: Converting "participant" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## Coefficient covariances computed by hccm()
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 1 cluster 2 71 0.006255231 0.9937648 0.0001761726
##
## $`Levene's Test for Homogeneity of Variance`
## DFn DFd SSn SSd F p p<.05
## 1 2 71 0.009727041 0.868385 0.3976461 0.6733867
summarySE(allmeasures_clusters,"matthews_coefficient","cluster", na.rm = T)
## cluster N matthews_coefficient sd se ci
## 1 Whole-Number\nBias 15 0.1654276 0.1665458 0.04300194 0.09222999
## 2 Reverse\nBias 17 0.1720630 0.2111312 0.05120685 0.10855366
## 3 High\nPerforming 42 0.1711156 0.1829170 0.02822471 0.05700096
pairwise.t.test(allmeasures_clusters$matthews_coefficient, allmeasures_clusters$cluster, p.adj = "fdr", paired = F, na.rm = T)
##
## Pairwise comparisons using t tests with pooled SD
##
## data: allmeasures_clusters$matthews_coefficient and allmeasures_clusters$cluster
##
## Whole-Number\nBias Reverse\nBias
## Reverse\nBias 0.99 -
## High\nPerforming 0.99 0.99
##
## P value adjustment method: fdr
allmeasures_clusters %>%
subset(., cluster == "Reverse\nBias" | cluster == "Whole-Number\nBias") %>%
{cohensD(matthews_coefficient ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.03462759
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Whole-Number\nBias") %>%
{cohensD(matthews_coefficient ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.03179548
allmeasures_clusters %>%
subset(., cluster == "High\nPerforming" | cluster == "Reverse\nBias") %>%
{cohensD(matthews_coefficient ~ as.numeric(cluster), data = ., method = "pooled")}
## [1] 0.004953444
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.5, :
## Ignoring unknown parameters: `shape`
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.5, : Ignoring unknown parameters: `shape`
## Ignoring unknown parameters: `shape`
## Warning in geom_dotplot(binaxis = "y", stackdir = "center", dotsize = 0.5, : Ignoring unknown parameters: `shape`
## Ignoring unknown parameters: `shape`
## Ignoring unknown parameters: `shape`
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Warning: Removed 2 rows containing non-finite outside the scale range
## (`stat_summary()`).
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
## Warning: Removed 2 rows containing missing values or values outside the scale range
## (`stat_bindot()`).
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
Figure 6. Strategy profile’s differences in math achievement, procedural knowledge, conceptual knowledge, and executive functioning tasks. Compared to students in the High-Performing profile students in the Whole-Number Bias profile had lower: A. math achievement (WRAT math computation subtest), B. procedural knowledge (fraction arithmetic task), and C. conceptual knowledge (CARN). Notably, students in biased profiles had lower F. cognitive flexibility (Arrows task). Additionally, students in the Reverse Bias profile had stronger general math achievement and procedural knowledge than Whole-Number Bias students. Finally, regardless of their profiles, students had similar D. inhibitory control (Stroop Interference block) and E. working memory (visuospatial 2-back task) skills. Notes. †p < .10, p <.05, p <.01, p <.001.
dataset_cluster_wcc = subset(dataset_cluster,bloque == "WCC" )
levels(dataset_cluster_wcc$cluster)
## [1] "High\nPerforming" "Reverse\nBias" "Whole-Number\nBias"
modelo_distancia_abs_wcc_cluster <- glmer(accuracy ~ cluster * condicion * distancia_absz
+ (1+condicion|participant) + (1|estimulo),
data = dataset_cluster_wcc, family = binomial,
control = glmerControl(optimizer = "bobyqa"))
summary(modelo_distancia_abs_wcc_cluster)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ cluster * condicion * distancia_absz + (1 + condicion |
## participant) + (1 | estimulo)
## Data: dataset_cluster_wcc
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 2424.2 2518.7 -1196.1 2392.2 2706
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -7.0609 -0.3131 0.2412 0.4936 4.4048
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.8214 0.9063
## condicionIC 3.0644 1.7505 -0.91
## estimulo (Intercept) 0.1124 0.3353
## Number of obs: 2722, groups: participant, 76; estimulo, 36
##
## Fixed effects:
## Estimate Std. Error
## (Intercept) 0.9124 0.1838
## clusterReverse\nBias -2.9343 0.3330
## clusterWhole-Number\nBias 0.9013 0.3369
## condicionIC 1.7158 0.3426
## distancia_absz 0.5118 0.1208
## clusterReverse\nBias:condicionIC 2.0865 0.5867
## clusterWhole-Number\nBias:condicionIC -5.4459 0.6145
## clusterReverse\nBias:distancia_absz -0.4255 0.1704
## clusterWhole-Number\nBias:distancia_absz -0.4814 0.1714
## condicionIC:distancia_absz 0.6191 0.2585
## clusterReverse\nBias:condicionIC:distancia_absz -0.5695 0.3317
## clusterWhole-Number\nBias:condicionIC:distancia_absz -0.3573 0.3526
## z value Pr(>|z|)
## (Intercept) 4.965 6.87e-07 ***
## clusterReverse\nBias -8.811 < 2e-16 ***
## clusterWhole-Number\nBias 2.675 0.007463 **
## condicionIC 5.007 5.51e-07 ***
## distancia_absz 4.238 2.26e-05 ***
## clusterReverse\nBias:condicionIC 3.557 0.000376 ***
## clusterWhole-Number\nBias:condicionIC -8.862 < 2e-16 ***
## clusterReverse\nBias:distancia_absz -2.497 0.012526 *
## clusterWhole-Number\nBias:distancia_absz -2.809 0.004966 **
## condicionIC:distancia_absz 2.395 0.016605 *
## clusterReverse\nBias:condicionIC:distancia_absz -1.717 0.085970 .
## clusterWhole-Number\nBias:condicionIC:distancia_absz -1.014 0.310805
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) clstRB clW-NB cndcIC dstnc_ clRB:IC clW-NB:IC clRB:_ cW-NB:_
## clstrRvrsBs -0.463
## clstrWhl-NB -0.433 0.199
## condicionIC -0.772 0.381 0.357
## distanc_bsz 0.116 -0.066 -0.055 -0.062
## clstrRBs:IC 0.400 -0.833 -0.187 -0.517 0.036
## clstW-NB:IC 0.369 -0.185 -0.815 -0.504 0.032 0.268
## clstrRBs:d_ -0.078 0.032 0.041 0.042 -0.473 -0.017 -0.024
## clstrW-NB:_ -0.077 0.044 0.057 0.042 -0.470 -0.024 -0.032 0.333
## cndcnIC:ds_ -0.055 0.035 0.023 0.200 -0.465 -0.118 -0.112 0.219 0.218
## clstRB:IC:_ 0.040 -0.020 -0.019 -0.155 0.242 0.091 0.086 -0.512 -0.170
## clW-NB:IC:_ 0.038 -0.024 -0.024 -0.145 0.226 0.087 0.058 -0.160 -0.484
## cnIC:_ cRB:IC:
## clstrRvrsBs
## clstrWhl-NB
## condicionIC
## distanc_bsz
## clstrRBs:IC
## clstW-NB:IC
## clstrRBs:d_
## clstrW-NB:_
## cndcnIC:ds_
## clstRB:IC:_ -0.584
## clW-NB:IC:_ -0.558 0.431
Anova(modelo_distancia_abs_wcc_cluster, type =3)
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: accuracy
## Chisq Df Pr(>Chisq)
## (Intercept) 24.6502 1 6.874e-07 ***
## cluster 98.0598 2 < 2.2e-16 ***
## condicion 25.0748 1 5.515e-07 ***
## distancia_absz 17.9570 1 2.260e-05 ***
## cluster:condicion 116.3936 2 < 2.2e-16 ***
## cluster:distancia_absz 10.6354 2 0.004904 **
## condicion:distancia_absz 5.7376 1 0.016605 *
## cluster:condicion:distancia_absz 3.0405 2 0.218658
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_nakagawa(modelo_distancia_abs_wcc_cluster)
## # R2 for Mixed Models
##
## Conditional R2: 0.560
## Marginal R2: 0.424
grafica_absz = ggpredict(modelo_distancia_abs_wcc_cluster, terms=c("distancia_absz [-2:4]","condicion","cluster"))
#grafica_absz = ggpredict(modelo_distancia_abs_wcc_cluster, terms=c("distancia_absz [-2:4]","cluster"))
#plot(grafica_absz)
em = emmeans(modelo_distancia_abs_wcc_cluster, pairwise ~ condicion|cluster, mult.name = "condicion")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emmeans
## cluster = High
## Performing:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.713 0.0376 Inf 0.6345 0.781 0.5 4.962 <.0001
## IC 0.933 0.0146 Inf 0.8977 0.956 0.5 11.306 <.0001
##
## cluster = Reverse
## Bias:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.117 0.0306 Inf 0.0689 0.191 0.5 -6.814 <.0001
## IC 0.856 0.0375 Inf 0.7658 0.915 0.5 5.860 <.0001
##
## cluster = Whole-Number
## Bias:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.860 0.0369 Inf 0.7710 0.918 0.5 5.925 <.0001
## IC 0.128 0.0366 Inf 0.0718 0.218 0.5 -5.850 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the logit scale
## Tests are performed on the logit scale
##
## $contrasts
## cluster = High
## Performing:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 0.1799 0.0616 Inf 0.09195 0.3522 1 -5.006 <.0001
##
## cluster = Reverse
## Bias:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 0.0223 0.0112 Inf 0.00832 0.0599 1 -7.549 <.0001
##
## cluster = Whole-Number
## Bias:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 41.6960 22.1735 Inf 14.70398 118.2373 1 7.015 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the log odds ratio scale
## Tests are performed on the log odds ratio scale
em = emmeans(modelo_distancia_abs_wcc_cluster, pairwise ~ condicion|cluster, mult.name = "condicion")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emmeans
## cluster = High
## Performing:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.713 0.0376 Inf 0.6345 0.781 0.5 4.962 <.0001
## IC 0.933 0.0146 Inf 0.8977 0.956 0.5 11.306 <.0001
##
## cluster = Reverse
## Bias:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.117 0.0306 Inf 0.0689 0.191 0.5 -6.814 <.0001
## IC 0.856 0.0375 Inf 0.7658 0.915 0.5 5.860 <.0001
##
## cluster = Whole-Number
## Bias:
## condicion prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO 0.860 0.0369 Inf 0.7710 0.918 0.5 5.925 <.0001
## IC 0.128 0.0366 Inf 0.0718 0.218 0.5 -5.850 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the logit scale
## Tests are performed on the logit scale
##
## $contrasts
## cluster = High
## Performing:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 0.1799 0.0616 Inf 0.09195 0.3522 1 -5.006 <.0001
##
## cluster = Reverse
## Bias:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 0.0223 0.0112 Inf 0.00832 0.0599 1 -7.549 <.0001
##
## cluster = Whole-Number
## Bias:
## contrast odds.ratio SE df asymp.LCL asymp.UCL null z.ratio p.value
## CO / IC 41.6960 22.1735 Inf 14.70398 118.2373 1 7.015 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the log odds ratio scale
## Tests are performed on the log odds ratio scale
em = emmeans(modelo_distancia_abs_wcc_cluster, pairwise ~ cluster|condicion, mult.name = "cluster")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emmeans
## condicion = CO:
## cluster prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## High\nPerforming 0.713 0.0376 Inf 0.6345 0.781 0.5 4.962 <.0001
## Reverse\nBias 0.117 0.0306 Inf 0.0689 0.191 0.5 -6.814 <.0001
## Whole-Number\nBias 0.860 0.0369 Inf 0.7710 0.918 0.5 5.925 <.0001
##
## condicion = IC:
## cluster prob SE df asymp.LCL asymp.UCL null z.ratio p.value
## High\nPerforming 0.933 0.0146 Inf 0.8977 0.956 0.5 11.306 <.0001
## Reverse\nBias 0.856 0.0375 Inf 0.7658 0.915 0.5 5.860 <.0001
## Whole-Number\nBias 0.128 0.0366 Inf 0.0718 0.218 0.5 -5.850 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the logit scale
## Tests are performed on the logit scale
##
## $contrasts
## condicion = CO:
## contrast odds.ratio SE df asymp.LCL
## High\nPerforming / Reverse\nBias 18.7992 6.26070 Inf 9.7873
## High\nPerforming / (Whole-Number\nBias) 0.4058 0.13671 Inf 0.2097
## Reverse\nBias / (Whole-Number\nBias) 0.0216 0.00915 Inf 0.0094
## asymp.UCL null z.ratio p.value
## 36.1090 1 8.809 <.0001
## 0.7854 1 -2.677 0.0074
## 0.0495 1 -9.048 <.0001
##
## condicion = IC:
## contrast odds.ratio SE df asymp.LCL
## High\nPerforming / Reverse\nBias 2.3318 0.83956 Inf 1.1514
## High\nPerforming / (Whole-Number\nBias) 94.0343 36.84021 Inf 43.6323
## Reverse\nBias / (Whole-Number\nBias) 40.3268 17.80632 Inf 16.9725
## asymp.UCL null z.ratio p.value
## 4.7224 1 2.351 0.0187
## 202.6586 1 11.598 <.0001
## 95.8169 1 8.373 <.0001
##
## Confidence level used: 0.95
## Intervals are back-transformed from the log odds ratio scale
## Tests are performed on the log odds ratio scale
em=emtrends(modelo_distancia_abs_wcc_cluster, pairwise ~ cluster, mult.name = "cluster",var="distancia_absz")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## cluster distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 0.821 0.130 Inf 0.568 1.075 6.342
## Reverse\nBias 0.111 0.138 Inf -0.160 0.383 0.802
## Whole-Number\nBias 0.161 0.150 Inf -0.132 0.454 1.078
## p.value
## <.0001
## 0.4223
## 0.2809
##
## Results are averaged over the levels of: condicion
## Confidence level used: 0.95
##
## $contrasts
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 0.7102 0.166 Inf 0.385 1.036
## High\nPerforming - (Whole-Number\nBias) 0.6601 0.177 Inf 0.314 1.006
## Reverse\nBias - (Whole-Number\nBias) -0.0502 0.183 Inf -0.408 0.308
## z.ratio p.value
## 4.277 <.0001
## 3.738 0.0002
## -0.274 0.7837
##
## Results are averaged over the levels of: condicion
## Confidence level used: 0.95
em=emtrends(modelo_distancia_abs_wcc_cluster, pairwise ~ condicion, mult.name = "condicion",var="distancia_absz")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.209 0.101 Inf 0.011 0.408 2.069 0.0385
## IC 0.520 0.163 Inf 0.200 0.839 3.190 0.0014
##
## Results are averaged over the levels of: cluster
## Confidence level used: 0.95
##
## $contrasts
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.31 0.192 Inf -0.686 0.0657 -1.617 0.1058
##
## Results are averaged over the levels of: cluster
## Confidence level used: 0.95
em=emtrends(modelo_distancia_abs_wcc_cluster, pairwise ~ cluster|condicion, mult.name = "cluster",var="distancia_absz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion = CO:
## cluster distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 0.5118 0.121 Inf 0.275 0.748 4.238
## Reverse\nBias 0.0863 0.155 Inf -0.218 0.391 0.556
## Whole-Number\nBias 0.0304 0.156 Inf -0.276 0.337 0.194
## p.value
## <.0001
## 0.5785
## 0.8461
##
## condicion = IC:
## cluster distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 1.1309 0.229 Inf 0.682 1.579 4.942
## Reverse\nBias 0.1359 0.229 Inf -0.313 0.585 0.593
## Whole-Number\nBias 0.2922 0.255 Inf -0.207 0.792 1.146
## p.value
## <.0001
## 0.5533
## 0.2517
##
## Confidence level used: 0.95
##
## $contrasts
## condicion = CO:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 0.4255 0.170 Inf 0.0915 0.759
## High\nPerforming - (Whole-Number\nBias) 0.4814 0.171 Inf 0.1455 0.817
## Reverse\nBias - (Whole-Number\nBias) 0.0559 0.197 Inf -0.3309 0.443
## z.ratio p.value
## 2.497 0.0125
## 2.809 0.0050
## 0.283 0.7769
##
## condicion = IC:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 0.9950 0.285 Inf 0.4367 1.553
## High\nPerforming - (Whole-Number\nBias) 0.8387 0.308 Inf 0.2341 1.443
## Reverse\nBias - (Whole-Number\nBias) -0.1562 0.308 Inf -0.7592 0.447
## z.ratio p.value
## 3.493 0.0005
## 2.719 0.0065
## -0.508 0.6115
##
## Confidence level used: 0.95
em=emtrends(modelo_distancia_abs_wcc_cluster, pairwise ~ condicion|cluster, mult.name = "condicion",var="distancia_absz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## cluster = High
## Performing:
## condicion distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.5118 0.121 Inf 0.275 0.748 4.238 <.0001
## IC 1.1309 0.229 Inf 0.682 1.579 4.942 <.0001
##
## cluster = Reverse
## Bias:
## condicion distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.0863 0.155 Inf -0.218 0.391 0.556 0.5785
## IC 0.1359 0.229 Inf -0.313 0.585 0.593 0.5533
##
## cluster = Whole-Number
## Bias:
## condicion distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.0304 0.156 Inf -0.276 0.337 0.194 0.8461
## IC 0.2922 0.255 Inf -0.207 0.792 1.146 0.2517
##
## Confidence level used: 0.95
##
## $contrasts
## cluster = High
## Performing:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.6191 0.258 Inf -1.126 -0.113 -2.395 0.0166
##
## cluster = Reverse
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.0496 0.277 Inf -0.592 0.493 -0.179 0.8578
##
## cluster = Whole-Number
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.2618 0.299 Inf -0.848 0.324 -0.875 0.3814
##
## Confidence level used: 0.95
# dataset_cluster_wcc_1 = subset(dataset_cluster_wcc, cluster==3)
# dataset_cluster_wcc_1 = subset(dataset_cluster_wcc_1, condicion == "IC")
# modelo_distancia_abs_wcc_cluster1 <- lmer(rt ~ distancia_denz + distancia_absz +
# + (1|participant), data = dataset_cluster_wcc_1, control = lmerControl(optimizer = "bobyqa"))
# summary(modelo_distancia_abs_wcc_cluster1)
grafica_absz$facet = factor(grafica_absz$facet, levels=c("Whole-Number\nBias",
"Reverse\nBias", "High\nPerforming"))
grafica_absz$title = "Fraction Distance"
graph_dist_absz_cluster = ggplot(grafica_absz, aes(x = (x*sd(dataset_cluster$distancia_abs) +mean(dataset_cluster$distancia_abs)), y = predicted, colour = as.factor(group))) +
geom_hline(yintercept = .5, linetype = "dashed")+
scale_fill_manual(values = c("#000000","#228B22"))+
scale_color_manual(values = c("#000000","#228B22"))+
geom_ribbon(aes(ymin = conf.low, ymax = conf.high, fill = group),
alpha = .25, color = NA)+
geom_line() +
scale_y_continuous(breaks = seq(0,1,.25), limits = c(0,1.1))+
scale_x_continuous(breaks = seq(0,.5,.1), limits = c(0,0.55))+
theme_bw()+
ylab("Predicted (Accuracy)")+
xlab("Fraction Distance")+
facet_grid(title~facet)+
theme(legend.position="none",
axis.title.x = element_text(size=size_text),
axis.text.x = element_text(size=10),
#axis.title.x = element_blank(),
panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "white", colour = "grey50"),
strip.background =element_rect(fill="#f0f0f0"),
strip.text = element_text(size = size_text),
axis.text.y = element_text(size=size_text),
axis.title.y = element_text(size=size_text),
legend.text=element_text(size=size_text))
#graph_dist_absz_cluster
modelo_distancia_numz_wcc_cluster <- glmer(accuracy ~ cluster * condicion * distancia_numz
+ (1+condicion|participant) + (1|estimulo), data = dataset_cluster_wcc, family = binomial, control = glmerControl(optimizer = "bobyqa"))
summary(modelo_distancia_numz_wcc_cluster)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ cluster * condicion * distancia_numz + (1 + condicion |
## participant) + (1 | estimulo)
## Data: dataset_cluster_wcc
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 2446.2 2540.8 -1207.1 2414.2 2706
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.2940 -0.3163 0.2687 0.4620 4.5008
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.8605 0.9276
## condicionIC 3.1420 1.7726 -0.92
## estimulo (Intercept) 0.2344 0.4841
## Number of obs: 2722, groups: participant, 76; estimulo, 36
##
## Fixed effects:
## Estimate Std. Error
## (Intercept) -0.5456 0.4807
## clusterReverse\nBias -0.9755 0.6664
## clusterWhole-Number\nBias 2.4335 0.6409
## condicionIC 3.0596 0.5692
## distancia_numz 1.2778 0.3950
## clusterReverse\nBias:condicionIC 0.3371 0.8277
## clusterWhole-Number\nBias:condicionIC -6.9529 0.8290
## clusterReverse\nBias:distancia_numz -1.7684 0.5318
## clusterWhole-Number\nBias:distancia_numz -1.3098 0.4843
## condicionIC:distancia_numz -1.1087 0.4813
## clusterReverse\nBias:condicionIC:distancia_numz 1.7886 0.6224
## clusterWhole-Number\nBias:condicionIC:distancia_numz 0.9097 0.5917
## z value Pr(>|z|)
## (Intercept) -1.135 0.256402
## clusterReverse\nBias -1.464 0.143210
## clusterWhole-Number\nBias 3.797 0.000147 ***
## condicionIC 5.375 7.66e-08 ***
## distancia_numz 3.235 0.001215 **
## clusterReverse\nBias:condicionIC 0.407 0.683799
## clusterWhole-Number\nBias:condicionIC -8.387 < 2e-16 ***
## clusterReverse\nBias:distancia_numz -3.325 0.000884 ***
## clusterWhole-Number\nBias:distancia_numz -2.704 0.006846 **
## condicionIC:distancia_numz -2.304 0.021233 *
## clusterReverse\nBias:condicionIC:distancia_numz 2.874 0.004057 **
## clusterWhole-Number\nBias:condicionIC:distancia_numz 1.537 0.124194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) clstRB clW-NB cndcIC dstnc_ clRB:IC clW-NB:IC clRB:_ cW-NB:_
## clstrRvrsBs -0.318
## clstrWhl-NB -0.336 0.225
## condicionIC -0.900 0.309 0.325
## distanc_nmz -0.907 0.260 0.282 0.766
## clstrRBs:IC 0.294 -0.901 -0.210 -0.375 -0.210
## clstW-NB:IC 0.298 -0.202 -0.880 -0.389 -0.218 0.247
## clstrRBs:d_ 0.270 -0.861 -0.205 -0.228 -0.308 0.693 0.158
## clstrW-NB:_ 0.304 -0.209 -0.846 -0.257 -0.346 0.169 0.654 0.248
## cndcnIC:ds_ 0.745 -0.214 -0.232 -0.540 -0.821 0.137 0.139 0.253 0.284
## clstRB:IC:_ -0.231 0.736 0.175 0.155 0.263 -0.526 -0.107 -0.854 -0.212
## clW-NB:IC:_ -0.249 0.172 0.692 0.164 0.283 -0.109 -0.452 -0.203 -0.819
## cnIC:_ cRB:IC:
## clstrRvrsBs
## clstrWhl-NB
## condicionIC
## distanc_nmz
## clstrRBs:IC
## clstW-NB:IC
## clstrRBs:d_
## clstrW-NB:_
## cndcnIC:ds_
## clstRB:IC:_ -0.359
## clW-NB:IC:_ -0.389 0.291
Anova(modelo_distancia_numz_wcc_cluster, type =3)
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: accuracy
## Chisq Df Pr(>Chisq)
## (Intercept) 1.2881 1 0.2564022
## cluster 20.0811 2 4.359e-05 ***
## condicion 28.8894 1 7.663e-08 ***
## distancia_numz 10.4679 1 0.0012147 **
## cluster:condicion 76.8946 2 < 2.2e-16 ***
## cluster:distancia_numz 14.8153 2 0.0006066 ***
## condicion:distancia_numz 5.3076 1 0.0212328 *
## cluster:condicion:distancia_numz 8.7959 2 0.0123026 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_nakagawa(modelo_distancia_numz_wcc_cluster)
## # R2 for Mixed Models
##
## Conditional R2: 0.550
## Marginal R2: 0.391
grafica_numz= ggpredict(modelo_distancia_numz_wcc_cluster, terms=list("distancia_numz [-1:3]","condicion","cluster"))
#plot(grafica_numz)
em=emtrends(modelo_distancia_numz_wcc_cluster, pairwise ~ cluster|condicion, mult.name = "cluster",var="distancia_numz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion = CO:
## cluster distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 1.2778 0.395 Inf 0.504 2.052 3.235
## Reverse\nBias -0.4906 0.556 Inf -1.581 0.600 -0.882
## Whole-Number\nBias -0.0319 0.508 Inf -1.028 0.964 -0.063
## p.value
## 0.0012
## 0.3778
## 0.9499
##
## condicion = IC:
## cluster distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 0.1691 0.275 Inf -0.370 0.708 0.615
## Reverse\nBias 0.1893 0.307 Inf -0.413 0.791 0.616
## Whole-Number\nBias -0.2310 0.319 Inf -0.856 0.395 -0.724
## p.value
## 0.5384
## 0.5377
## 0.4692
##
## Confidence level used: 0.95
##
## $contrasts
## condicion = CO:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 1.7684 0.532 Inf 0.726 2.811
## High\nPerforming - (Whole-Number\nBias) 1.3098 0.484 Inf 0.360 2.259
## Reverse\nBias - (Whole-Number\nBias) -0.4586 0.624 Inf -1.682 0.764
## z.ratio p.value
## 3.325 0.0009
## 2.704 0.0068
## -0.735 0.4624
##
## condicion = IC:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias -0.0202 0.323 Inf -0.654 0.614
## High\nPerforming - (Whole-Number\nBias) 0.4000 0.340 Inf -0.266 1.066
## Reverse\nBias - (Whole-Number\nBias) 0.4203 0.366 Inf -0.297 1.137
## z.ratio p.value
## -0.063 0.9501
## 1.177 0.2391
## 1.149 0.2505
##
## Confidence level used: 0.95
em=emtrends(modelo_distancia_numz_wcc_cluster, pairwise ~ condicion|cluster, mult.name = "condicion",var="distancia_numz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## cluster = High
## Performing:
## condicion distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 1.2778 0.395 Inf 0.504 2.052 3.235 0.0012
## IC 0.1691 0.275 Inf -0.370 0.708 0.615 0.5384
##
## cluster = Reverse
## Bias:
## condicion distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO -0.4906 0.556 Inf -1.581 0.600 -0.882 0.3778
## IC 0.1893 0.307 Inf -0.413 0.791 0.616 0.5377
##
## cluster = Whole-Number
## Bias:
## condicion distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO -0.0319 0.508 Inf -1.028 0.964 -0.063 0.9499
## IC -0.2310 0.319 Inf -0.856 0.395 -0.724 0.4692
##
## Confidence level used: 0.95
##
## $contrasts
## cluster = High
## Performing:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC 1.109 0.481 Inf 0.165 2.052 2.304 0.0212
##
## cluster = Reverse
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.680 0.636 Inf -1.926 0.566 -1.070 0.2847
##
## cluster = Whole-Number
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC 0.199 0.600 Inf -0.977 1.375 0.332 0.7402
##
## Confidence level used: 0.95
em=emtrends(modelo_distancia_numz_wcc_cluster, pairwise ~ cluster, mult.name = "cluster",var="distancia_numz")
## NOTE: Results may be misleading due to involvement in interactions
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## cluster distancia_numz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 0.723 0.241 Inf 0.252 1.195 3.008
## Reverse\nBias -0.151 0.318 Inf -0.773 0.472 -0.474
## Whole-Number\nBias -0.131 0.300 Inf -0.720 0.457 -0.438
## p.value
## 0.0026
## 0.6354
## 0.6614
##
## Results are averaged over the levels of: condicion
## Confidence level used: 0.95
##
## $contrasts
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 0.8741 0.311 Inf 0.264 1.48
## High\nPerforming - (Whole-Number\nBias) 0.8549 0.296 Inf 0.275 1.43
## Reverse\nBias - (Whole-Number\nBias) -0.0192 0.362 Inf -0.728 0.69
## z.ratio p.value
## 2.809 0.0050
## 2.890 0.0038
## -0.053 0.9577
##
## Results are averaged over the levels of: condicion
## Confidence level used: 0.95
grafica_numz_cluster = ggpredict(modelo_distancia_numz_wcc_cluster, terms=c("distancia_numz [-1:3]","condicion","cluster"))
grafica_numz_cluster$facet = factor(grafica_numz_cluster$facet, levels=c("Whole-Number\nBias",
"Reverse\nBias", "High\nPerforming"))
grafica_numz_cluster$title = "Numerator Distance"
graph_dist_numz_cluster = ggplot(grafica_numz_cluster, aes(x = ((x*sd(dataset$distancia_num)) + mean(dataset$distancia_num)), y = predicted, colour = group)) +
geom_hline(yintercept = .5, linetype = "dashed")+
scale_fill_manual(values = c("#000000","#228B22"))+
scale_color_manual(values = c("#000000","#228B22"))+
geom_ribbon(aes(ymin = conf.low, ymax = conf.high, fill = group),
alpha = .15, color = NA)+
geom_line() +
scale_y_continuous(breaks = seq(0,1,.25), limits = c(0,1.1))+
theme_bw()+
ylab("Predicted (Accuracy)")+
xlab("Numerator Distance")+
facet_grid(title~facet)+
theme(legend.position="none",
axis.title.x = element_text(size=size_text),
axis.text.x = element_text(size=size_text),
#axis.title.x = element_blank(),
panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "white", colour = "grey50"),
strip.background =element_rect(fill="#f0f0f0"),
strip.text = element_text(size = size_text),
axis.text.y = element_text(size=size_text),
axis.title.y = element_text(size=size_text),
legend.text=element_text(size=size_text))+
scale_x_continuous(breaks = seq(0,15,5), limits = c(0,16))
modelo_distancia_denz_wcc_cluster <- glmer(accuracy ~
+ cluster * condicion * distancia_denz
+ (1+condicion|participant) + (1|estimulo), data = dataset_cluster_wcc, family = binomial, control = glmerControl(optimizer = "bobyqa"))
summary(modelo_distancia_denz_wcc_cluster)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ +cluster * condicion * distancia_denz + (1 + condicion |
## participant) + (1 | estimulo)
## Data: dataset_cluster_wcc
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 2448.8 2543.3 -1208.4 2416.8 2706
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.2617 -0.3138 0.2615 0.4695 4.8617
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## participant (Intercept) 0.8531 0.9236
## condicionIC 3.1342 1.7704 -0.92
## estimulo (Intercept) 0.2396 0.4895
## Number of obs: 2722, groups: participant, 76; estimulo, 36
##
## Fixed effects:
## Estimate Std. Error
## (Intercept) 0.8295 0.2032
## clusterReverse\nBias -2.9006 0.3387
## clusterWhole-Number\nBias 1.0371 0.3424
## condicionIC 1.0757 0.4845
## distancia_denz -0.9463 0.3197
## clusterReverse\nBias:condicionIC 3.0524 0.7047
## clusterWhole-Number\nBias:condicionIC -4.8906 0.7336
## clusterReverse\nBias:distancia_denz 0.8711 0.3940
## clusterWhole-Number\nBias:distancia_denz 1.1227 0.4181
## condicionIC:distancia_denz 1.7642 0.5846
## clusterReverse\nBias:condicionIC:distancia_denz -2.0165 0.6828
## clusterWhole-Number\nBias:condicionIC:distancia_denz -1.9208 0.7176
## z value Pr(>|z|)
## (Intercept) 4.081 4.48e-05 ***
## clusterReverse\nBias -8.565 < 2e-16 ***
## clusterWhole-Number\nBias 3.029 0.00245 **
## condicionIC 2.220 0.02639 *
## distancia_denz -2.960 0.00308 **
## clusterReverse\nBias:condicionIC 4.331 1.48e-05 ***
## clusterWhole-Number\nBias:condicionIC -6.666 2.63e-11 ***
## clusterReverse\nBias:distancia_denz 2.211 0.02705 *
## clusterWhole-Number\nBias:distancia_denz 2.685 0.00725 **
## condicionIC:distancia_denz 3.018 0.00254 **
## clusterReverse\nBias:condicionIC:distancia_denz -2.954 0.00314 **
## clusterWhole-Number\nBias:condicionIC:distancia_denz -2.677 0.00743 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) clstRB clW-NB cndcIC dstnc_ clRB:IC clW-NB:IC clRB:_ cW-NB:_
## clstrRvrsBs -0.415
## clstrWhl-NB -0.387 0.192
## condicionIC -0.574 0.269 0.252
## distanc_dnz 0.062 0.010 -0.008 -0.027
## clstrRBs:IC 0.306 -0.704 -0.155 -0.461 -0.005
## clstW-NB:IC 0.282 -0.153 -0.693 -0.449 0.004 0.288
## clstrRBs:d_ 0.002 0.054 0.005 0.000 -0.308 -0.026 -0.003
## clstrW-NB:_ 0.002 -0.011 0.090 0.000 -0.284 0.005 -0.043 0.231
## cndcnIC:ds_ -0.033 -0.007 0.004 -0.552 -0.548 0.227 0.210 0.169 0.156
## clstRB:IC:_ -0.002 -0.029 -0.003 0.276 0.179 -0.436 -0.178 -0.578 -0.134
## clW-NB:IC:_ -0.002 0.008 -0.053 0.266 0.166 -0.186 -0.416 -0.135 -0.583
## cnIC:_ cRB:IC:
## clstrRvrsBs
## clstrWhl-NB
## condicionIC
## distanc_dnz
## clstrRBs:IC
## clstW-NB:IC
## clstrRBs:d_
## clstrW-NB:_
## cndcnIC:ds_
## clstRB:IC:_ -0.457
## clW-NB:IC:_ -0.435 0.371
Anova(modelo_distancia_denz_wcc_cluster, type =3)
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Warning in printHypothesis(L, rhs, names(b)): one or more coefficients in the hypothesis include
## arithmetic operators in their names;
## the printed representation of the hypothesis will be omitted
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: accuracy
## Chisq Df Pr(>Chisq)
## (Intercept) 16.6575 1 4.477e-05 ***
## cluster 96.0340 2 < 2.2e-16 ***
## condicion 4.9300 1 0.026394 *
## distancia_denz 8.7587 1 0.003081 **
## cluster:condicion 86.9987 2 < 2.2e-16 ***
## cluster:distancia_denz 9.8803 2 0.007154 **
## condicion:distancia_denz 9.1080 1 0.002545 **
## cluster:condicion:distancia_denz 11.6215 2 0.002995 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_nakagawa(modelo_distancia_denz_wcc_cluster)
## # R2 for Mixed Models
##
## Conditional R2: 0.551
## Marginal R2: 0.392
tab_model(modelo_distancia_denz_wcc_cluster)
| accuracy | |||
|---|---|---|---|
| Predictors | Odds Ratios | CI | p |
| (Intercept) | 2.29 | 1.54 – 3.41 | <0.001 |
| cluster [Reverse Bias] | 0.05 | 0.03 – 0.11 | <0.001 |
|
cluster [Whole-Number Bias] |
2.82 | 1.44 – 5.52 | 0.002 |
| condicion [IC] | 2.93 | 1.13 – 7.58 | 0.026 |
| distancia denz | 0.39 | 0.21 – 0.73 | 0.003 |
|
cluster [Reverse Bias] × condicion [IC] |
21.17 | 5.32 – 84.24 | <0.001 |
|
cluster [Whole-Number Bias] × condicion [IC] |
0.01 | 0.00 – 0.03 | <0.001 |
|
cluster [Reverse Bias] × distancia denz |
2.39 | 1.10 – 5.17 | 0.027 |
|
cluster [Whole-Number Bias] × distancia denz |
3.07 | 1.35 – 6.97 | 0.007 |
|
condicion [IC] × distancia denz |
5.84 | 1.86 – 18.36 | 0.003 |
|
(cluster [Reverse Bias] × condicion [IC]) × distancia denz |
0.13 | 0.03 – 0.51 | 0.003 |
|
(cluster [Whole-Number Bias] × condicion [IC]) × distancia denz |
0.15 | 0.04 – 0.60 | 0.007 |
| Random Effects | |||
| σ2 | 3.29 | ||
| τ00 participant | 0.85 | ||
| τ00 estimulo | 0.24 | ||
| τ11 participant.condicionIC | 3.13 | ||
| ρ01 participant | -0.92 | ||
| ICC | 0.26 | ||
| N participant | 76 | ||
| N estimulo | 36 | ||
| Observations | 2722 | ||
| Marginal R2 / Conditional R2 | 0.392 / 0.551 | ||
em=emtrends(modelo_distancia_denz_wcc_cluster, pairwise ~ cluster|condicion, mult.name = "cluster",var="distancia_denz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion = CO:
## cluster distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming -0.9463 0.320 Inf -1.573 -0.320 -2.960
## Reverse\nBias -0.0752 0.424 Inf -0.906 0.756 -0.177
## Whole-Number\nBias 0.1764 0.448 Inf -0.703 1.055 0.393
## p.value
## 0.0031
## 0.8593
## 0.6941
##
## condicion = IC:
## cluster distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio
## High\nPerforming 0.8179 0.489 Inf -0.141 1.776 1.672
## Reverse\nBias -0.3275 0.513 Inf -1.333 0.678 -0.638
## Whole-Number\nBias 0.0198 0.539 Inf -1.037 1.076 0.037
## p.value
## 0.0944
## 0.5234
## 0.9708
##
## Confidence level used: 0.95
##
## $contrasts
## condicion = CO:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias -0.871 0.394 Inf -1.6434 -0.0988
## High\nPerforming - (Whole-Number\nBias) -1.123 0.418 Inf -1.9421 -0.3032
## Reverse\nBias - (Whole-Number\nBias) -0.252 0.504 Inf -1.2391 0.7360
## z.ratio p.value
## -2.211 0.0270
## -2.685 0.0072
## -0.499 0.6176
##
## condicion = IC:
## contrast estimate SE df asymp.LCL asymp.UCL
## High\nPerforming - Reverse\nBias 1.145 0.557 Inf 0.0532 2.2376
## High\nPerforming - (Whole-Number\nBias) 0.798 0.583 Inf -0.3443 1.9405
## Reverse\nBias - (Whole-Number\nBias) -0.347 0.603 Inf -1.5292 0.8347
## z.ratio p.value
## 2.055 0.0398
## 1.369 0.1709
## -0.576 0.5647
##
## Confidence level used: 0.95
em=emtrends(modelo_distancia_denz_wcc_cluster, pairwise ~ condicion|cluster, mult.name = "condicion",var="distancia_denz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## cluster = High
## Performing:
## condicion distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO -0.9463 0.320 Inf -1.573 -0.320 -2.960 0.0031
## IC 0.8179 0.489 Inf -0.141 1.776 1.672 0.0944
##
## cluster = Reverse
## Bias:
## condicion distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO -0.0752 0.424 Inf -0.906 0.756 -0.177 0.8593
## IC -0.3275 0.513 Inf -1.333 0.678 -0.638 0.5234
##
## cluster = Whole-Number
## Bias:
## condicion distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.1764 0.448 Inf -0.703 1.055 0.393 0.6941
## IC 0.0198 0.539 Inf -1.037 1.076 0.037 0.9708
##
## Confidence level used: 0.95
##
## $contrasts
## cluster = High
## Performing:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -1.764 0.585 Inf -2.91 -0.618 -3.018 0.0025
##
## cluster = Reverse
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC 0.252 0.666 Inf -1.05 1.557 0.379 0.7046
##
## cluster = Whole-Number
## Bias:
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC 0.157 0.701 Inf -1.22 1.531 0.223 0.8233
##
## Confidence level used: 0.95
grafica_denz_clusters = ggpredict(modelo_distancia_denz_wcc_cluster, terms=c("distancia_denz [-1:2]","condicion","cluster"))
grafica_denz_clusters$facet = factor(grafica_denz_clusters$facet, levels=c("Whole-Number\nBias",
"Reverse\nBias", "High\nPerforming"))
grafica_denz_clusters$title = "Denominator Distance"
graph_dist_denz_cluster = ggplot(grafica_denz_clusters, aes(x = ((x*sd(dataset_cluster$distancia_den)) + mean(dataset_cluster$distancia_den)), y = predicted, colour = group)) +
geom_hline(yintercept = .5, linetype = "dashed")+
scale_fill_manual(values = c("#000000","#228B22"))+
scale_color_manual(values = c("#000000","#228B22"))+
geom_ribbon(aes(ymin = conf.low, ymax = conf.high, fill = group),
alpha = .15, color = NA)+
geom_line() +
scale_y_continuous(breaks = seq(0,1,.25), limits = c(0,1.1))+
#scale_x_continuous(breaks = seq(0,.5,.1), limits = c(0,0.55))+
theme_bw()+
facet_grid(title~facet)+
ylab("Predicted (Accuracy)")+
xlab("Denominator Distance")+
# scale_x_discrete(labels=c("-1" = "0.12","0" = "0.20", "1" = "0.28","2" = "0.36","3" = "0.44",
# "4" = "0.52"))+
theme(legend.position="none",
axis.title.x = element_text(size=size_text),
axis.text.x = element_text(size=size_text),
#axis.title.x = element_blank(),
panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "white", colour = "grey50"),
strip.background =element_rect(fill="#f0f0f0"),
strip.text = element_text(size = size_text),
axis.text.y = element_text(size=size_text),
axis.title.y = element_text(size=size_text),
legend.text=element_text(size=size_text))+
scale_x_continuous(breaks = seq(0,20,5), limits = c(0,21))
ggarrange(graph_dist_absz_cluster,graph_dist_numz_cluster,graph_dist_denz_cluster, ncol = 1, nrow = 3, labels = c("A.", "B.", "C."))
Figure 7. Rational and componential distance effects of fraction comparison strategy profiles for distances in the Distinct Component block. A. Rational distance effects. Biased students (Whole-Number Bias and Reverse Bias profiles) did not show rational distance modulation. Only students with normative, high performance showed rational distance modulation. B. and C. Denominator and numerator distance effects. Surprisingly, only high-performing students showed componential effects; however, when controlling for componential distances, high-performing students had robust fraction distance modulation (not shown). Notes. Lines represent the fitted lines from the corresponding generalized linear mixed effect models (Table 5), and shaded areas represent 95% confidence intervals. Notes. †p < .10, p <.05, p <.01, p <.001.
dataset_cluster_wcc_cluster4 = subset(dataset_cluster_wcc, cluster =="High\nPerforming")
modelo_distancia_abs_wcc_cluster_4_mod1 <- glmer(accuracy ~ condicion * distancia_absz
+ (1|participant)+ (1|estimulo), data = dataset_cluster_wcc_cluster4, family = binomial, control = glmerControl(optimizer = "bobyqa"))
summary(modelo_distancia_abs_wcc_cluster_4_mod1)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ condicion * distancia_absz + (1 | participant) + (1 |
## estimulo)
## Data: dataset_cluster_wcc_cluster4
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 1330.9 1362.8 -659.4 1318.9 1500
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -6.9662 0.1405 0.2995 0.4789 1.4028
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 0.08357 0.2891
## estimulo (Intercept) 0.48722 0.6980
## Number of obs: 1506, groups: participant, 42; estimulo, 36
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.9234 0.1938 4.766 1.88e-06 ***
## condicionIC 1.6391 0.2920 5.613 1.98e-08 ***
## distancia_absz 0.4716 0.1706 2.763 0.00572 **
## condicionIC:distancia_absz 0.6403 0.3542 1.808 0.07062 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndcIC dstnc_
## condicionIC -0.612
## distanc_bsz 0.081 -0.047
## cndcnIC:ds_ -0.033 0.172 -0.480
Anova(modelo_distancia_abs_wcc_cluster_4_mod1, type =3)
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: accuracy
## Chisq Df Pr(>Chisq)
## (Intercept) 22.7131 1 1.881e-06 ***
## condicion 31.5093 1 1.985e-08 ***
## distancia_absz 7.6369 1 0.005719 **
## condicion:distancia_absz 3.2685 1 0.070624 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_nakagawa(modelo_distancia_abs_wcc_cluster_4_mod1)
## # R2 for Mixed Models
##
## Conditional R2: 0.348
## Marginal R2: 0.234
modelo_distancia_abs_wcc_cluster_4_mod4 <- glmer(accuracy ~ condicion * distancia_absz
+ condicion * distancia_numz
+ condicion * distancia_denz
+ (1|participant)+ (1|estimulo), data = dataset_cluster_wcc_cluster4, family = binomial, control = glmerControl(optimizer = "bobyqa"))
#ibrary(sjPlot)
summary(modelo_distancia_abs_wcc_cluster_4_mod4)
## Generalized linear mixed model fit by maximum likelihood (Laplace
## Approximation) [glmerMod]
## Family: binomial ( logit )
## Formula: accuracy ~ condicion * distancia_absz + condicion * distancia_numz +
## condicion * distancia_denz + (1 | participant) + (1 | estimulo)
## Data: dataset_cluster_wcc_cluster4
## Control: glmerControl(optimizer = "bobyqa")
##
## AIC BIC logLik deviance df.resid
## 1332.2 1385.3 -656.1 1312.2 1496
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -6.7837 0.1273 0.3061 0.4813 1.3771
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 0.08371 0.2893
## estimulo (Intercept) 0.37046 0.6087
## Number of obs: 1506, groups: participant, 42; estimulo, 36
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.07663 0.56397 -0.136 0.89192
## condicionIC 2.20414 0.81650 2.699 0.00694 **
## distancia_absz 0.29131 0.17330 1.681 0.09276 .
## distancia_numz 0.84866 0.47807 1.775 0.07587 .
## distancia_denz -0.58084 0.41809 -1.389 0.16475
## condicionIC:distancia_absz 0.79402 0.34084 2.330 0.01983 *
## condicionIC:distancia_numz -0.70576 0.63598 -1.110 0.26712
## condicionIC:distancia_denz 1.26361 0.81850 1.544 0.12263
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cndcIC dstnc_b dstnc_n dstnc_d cndcnIC:dstnc_b
## condicionIC -0.686
## distanc_bsz 0.262 -0.180
## distanc_nmz -0.949 0.656 -0.234
## distanc_dnz -0.005 0.003 0.382 0.044
## cndcnIC:dstnc_b -0.130 0.218 -0.507 0.117 -0.196
## cndcnIC:dstnc_n 0.717 -0.193 0.177 -0.754 -0.035 -0.016
## cndcnIC:dstnc_d 0.009 -0.566 -0.193 -0.027 -0.515 0.028
## cndcnIC:dstnc_n
## condicionIC
## distanc_bsz
## distanc_nmz
## distanc_dnz
## cndcnIC:dstnc_b
## cndcnIC:dstnc_n
## cndcnIC:dstnc_d -0.242
Anova(modelo_distancia_abs_wcc_cluster_4_mod4, type =3)
## Analysis of Deviance Table (Type III Wald chisquare tests)
##
## Response: accuracy
## Chisq Df Pr(>Chisq)
## (Intercept) 0.0185 1 0.891917
## condicion 7.2872 1 0.006945 **
## distancia_absz 2.8258 1 0.092761 .
## distancia_numz 3.1512 1 0.075872 .
## distancia_denz 1.9301 1 0.164747
## condicion:distancia_absz 5.4270 1 0.019828 *
## condicion:distancia_numz 1.2315 1 0.267120
## condicion:distancia_denz 2.3834 1 0.122633
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
r2_nakagawa(modelo_distancia_abs_wcc_cluster_4_mod4)
## # R2 for Mixed Models
##
## Conditional R2: 0.353
## Marginal R2: 0.264
anova(modelo_distancia_abs_wcc_cluster_4_mod4,modelo_distancia_abs_wcc_cluster_4_mod1)
## Data: dataset_cluster_wcc_cluster4
## Models:
## modelo_distancia_abs_wcc_cluster_4_mod1: accuracy ~ condicion * distancia_absz + (1 | participant) + (1 | estimulo)
## modelo_distancia_abs_wcc_cluster_4_mod4: accuracy ~ condicion * distancia_absz + condicion * distancia_numz + condicion * distancia_denz + (1 | participant) + (1 | estimulo)
## npar AIC BIC logLik deviance
## modelo_distancia_abs_wcc_cluster_4_mod1 6 1330.9 1362.8 -659.43 1318.9
## modelo_distancia_abs_wcc_cluster_4_mod4 10 1332.2 1385.3 -656.08 1312.2
## Chisq Df Pr(>Chisq)
## modelo_distancia_abs_wcc_cluster_4_mod1
## modelo_distancia_abs_wcc_cluster_4_mod4 6.704 4 0.1524
em=emtrends(modelo_distancia_abs_wcc_cluster_4_mod1, pairwise ~ condicion, mult.name = "condicion",var="distancia_absz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion distancia_absz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO 0.472 0.171 Inf 0.137 0.806 2.763 0.0057
## IC 1.112 0.311 Inf 0.503 1.721 3.578 0.0003
##
## Confidence level used: 0.95
##
## $contrasts
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -0.64 0.354 Inf -1.33 0.0539 -1.808 0.0706
##
## Confidence level used: 0.95
em=emtrends(modelo_distancia_abs_wcc_cluster_4_mod4, pairwise ~ condicion, mult.name = "condicion",var="distancia_denz")
summary(em, infer=c(TRUE,TRUE), null=0, type = "response", adjust = "none")
## $emtrends
## condicion distancia_denz.trend SE df asymp.LCL asymp.UCL z.ratio p.value
## CO -0.581 0.418 Inf -1.400 0.239 -1.389 0.1647
## IC 0.683 0.702 Inf -0.693 2.058 0.973 0.3306
##
## Confidence level used: 0.95
##
## $contrasts
## contrast estimate SE df asymp.LCL asymp.UCL z.ratio p.value
## CO - IC -1.26 0.818 Inf -2.87 0.341 -1.544 0.1226
##
## Confidence level used: 0.95