DMCfun icon indicating copy to clipboard operation
DMCfun copied to clipboard

Adding Top Level Function to use calculateDelta in factorial designs (WIP)

Open lboel opened this issue 1 year ago • 3 comments

A small proposal for a top level function to use calculateDelta in a factorial design.

dat <- createDF(nSubjects = 1, nTrl = 10000, design = list("Comp" = c("comp", "incomp")))

dat <- addDataDF(dat,
                  RT = list("Comp_comp"   = c(500, 80, 100),
                           "Comp_incomp" = c(600, 80, 140)))

dat$additionalFactor <- sample(c("Test","Experiment"),nrow(dat),replace = T)

delta <- calculateDeltaFactorialLong(dat, factorNames = c("additionalFactor"),
                                     nDelta = 19,
                                     tDelta = 1,
                                     columns = c("Subject", "Comp", "RT"),
                                     compCoding = c("comp", "incomp"),
                                     quantileType = 5)`

Would output something like this: image

This function was developed based on an idea by https://github.com/rubenellinghaus.

At the moment this is only a draft and the main contributors should decide whether I should proceed here and this is a good addition to the package.

Best,

Luke

lboel avatar Apr 19 '23 10:04 lboel