Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maike Kleemeyer
MPGQuestionnaire
Commits
14ee8536
Commit
14ee8536
authored
Feb 02, 2021
by
Maike Kleemeyer
Browse files
Add analyses chunks
parent
5b6f260b
Changes
1
Show whitespace changes
Inline
Side-by-side
generate_report.Rmd
View file @
14ee8536
---
title: "MPGQuestionnaireReport"
author: "Kleemeyer"
date: "
11/4/2020
"
date: "
`r format(Sys.time(), '%d %B, %Y')`
"
output:
pdf_document: default
#
pdf_document: default
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(echo = TRUE
, message = FALSE
)
library(knitr)
library(kableExtra)
library(ggplot2)
library(dplyr)
library(corrr)
library(umx)
library(matrixStats)
source("get_data_exported.R")
```
# Scale consistency
*
SCALE A: Group atmosphere
##
SCALE A: Group atmosphere
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_A <- responses_coded %>%
select(A03:A05) %>%
correlate()
...
...
@@ -44,9 +47,9 @@ kable(output_A, caption = "Item statistics scale A")
Cronbach's alpha for Scale A is `r rely_A$total$std.alpha`.
*
SCALE B1: Leadership leadstyle
##
SCALE B1: Leadership leadstyle
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_B1 <- responses_coded %>%
select(B02:B07) %>%
correlate()
...
...
@@ -70,9 +73,9 @@ kable(output_B1, caption = "Item statistics scale B1")
Cronbach's alpha for Scale B1 is `r rely_B1$total$std.alpha`.
*
SCALE B2: Leadership development
##
SCALE B2: Leadership development
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_B2 <- responses_coded %>%
select(B09:B13) %>%
correlate()
...
...
@@ -96,9 +99,9 @@ kable(output_B2, caption = "Item statistics scale B2")
Cronbach's alpha for Scale B2 is `r rely_B2$total$std.alpha`.
*
SCALE C: Commitment
##
SCALE C: Commitment
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_C <- responses_coded %>%
select(C02:C04) %>%
correlate()
...
...
@@ -122,9 +125,9 @@ kable(output_C, caption = "Item statistics scale C")
Cronbach's alpha for Scale C is `r rely_C$total$std.alpha`.
*
SCALE D: Bullying
##
SCALE D: Bullying
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_D <- responses_coded %>%
select(D02:D06) %>%
correlate()
...
...
@@ -148,9 +151,9 @@ kable(output_D, caption = "Item statistics scale D")
Cronbach's alpha for Scale D is `r rely_D$total$std.alpha`.
*
SCALE E: Gender discrimination
##
SCALE E: Gender discrimination
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_E <- responses_coded %>%
select(E03:E05) %>%
correlate()
...
...
@@ -174,9 +177,9 @@ kable(output_E, caption = "Item statistics scale E")
Cronbach's alpha for Scale E is `r rely_E$total$std.alpha`.
*
SCALE F: Sexual harassment
##
SCALE F: Sexual harassment
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_F <- responses_coded %>%
select(F02:F08) %>%
correlate()
...
...
@@ -200,9 +203,9 @@ kable(output_F, caption = "Item statistics scale F")
Cronbach's alpha for Scale F is `r rely_F$total$std.alpha`.
*
SCALE H1: Work-life Balance
##
SCALE H1: Work-life Balance
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_H1 <- responses_coded %>%
select(H02:H06) %>%
correlate()
...
...
@@ -226,9 +229,9 @@ kable(output_H1, caption = "Item statistics scale H1")
Cronbach's alpha for Scale H1 is `r rely_H1$total$std.alpha`.
*
SCALE H2: Work-family Balance
##
SCALE H2: Work-family Balance
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_H2 <- responses_coded %>%
select(H09:H13) %>%
correlate()
...
...
@@ -252,9 +255,9 @@ kable(output_H2, caption = "Item statistics scale H2")
Cronbach's alpha for Scale H2 is `r rely_H2$total$std.alpha`.
*
SCALE H3: Parental leave - yes
##
SCALE H3: Parental leave - yes
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_H3 <- responses_coded %>%
select(H17:H21) %>%
correlate()
...
...
@@ -278,9 +281,9 @@ kable(output_H3, caption = "Item statistics scale H3")
Cronbach's alpha for Scale H3 is `r rely_H3$total$std.alpha`.
*
SCALE H4: Parental leave - no
##
SCALE H4: Parental leave - no
```{r echo = FALSE,
m
es
sage = FALSE
}
```{r echo = FALSE,
r
es
ults='asis'
}
interitem_H4 <- responses_coded %>%
select(H23:H25) %>%
correlate()
...
...
@@ -304,61 +307,92 @@ kable(output_H4, caption = "Item statistics scale H4")
Cronbach's alpha for Scale H4 is `r rely_H4$total$std.alpha`.
# Analyses
# Factor Analyses
```{r echo = FALSE, message = FALSE, include = FALSE}
likert <- responses_coded %>%
select(A03:B13,C02:D06,E03:E05,F02:F08,H02:H06)
efa <- umxEFA(likert, factors = 8, minManifests = 5)
factors <- as.data.frame(loadings(efa))
color.me <- rowMaxs(abs(loadings(efa)))
```
```{r echo = FALSE, message = FALSE}
factors %>%
mutate(items = row.names(.)) %>%
relocate(items) %>%
mutate_all(~cell_spec(
.x,
color = ifelse(abs(.x) %in% color.me, "red", "black"))) %>%
kbl(format = "html", escape = F) %>%
kable_paper("striped") %>%
pack_rows("Scale A", 1, 3) %>%
pack_rows("Scale B", 4, 14) %>%
pack_rows("Scale C", 15, 17) %>%
pack_rows("Scale D", 18, 22) %>%
pack_rows("Scale E", 23, 25) %>%
pack_rows("Scale F", 26, 32) %>%
pack_rows("Scale H", 33, 37) %>%
kable_styling()
```
# General Analyses
In total, `r nrow(responses)` participants (partly) completed the questionnaire.
# Binary Questions
* Do you work in a group?
```{r echo = FALSE}
table(responses$A01, useNA = "ifany")
```{r echo = FALSE, results='asis'}
kable(table(responses$A01, useNA = "ifany"))
```
* Did you have a personal conversation with your supervisor?
```{r echo = FALSE}
table(responses$B14, useNA = "ifany")
```{r echo = FALSE, results='asis'}
kable(table(responses$B14, useNA = "ifany"))
```
* Have you been subjected to bullying during the past 12 months?
```{r echo = FALSE}
table(responses$D12, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$D12, useNA = "ifany")
)
```
* Have you been subjected to gender discrimination during the past 12 months?
```{r echo = FALSE}
table(responses$E05, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$E05, useNA = "ifany")
)
```
* Have you been subjected to sexual harassment during the past 12 months?
```{r echo = FALSE}
table(responses$F11, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$F11, useNA = "ifany")
)
```
* Do children under the age of 18 live in your household?
```{r echo = FALSE}
table(responses$H07, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$H07, useNA = "ifany")
)
```
* Do people with care needs live in your household?
```{r echo = FALSE}
table(responses$H30, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$H30, useNA = "ifany")
)
```
* Have you taken parental leave?
```{r echo = FALSE}
table(responses$H14, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$H14, useNA = "ifany")
)
```
*
E
hat is your gender?
```{r echo = FALSE}
table(responses$I02, useNA = "ifany")
*
W
hat is your gender?
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$I02, useNA = "ifany")
)
```
* What is your position in the MPG?
```{r echo = FALSE}
table(responses$I03, useNA = "ifany")
```{r echo = FALSE
, results='asis'
}
kable(
table(responses$I03, useNA = "ifany")
)
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment