Skip to content

Commit

Permalink
Add notes and simcode
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Oct 11, 2024
1 parent ae1a1b2 commit 03c11ad
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
20240918.pdf
deenadayalan_et_al_2008.pdf
Rplots.pdf
72 changes: 72 additions & 0 deletions 20241016.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/env Rscript
# Question:
# In table 5 it is shown that the application
# is thought of as more useful and they
# give statistics. Can this be reproduced?

before_mean <- 4.78
before_sd <- 0.67

after_mean <- 5.67
after_sd <- 0.50

expected_p_value <- 0.011
n_people <- 9
n_p_values <- 100
n_experiments <- 10

simulate_p_values <- function(
before_mean = 4.78,
before_sd = 0.67,
after_mean = 5.67,
after_sd = 0.50,
n_people = 9,
n_p_values = 100
) {
testthat::expect_equal(before_mean, 4.78)
testthat::expect_equal(before_sd, 0.67)
testthat::expect_equal(after_mean, 5.67)
testthat::expect_equal(after_sd, 0.5)
testthat::expect_equal(n_people, 9)
testthat::expect_equal(n_p_values, 100)

p_values <- rep(NA, n_p_values)
for (i in seq_len(n_p_values)) {
dist_before <- rnorm(n = n_people, mean = before_mean, sd = before_sd)
dist_after <- rnorm(n = n_people, mean = after_mean, sd = after_sd)
stat_results <- t.test(x = dist_before, y = dist_after)
p_values[i] <- stat_results$p.value
}
testthat::expect_equal(0, sum(is.na(p_values)))
p_values
}


all_data <- list()
for (i in seq_len(n_experiments)) {
t <- tibble::tibble(
p = simulate_p_values(n_p_values = n_p_values)
)
t$i <- i
all_data[[i]] <- t
}
t <- dplyr::bind_rows(all_data)


ggplot2::ggplot(t, ggplot2::aes(x = p)) +
ggplot2::geom_histogram() +
ggplot2::facet_wrap(ggplot2::vars(i), ncol = 2) +
ggplot2::scale_x_continuous(limits = c(0.0, 0.06)) +
ggplot2::geom_vline(xintercept = expected_p_value) +
ggplot2::geom_vline(xintercept = 0.05, lty = "dashed") +
ggplot2::geom_vline(xintercept = mean(t$p), color = "red") +
ggplot2::labs(
title = "Distribution of simulated p-values",
caption = paste0(
"Black vertical line: reported in paper. \n",
"Black dashed vertical line: 0.05%. \n",
"Red vertical line: mean p value from ", n_p_values, " simulations. "
)
)

ggplot2::ggsave("20241011_tabel_5_sim.png", width = 4, height = 7)
29 changes: 29 additions & 0 deletions 20241016.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 2024-10-16: Lockman & Schirmer, 2020

- Discussion leader: Stephan
- Date: 2024-10-16
- Paper: Dimitriadou, Eleni, and Andreas Lanitis. "Evaluating the impact of an automated body language assessment system." Education and Information Technologies (2024): 1-31.

First sentence already is deceptive: 'Body language is an important aspect in
educational settings, directly influencing
educators’ effectiveness in message delivery, classroom management, and student
interactions (Benzer, 2012).'. This references a paper called
'Teachers’ Opinions about the Use of Body Language', where
that ask 100 teachers
if they think body language is important.
'When asked, teachers think body language is an important aspect in
educational settings, with possible effects on influencing
educators’ effectiveness in message delivery, classroom management, and student
interactions'.

Sample size of 9

Table 5: 'Do you think the application
is useful for improving the
lecture quality?' before and after using
the tool.

4.78 (0.67) 0.011*
Do you think the application
is useful for improving the
lecture quality?

0 comments on commit 03c11ad

Please sign in to comment.