The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

MRTAnalysis

The MRTAnalysis package provides functions to conduct post-study analyses of Micro-Randomized Trials (MRTs), focusing on estimating causal excursion effects.

Installation

You can install the package from CRAN:

install.packages("MRTAnalysis")

Usage

See vignettes for detailed examples:

library(MRTAnalysis)

# Proximal outcome analysis (continuous)
fit1 <- wcls(
  data = data_mimicHeartSteps,
  id = "userid", outcome = "logstep_30min",
  treatment = "intervention", rand_prob = 0.6,
  moderator_formula = ~1,
  control_formula = ~logstep_pre30min,
  availability = "avail"
)
summary(fit1)

# Distal outcome analysis
fit2 <- dcee(
  data = data_distal_continuous,
  id = "userid", outcome = "Y",
  treatment = "A", rand_prob = "prob_A",
  moderator_formula = ~1,
  control_formula = ~X,
  availability = "avail",
  control_reg_method = "lm"
)
summary(fit2)

# Mediation with distal outcome
fit3 <- mcee(
  data = data_time_varying_mediator_distal_outcome,
  id = "id", dp = "dp",
  outcome = "Y", treatment = "A", mediator = "M",
  availability = "I", rand_prob = "p_A",
  time_varying_effect_form = ~1,                # constant effects over time
  control_formula_with_mediator = ~ dp + M + X, # adjustment set
  control_reg_method = "glm"
)
summary(fit3)

References

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.