library(magrittr)
H1 <- list(
desc = "The correlation between the apathy and depression scale is smaller than 0.3",
criteria = list(
list(
test = "eq_test_r",
result = "TOST_p2",
direction = "<",
comparator = .01
)
),
evaluation = "&"
)
eq_test_r <- list(
test = "TOSTr",
params = list(
n = 460,
r = 0.11,
low_eqbound_r=-1,
high_eqbound_r=0.3,
alpha=0.05)
)
study <- list(
name = "Apathy Depression Example",
hypotheses = list(H1),
methods = list(),
data = list(),
analysis = list(
"eq_test_r" = eq_test_r
)
)
study %>%
jsonlite::toJSON(auto_unbox = TRUE) %>%
jsonlite::prettify(indent = 2) %>%
writeLines("inst/extdata/apathy_depression.json")
# devtools::install_github("scienceverse/faux")
n_sub <- 460
dat <- faux::rnorm_multi(n_sub, 2, .11, c(5, 6), 2,
c("congruent", "incongruent"))
dat$sub_id <- 1:n_sub
readr::write_csv(dat, "inst/extdata/apathy_depression.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.