Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Dec 15, 2024
1 parent 962b63f commit ec68b75
Show file tree
Hide file tree
Showing 4 changed files with 1,664 additions and 17 deletions.
50 changes: 50 additions & 0 deletions BayesianStatistics/2025/data/make_TAP.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Tap 1 -------------------------------------------------------------------



set.seed(5)
df <- data.frame(rt=rgamma(5000, 2, 1))
df$confidence <- c(rbeta(2500, 0.5, 2) / 2, (rbeta(2500, 2, 0.5) / 2) + 0.5)

plot(bayestestR::estimate_density(df$rt))

# write.csv(df, "tap1a.csv", row.names=FALSE)
write.csv(df, "tap1a_resit.csv", row.names=FALSE)

set.seed(6)
df <- data.frame(reading_time=rgamma(5000, 3, 1))*2
df$certainty <- c(rbeta(2500, 0.5, 2) / 2, (rbeta(2500, 2, 0.5) / 2) + 0.5)

plot(bayestestR::estimate_density(df$reading_time))

write.csv(df, "tap1a.csv", row.names=FALSE)
# write.csv(df, "tap1a_resit.csv", row.names=FALSE)


# TAP 2 -------------------------------------------------------------------


df <- read.csv("https://raw.githubusercontent.com/DominiqueMakowski/PHQ4R/main/study2/data/data.csv")
df$Interoception <- rowSums(df[grep("IAS_\\d", names(df))])
df <- filter(df, Gender %in% c("Female", "Male"))


# lm(STAI5_General ~ Age * Gender, data = df) |>
# parameters::parameters()
#
# plot(estimate_relation(m))


df |>
dplyr::select(Age, Gender, Anxiety=STAI5_General) |>
write.csv("tap2.csv", row.names=FALSE)


# lm(BDI2_Total ~ Interoception * Gender, data = df) |>
# parameters::parameters()
#
# plot(estimate_relation(m))

df |>
dplyr::select(Interoception, Gender, Depression=BDI2_Total) |>
write.csv("tap2_resit.csv", row.names=FALSE)
17 changes: 0 additions & 17 deletions BayesianStatistics/2025/data/tap1.R

This file was deleted.

Loading

0 comments on commit ec68b75

Please sign in to comment.