This codebook includes only quantitative scales. Qualitative responses collected for the following scales are not included here:
In addition, the following demographic data were collected but not shown here:
# list of loaded packages and versions
si <- devtools::session_info()[[2]]
rownames(si) <- NULL
si %>%
select(package, loadedversion, date, source) %>%
#red bold the called packages
mutate(package =
cell_spec(package,
color = ifelse(package %in% libraries, "red", "black"),
bold = ifelse(package %in% libraries, TRUE, FALSE))) %>%
knitr::kable(escape = F, caption = "All loaded packages.
Bolded in red are those loaded explicitly with
<code>library()</code>") %>%
kable_styling() %>%
scroll_box(height = "300px")
| package | loadedversion | date | source |
|---|---|---|---|
| assertthat | 0.2.1 | 2019-03-21 | CRAN (R 4.2.0) |
| brio | 1.1.3 | 2021-11-30 | CRAN (R 4.2.0) |
| bslib | 0.3.1 | 2021-10-06 | CRAN (R 4.2.0) |
| cachem | 1.0.6 | 2021-08-19 | CRAN (R 4.2.0) |
| callr | 3.7.2 | 2022-08-22 | CRAN (R 4.2.0) |
| cellranger | 1.1.0 | 2016-07-27 | CRAN (R 4.2.0) |
| cli | 3.4.1 | 2022-09-23 | CRAN (R 4.2.0) |
| colorspace | 2.0-3 | 2022-02-21 | CRAN (R 4.2.0) |
| crayon | 1.5.2 | 2022-09-29 | CRAN (R 4.2.0) |
| curl | 4.3.3 | 2022-10-06 | CRAN (R 4.2.0) |
| data.table | 1.14.2 | 2021-09-27 | CRAN (R 4.2.0) |
| DBI | 1.1.2 | 2021-12-20 | CRAN (R 4.2.0) |
| desc | 1.4.2 | 2022-09-08 | CRAN (R 4.2.0) |
| devtools | 2.4.3 | 2021-11-30 | CRAN (R 4.2.0) |
| digest | 0.6.29 | 2021-12-01 | CRAN (R 4.2.0) |
| dplyr | 1.0.10 | 2022-09-01 | CRAN (R 4.2.0) |
| ellipsis | 0.3.2 | 2021-04-29 | CRAN (R 4.2.0) |
| evaluate | 0.17 | 2022-10-07 | CRAN (R 4.2.0) |
| fansi | 1.0.3 | 2022-03-24 | CRAN (R 4.2.0) |
| fastmap | 1.1.0 | 2021-01-25 | CRAN (R 4.2.0) |
| forcats | 0.5.1 | 2021-01-27 | CRAN (R 4.2.0) |
| foreign | 0.8-83 | 2022-09-28 | CRAN (R 4.2.2) |
| fs | 1.5.2 | 2021-12-08 | CRAN (R 4.2.0) |
| generics | 0.1.3 | 2022-07-05 | CRAN (R 4.2.0) |
| ggplot2 | 3.3.6 | 2022-05-03 | CRAN (R 4.2.0) |
| glue | 1.6.2 | 2022-02-24 | CRAN (R 4.2.0) |
| gridExtra | 2.3 | 2017-09-09 | CRAN (R 4.2.0) |
| gtable | 0.3.1 | 2022-09-01 | CRAN (R 4.2.0) |
| haven | 2.5.0 | 2022-04-15 | CRAN (R 4.2.0) |
| hms | 1.1.1 | 2021-09-26 | CRAN (R 4.2.0) |
| htmltools | 0.5.2 | 2021-08-25 | CRAN (R 4.2.0) |
| httr | 1.4.4 | 2022-08-17 | CRAN (R 4.2.0) |
| jquerylib | 0.1.4 | 2021-04-26 | CRAN (R 4.2.0) |
| jsonlite | 1.8.2 | 2022-10-02 | CRAN (R 4.2.0) |
| kableExtra | 1.3.4 | 2021-02-20 | CRAN (R 4.2.0) |
| knitr | 1.40 | 2022-08-24 | CRAN (R 4.2.0) |
| labelled | 2.9.1 | 2022-05-05 | CRAN (R 4.2.0) |
| lattice | 0.20-45 | 2021-09-22 | CRAN (R 4.2.2) |
| lifecycle | 1.0.3 | 2022-10-07 | CRAN (R 4.2.0) |
| likert | 1.3.5 | 2016-12-31 | CRAN (R 4.2.0) |
| magrittr | 2.0.3 | 2022-03-30 | CRAN (R 4.2.0) |
| memoise | 2.0.1 | 2021-11-26 | CRAN (R 4.2.0) |
| mnormt | 2.1.1 | 2022-09-26 | CRAN (R 4.2.0) |
| munsell | 0.5.0 | 2018-06-12 | CRAN (R 4.2.0) |
| nlme | 3.1-160 | 2022-10-10 | CRAN (R 4.2.2) |
| openxlsx | 4.2.5 | 2021-12-14 | CRAN (R 4.2.0) |
| pillar | 1.8.1 | 2022-08-19 | CRAN (R 4.2.0) |
| pkgbuild | 1.3.1 | 2021-12-20 | CRAN (R 4.2.0) |
| pkgconfig | 2.0.3 | 2019-09-22 | CRAN (R 4.2.0) |
| pkgload | 1.2.4 | 2021-11-30 | CRAN (R 4.2.0) |
| plyr | 1.8.7 | 2022-03-24 | CRAN (R 4.2.0) |
| prettyunits | 1.1.1 | 2020-01-24 | CRAN (R 4.2.0) |
| processx | 3.7.0 | 2022-07-07 | CRAN (R 4.2.0) |
| ps | 1.7.1 | 2022-06-18 | CRAN (R 4.2.0) |
| psych | 2.2.5 | 2022-05-10 | CRAN (R 4.2.0) |
| purrr | 0.3.5 | 2022-10-06 | CRAN (R 4.2.0) |
| R6 | 2.5.1 | 2021-08-19 | CRAN (R 4.2.0) |
| Rcpp | 1.0.9 | 2022-07-08 | CRAN (R 4.2.0) |
| readxl | 1.4.0 | 2022-03-28 | CRAN (R 4.2.0) |
| remotes | 2.4.2 | 2021-11-30 | CRAN (R 4.2.0) |
| reshape2 | 1.4.4 | 2020-04-09 | CRAN (R 4.2.0) |
| rio | 0.5.29 | 2021-11-22 | CRAN (R 4.2.0) |
| rlang | 1.0.6 | 2022-09-24 | CRAN (R 4.2.0) |
| rmarkdown | 2.14 | 2022-04-25 | CRAN (R 4.2.0) |
| rprojroot | 2.0.3 | 2022-04-02 | CRAN (R 4.2.0) |
| rstudioapi | 0.13 | 2020-11-12 | CRAN (R 4.2.0) |
| rvest | 1.0.2 | 2021-10-16 | CRAN (R 4.2.0) |
| sass | 0.4.1 | 2022-03-23 | CRAN (R 4.2.0) |
| scales | 1.2.1 | 2022-08-20 | CRAN (R 4.2.0) |
| sessioninfo | 1.2.2 | 2021-12-06 | CRAN (R 4.2.0) |
| stringi | 1.7.8 | 2022-07-11 | CRAN (R 4.2.0) |
| stringr | 1.4.1 | 2022-08-20 | CRAN (R 4.2.0) |
| svglite | 2.1.0 | 2022-02-03 | CRAN (R 4.2.0) |
| systemfonts | 1.0.4 | 2022-02-11 | CRAN (R 4.2.0) |
| testthat | 3.1.4 | 2022-04-26 | CRAN (R 4.2.0) |
| tibble | 3.1.8 | 2022-07-22 | CRAN (R 4.2.0) |
| tidyselect | 1.2.0 | 2022-10-10 | CRAN (R 4.2.0) |
| usethis | 2.1.6 | 2022-05-25 | CRAN (R 4.2.0) |
| utf8 | 1.2.2 | 2021-07-24 | CRAN (R 4.2.0) |
| vctrs | 0.4.2 | 2022-09-29 | CRAN (R 4.2.0) |
| viridisLite | 0.4.1 | 2022-08-22 | CRAN (R 4.2.0) |
| webshot | 0.5.3 | 2022-04-14 | CRAN (R 4.2.0) |
| withr | 2.5.0 | 2022-03-03 | CRAN (R 4.2.0) |
| xfun | 0.33 | 2022-09-12 | CRAN (R 4.2.0) |
| xml2 | 1.3.3 | 2021-11-30 | CRAN (R 4.2.0) |
| xtable | 1.8-4 | 2019-04-21 | CRAN (R 4.2.0) |
| yaml | 2.3.5 | 2022-02-21 | CRAN (R 4.2.0) |
| zip | 2.2.0 | 2021-05-31 | CRAN (R 4.2.0) |
# load scored data
data <- readRDS(file = "../PSTEM_Wave_2_SCORED_2023-03-29.RData")
# load dictionary
dict <- read.csv(file = "../PSTEM_Data-Dictionary_Wave_2_Target.csv")
There are a total of 159 participants in wave 2, and 147 participants with non-missing data.
# gender
ggplot(data[which(!is.na(data$gender_f)),],
aes(factor(gender_f,
levels = c("woman", "man"),
labels = c("woman", "man")))) +
geom_bar(fill = c("#f1c232", "#710c0c")) +
geom_text(stat='count', aes(label=..count..), vjust = -1) +
labs(
title = "Count of Gender",
x = NULL
) +
ylim(0, 150) +
theme_classic()
# race
ggplot(data[which(!is.na(data$race_f)),],
aes(factor(race_f,
levels = c("asian", "black", "hispanic", "mixed"),
labels = c("asian", "black", "hispanic", "mixed")))) +
geom_bar(fill = "#710c0c") +
geom_text(stat='count', aes(label=..count..), vjust = -1) +
labs(
title = "Count of racial/ethnic groups",
x = NULL
) +
ylim(0, 125) +
theme_classic()
# stem-se
stemse_items <- dict %>%
filter(grepl(pattern = "stemse", x = variable)) %>%
pull(variable)
stemse_items <- data %>%
select(all_of(stemse_items))
names(stemse_items) <- var_label(stemse_items)
stemse_items <- stemse_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Not at all confident", "To a small extent",
"To some extent", "To a large extent",
"Absolutely confident"))
})
plot(likert(stemse_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Self-Efficacy")
# stemment-sm
stemment_sm_items <- c("stemment_1","stemment_2","stemment_3","stemment_4",
"stemment_5","stemment_6","stemment_7")
stemment_sm_items <- data %>%
select(all_of(stemment_sm_items))
names(stemment_sm_items) <- var_label(stemment_sm_items)
stemment_sm_items <- stemment_sm_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Not at all", "To a small extent",
"To some extent", "To a large extent",
"To a very large extent"))
})
plot(likert(stemment_sm_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Socioemotional Mentoring")
# stemment-im
stemment_im_items <- c("stemment_8","stemment_9","stemment_10",
"stemment_11","stemment_12","stemment_13")
stemment_im_items <- data %>%
select(all_of(stemment_im_items))
names(stemment_im_items) <- var_label(stemment_im_items)
stemment_im_items <- stemment_im_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Not at all", "To a small extent",
"To some extent", "To a large extent",
"To a very large extent"))
})
plot(likert(stemment_im_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Instrumental Mentoring")
# stemidco-id
stemidco_id_items <- c("stemidco_1","stemidco_2","stemidco_3",
"stemidco_4","stemidco_5","stemidco_6")
stemidco_id_items <- data %>%
select(all_of(stemidco_id_items))
names(stemidco_id_items) <- var_label(stemidco_id_items)
stemidco_id_items <- stemidco_id_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(stemidco_id_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Identity as a Scientist")
# stemidco-co
stemidco_co_items <- c("stemidco_9","stemidco_10","stemidco_11",
"stemidco_12","stemidco_13","stemidco_14","stemidco_15")
stemidco_co_items <- data %>%
select(all_of(stemidco_co_items))
names(stemidco_co_items) <- var_label(stemidco_co_items)
stemidco_co_items <- stemidco_co_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(stemidco_co_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Commitment to a Science Career")
# items
stemidco_emi_items <- c("stemidco_7","stemidco_8")
stemidco_emi_items <- data %>%
select(all_of(stemidco_emi_items))
names(stemidco_emi_items) <- var_label(stemidco_emi_items)
stemidco_emi_items <- stemidco_emi_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(stemidco_emi_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "STEM Ethnicity-Major Integration")
# items
umics_variables <- c("education commitment", "education in-depth exploration",
"education reconsideration of commitment")
for(var in umics_variables){
items <- dict %>%
filter(scale == var) %>%
pull(variable)
items <- data %>%
select(all_of(items))
names(items) <- var_label(items)
items <- items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
print(plot(likert(items),
main = var) +
theme(axis.text = element_text(size=12)) +
labs(title = var))
}
# meim exploration
meim_ex_items <- c("meim_1", "meim_2", "meim_4", "meim_8", "meim_10")
meim_ex_items <- data %>%
select(all_of(meim_ex_items))
names(meim_ex_items) <- var_label(meim_ex_items)
meim_ex_items <- meim_ex_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(meim_ex_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Ethnic Identity Exploration")
# meim commitment
meim_co_items <- c("meim_3", "meim_5", "meim_6", "meim_7",
"meim_9", "meim_11", "meim_12")
meim_co_items <- data %>%
select(all_of(meim_co_items))
names(meim_co_items) <- var_label(meim_co_items)
meim_co_items <- meim_co_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(meim_co_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Ethnic Identity Commitment")
swls_items <- c("swls_1","swls_2","swls_3","swls_4","swls_5")
swls_items <- data %>%
select(all_of(swls_items))
names(swls_items) <- var_label(swls_items)
swls_items <- swls_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:7),
labels = c("Strongly Disagree", "Disagree", "Slightly Disagree",
"Neither Agree nor Disagree", "Slightly Agree",
"Agree", "Strongly Agree"))
})
plot(likert(swls_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Satisfaction with Life")
ssc_items <- c("ssc_1", "ssc_2", "ssc_3", "ssc_4", "ssc_5", "ssc_6",
"ssc_7", "ssc_8", "ssc_9", "ssc_10", "ssc_11", "ssc_12")
ssc_items <- data %>%
select(all_of(ssc_items))
names(ssc_items) <- var_label(ssc_items)
ssc_items <- ssc_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(ssc_items)) +
theme(axis.text = element_text(size=12))
pid_variables <- c("disinhibition", "detachment", "psychoticism",
"negative", "antagonism")
for(var in pid_variables){
items <- dict %>%
filter(scale == var) %>%
pull(variable)
items <- data %>%
select(all_of(items))
names(items) <- var_label(items)
items <- items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:4),
labels = c("Very False or Often False", "Sometimes or Somewhat False",
"Sometimes or Somewhat True", "Very True or Often True"))
})
print(plot(likert(items),
main = var) +
theme(axis.text = element_text(size=12)) +
labs(title = paste0("PID-5 Variable: ", var)))
}
# items
srs_items <- c("srs_1_scored", "srs_2_scored", "srs_3_scored", "srs_4_scored",
"srs_5_scored", "srs_6_scored", "srs_7_scored", "srs_8_scored",
"srs_9_scored", "srs_10_scored", "srs_11_scored")
srs_items <- data %>%
select(all_of(srs_items))
srs_ori <- c("srs_1", "srs_2", "srs_3", "srs_4",
"srs_5", "srs_6", "srs_7", "srs_8",
"srs_9", "srs_10", "srs_11")
srs_ori <- data %>%
select(all_of(srs_ori))
names(srs_items) <- var_label(srs_ori)
srs_items <- srs_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(0,1),
labels = c("Incorrect", "Correct"))
})
plot(likert(srs_items)) +
theme(axis.text = element_text(size=12))
# items
loc_int_items <- dict %>%
filter(scale == "internal") %>%
pull(variable)
loc_int_items <- data %>%
select(all_of(loc_int_items))
names(loc_int_items) <- var_label(loc_int_items)
loc_int_items <- loc_int_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(loc_int_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Internal Locus of Control")
# items
epr_items <- dict %>%
filter(scale == "public regard") %>%
pull(variable)
epr_items <- data %>%
select(all_of(epr_items))
names(epr_items) <- var_label(epr_items)
epr_items <- epr_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(epr_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Educational Public Regard")
# items
toi_items <- dict %>%
filter(scale == "growth") %>%
pull(variable)
toi_items <- data %>%
select(all_of(toi_items))
names(toi_items) <- var_label(toi_items)
toi_items <- toi_items %>%
mutate_all(.funs = function(x){
factor(x, levels = c(1:5),
labels = c("Strongly Disagree", "Somewhat Disagree",
"Neutral", "Somewhat Agree", "Strongly Agree"))
})
plot(likert(toi_items)) +
theme(axis.text = element_text(size=12)) +
labs(title = "Growth Mindset")
Social Support from Family and Friends (Procidano & Heller, 1983)