Skip to main content
QUICK REVIEW

[Paper Review] MRT-SS Calculator: An R Shiny Application for Sample Size Calculation in Micro-Randomized Trials

Nicholas J. Seewald, Ji Sun|arXiv (Cornell University)|Sep 2, 2016
Nutritional Studies and DietMedicine4 references7 citations
TL;DR

This paper introduces MRT-SS Calculator, an R Shiny web application that computes sample size and power for micro-randomized trials (MRTs), enabling researchers to design mobile health interventions with just-in-time support. It uses time-varying treatment effects and availability patterns to estimate minimal sample sizes needed to detect proximal intervention effects with desired power, demonstrated through the HeartSteps trial on physical activity promotion.

ABSTRACT

The micro-randomized trial (MRT) is a new experimental design which allows for the investigation of the proximal effects of a "just-in-time" treatment, often provided via a mobile device as part of a mobile health intervention. As with a traditional randomized controlled trial, computing the minimum required sample size to achieve a desired power is a crucial step in designing an MRT. We present MRT-SS Calculator, an online sample-size calculator for micro-randomized trials, built with R Shiny. MRT-SS Calculator requires specification of time-varying patterns for the proximal treatment effect and expected treatment availability. We illustrate the implementation of MRT-SS Calculator using a mobile health trial, HeartSteps. The application can be accessed from https://pengliao.shinyapps.io/mrt-calculator.

Motivation & Objective

  • To address the lack of accessible tools for sample size determination in micro-randomized trials (MRTs), a novel experimental design for evaluating just-in-time mobile health interventions.
  • To develop a user-friendly, interactive application that enables researchers—especially non-statisticians—to specify study parameters and receive real-time sample size or power estimates.
  • To support complex MRT designs by incorporating time-varying proximal treatment effects and participant availability patterns.
  • To demonstrate the application’s utility through a real-world example using the HeartSteps trial on physical activity promotion.

Proposed method

  • The calculator implements statistical methodology from Liao et al. (2016), modeling the proximal treatment effect β(t) as a linear function of time and covariates via β(t) = Zₜᵀβ.
  • It estimates sample size using a least-squares estimator for β under a linear alternative hypothesis, testing H₀: β(t) = 0 against H₁: β(t) > 0 for some t.
  • The application accounts for time-varying treatment availability by defining Iₜ = 1 when a participant is eligible for treatment, and only estimating β(t) conditional on Iₜ = 1.
  • Users input parameters such as target power, average treatment probability ρ, expected treatment effect trends (e.g., linear or quadratic), and number of decision times T.
  • The tool supports flexible modeling of treatment effect trends, including quadratic effects that reflect increasing then decreasing intervention impact over time.
  • Results are computed in real time and visualized, with outputs including required sample size for 80% power or achieved power for a given sample size.

Experimental results

Research questions

  • RQ1What sample size is required to achieve 80% power to detect a proximal treatment effect in a micro-randomized trial with time-varying effects?
  • RQ2How does the inclusion of participant availability (Iₜ) affect sample size estimation in MRTs?
  • RQ3What is the power of a trial with a fixed sample size (e.g., n=40) when the proximal treatment effect follows a quadratic trend over time?
  • RQ4How can researchers efficiently estimate sample size without requiring advanced statistical programming skills?
  • RQ5To what extent can the MRT-SS Calculator support diverse MRT designs with varying treatment effect patterns and availability constraints?

Key findings

  • For the HeartSteps trial with T=210 decision times (5 per day over 42 days), a sample size of 40 participants achieves at least 80% power to detect a quadratic treatment effect with maximal impact around day 28.
  • The calculator enables detection of non-constant treatment effects, such as an initial increase followed by habituation, which are common in real-world mHealth interventions.
  • With a constant treatment probability of ρ=0.4, participants receive an average of two messages per day when always available, which informs power and sample size calculations.
  • The application provides real-time visual feedback, displaying sample size or power outputs for varying target treatment effects, with power values below 50% not displayed.
  • The MRT-SS Calculator successfully supports complex MRT designs by integrating time-varying treatment effects and availability indicators into sample size estimation.
  • The tool is accessible via a public web link (https://pengliao.shinyapps.io/mrt-calculator), facilitating broad use in mHealth research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.