silentema: dynamic missingness graphs and sensitivity analysis for EMA data
Source:R/silentema-package.R
silentema-package.RdParticipants in ecological momentary assessment (EMA) and other experience-sampling studies skip prompts, and the reasons are rarely unrelated to the momentary states being measured. silentema provides a graphical language for stating which nonresponse mechanism is assumed, a checker that says which quantities of a two-level vector autoregressive model of order one (VAR(1)) remain estimable under that mechanism and by which estimator, two tests that ask the data whether skipped prompts were informative, estimators for the recoverable case, a sensitivity analysis for self-censoring (the mechanism that estimation alone cannot repair), three calibration designs for the sensitivity parameter, worst-case bounds, a reporting template, and a simulator.
The workflow
The recommended order of analysis is
Declare the assumed mechanism as a dynamic missingness graph with
dm_graph, built from the motifs M0 (completely random), M1 (lagged-state dependence), M2 (self-censoring), M3 (burden or fatigue), M4 (person propensity), M5 (context confounding) and M6 (reactivity), with optional sensor, probe and context nodes; inspect it withplotand query it withdsep.Check recoverability with
recoverability: which estimands (transition kernel, person means, between-person law) are structurally recoverable, and which estimator recovers them.Test whether silence was informative with
silence_test(the state after a skipped prompt) and, when an always-observed channel exists,sensor_gap_test; describe response persistence withfatigue_check.Estimate the within-person VAR(1) from answered adjacent prompts with
fit_pairs(person intercepts, half-panel jackknife, cluster-robust inference throughsummary.pairs_fit), with covariate adjustment or inverse-probability weighting for an observed context (fit_ipw), or by full-information maximum likelihood under missing at random (fit_fiml).Profile the estimates over a self-censoring sensitivity value with
fit_tiltandtilt_profile, and summarize the profile withbreak_even(sign changes, significance changes, identified sets and bands).Calibrate the sensitivity value from a passive sensor, randomized probes or the post-skip contrast with
calibrate_delta; compare with the worst-case bounds ofbounds_support.Report with
missingness_declaration, which writes a Markdown declaration for preregistrations and papers.
Simulation and design
simulate_ema generates two-level VAR(1) data under any
combination of motifs with a target response rate, optional sensor, probe,
context and day structure; simulate_from_fit simulates from a
fitted (tilted) model; default_params,
stationary_cov and partial_cors give the
population parameters used in the accompanying article and the derived
quantities.
Data format
All estimators take a long data frame with one row per scheduled
prompt, answered or not: a person identifier (id), an integer prompt
index that increases by one from one scheduled prompt to the next
(time), a response indicator (R, 1 = answered), the state
columns (NA at skipped prompts), and optionally a day column
(pairs are then formed within days only), a sensor column, a probe column
and context columns. See make_pairs.
References
Yu, H.-T. (2026). What skipped prompts hide: Detecting, diagnosing, and correcting informative nonresponse in ecological momentary assessment. Manuscript under review. Materials: https://osf.io/x6d2t/.
Mohan, K., & Pearl, J. (2021). Graphical models for processing missing data. Journal of the American Statistical Association, 116, 1023-1037. doi:10.1080/01621459.2021.1874961
Dhaene, G., & Jochmans, K. (2015). Split-panel jackknife estimation of fixed-effect models. The Review of Economic Studies, 82, 991-1030. doi:10.1093/restud/rdv007
Shumway, R. H., & Stoffer, D. S. (1982). An approach to time series smoothing and forecasting using the EM algorithm. Journal of Time Series Analysis, 3, 253-264. doi:10.1111/j.1467-9892.1982.tb00349.x
See also
The vignettes: vignette("silentema-workflow") for a
start-to-finish analysis, vignette("dm-graphs") for the motif
taxonomy and recoverability, vignette("testing-informativeness")
for the tests, vignette("sensitivity-analysis") for tilting and
calibration, and vignette("simulation-and-design") for the
simulator.
Author
Maintainer: Hsiu-Ting Yu hsiutingyu@gmail.com (ORCID) [copyright holder]