0

I'm currently doing randomisation tests (RTs) for a single-case design in R. A bit of context about my phases:

I am doing an AB design, which was staggered using a multiple baseline design across 5 participants.

Here is my phase layout over 9 weeks, with 7 data points per week: AA/BBBBBB

A = baseline; B = intervention; / = changeover phase with 7 possible start points

I have figured out how to calculate the randomisation test for all participants as a whole, but I'm struggling to do the randomisation test for each individual participant, as it asks for minimum phase length as opposed to the possible start points in a .txt file.

After Monte Carlo, I'm doing 1,000 randomisation distributions. For the RTs, I'm using the following code in R, based on a minimum of 14 baseline data points and a minimum of 42 intervention data points:

pvalue.random(design="AB",statistic="B-A",number=1000,limit=14)

For these calculations, R asks for the min number of data points for each phase (limit). Technically, the min number of data points for phase B is 42. However, as the transition phase is only 7 days, this means there's no time to have a 42-day baseline. So I've put the minimum phase length at 14 days to reflect the 2-week baseline. Is this right?

  • 1
    This is likely better suited at [stats.se] since it seems to be more about stats methods than specific code debugging. Beyond that, we'd need to see a [reproducible example](https://stackoverflow.com/q/5963269/5325862) to really know how to help. Where does `pvalue.random` come from? – camille May 09 '21 at 19:38
  • Thanks Camille. It comes from: https://cran.r-project.org/web/packages/SCRT/SCRT.pdf – conoro27 May 09 '21 at 19:42

0 Answers0