File: Analyses.R

Comment: Hypothesis 1.1 Hypothesis 1 was tested via pairedsample t.tests (alphas need to be Bonferronicorrected) Examples for conscientious goal classes (first two rows of Table 1 Conscientious Goals). Remaining tests are simialr
Category: Statistical Test
Code:
t.test(x = dt1$CP_Class_01, y = dt1$CN_Class_01, paired = TRUE, alternative = "greater") t.test(x = dt1$CP_Class_02, y = dt1$CN_Class_02, paired = TRUE, alternative = "greater")

Comment: Hypothesis 1.2 Hypothesis 1.2 was tested via partiallyoverlapping samples ttests. We report the analyses for the first panel of Table S2 (and for pvalues reported in Table 2). The remaining analyses are identical, but were performed on other goal classes
Category: Statistical Test
Code:
Partover.test(dt1$CP_Class_01, dt1$HP_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$EP_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$XP_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$AP_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$OP_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$HN_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$EN_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$XN_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$AN_Class_01, stacked = TRUE, alternative = "greater") Partover.test(dt1$CP_Class_01, dt1$ON_Class_01, stacked = TRUE, alternative = "greater")

Comment: Examples of Tobit regressions of the subjective importance of specific goals on HEXACO traits (first two lines of Table 3). Pvalues need to be corrected using the Bonferroni method, considering that we performed 21 multiple regressions (multiply them by 21 and round values larger than 1 to 1)
Category: Statistical Modeling
Code:
predictors <- select(dt2, HEXACO_H:HEXACO_O) %>% scale() fit1 <- censReg(dt2$G_C_01_DimostrareQlcQln_Importance ~ predictors, left = 1, right = 9) summary(fit1) fit2 <- censReg(dt2$G_C_02_EssereDegnoFiducia_Importance ~ predictors, left = 1, right = 9) summary(fit2)

Comment: Hierarchical regression predicting the willingness to change conscientiousness according to CBFI (Table 4). For ease of formatting, I used the R package AutoModel
Category: Statistical Modeling
Code:
Data4HierarchicalReg <- select(dt2, CBFI_C, POS, HEXACO_H:HEXACO_O, BFI2_O:BFI2_N, Importance_GC, Importance_GU) %>% scale() %>% data.frame() Data4HierarchicalReg$BFTGI_C_bin <- as.numeric(dt2$BFTGI_C == 3)

Comment: Hypothesis 3.2 multiple regressions predicting each goal class from HEXACO traits (we report examples reproducing the first two rows of Table 8, the code for the others is similar, save for the goal class). Pvalues need to be corrected using the Bonferroni method, considering 9 multiple regressions (multiply them by 9 and transform values > 1 to 1)
Category: Statistical Modeling
Code:
lm(G08Rules ~ ., data = select(dt3, G08Rules, HEXACO_H:HEXACO_O)) %>% lm.beta %>% summary lm(G10Control ~ ., data = select(dt3, G10Control, HEXACO_H:HEXACO_O)) %>% lm.beta %>% summary