Missingness declaration for preregistrations and reports
Source:R/bounds_report.R
missingness_declaration.RdWrites a Markdown declaration that records the declared dm-graph, the recoverability verdicts, the tests that were run, the sensitivity interval and its source, and the reported band, in the order that Yu (2026) recommends for preregistrations and reports. Sections for which the corresponding object is supplied are filled from it; the others are left as prompts to complete.
Usage
missingness_declaration(
g,
rec = NULL,
silence = NULL,
sensor_gap = NULL,
fatigue = NULL,
profile = NULL,
calibration = NULL,
plausible = NULL,
file = NULL
)Arguments
- g
A
dm_graph.- rec
Optional
recoverabilityreport forg.- silence
Optional
silence_testresult.- sensor_gap
Optional
sensor_gap_testresult.- fatigue
Optional
fatigue_checkresult.- profile
Optional
tilt_profile.- calibration
Optional
calibrate_deltaresult (or a list of them).- plausible
Optional numeric vector of length 2: the plausible interval used for the band.
- file
Optional path; if
NULLthe declaration is returned as a character vector.
Value
Invisibly, a character vector with one element per line of the
Markdown declaration; when file is given the lines are also
written to that file.
Examples
g <- dm_graph(c("M2", "M4"), sensor = TRUE)
sim <- simulate_ema(N = 40, n_prompts = 30, motifs = c("M2", "M4"), sensor_cor = 0.6, seed = 1)
st <- silence_test(sim$data, sim$vars)
prof <- tilt_profile(sim$data, sim$vars, delta_grid = c(-1, -0.5, 0), propensity = "person")
cal <- calibrate_delta(prof, sim$data, method = "sensor")
cat(missingness_declaration(g, silence = st, profile = prof, calibration = cal,
plausible = c(-1, 0)), sep = "\n")
#> # Missingness declaration (silentema)
#>
#> ## 1. Design facts
#> - Prompts per day, days, scheduling, and the definition of a scheduled prompt: [to complete]
#> - Response rate overall and by person (median, range): [to complete]
#> - Whether prompt-level (whole prompt) or item-level missingness occurs: [to complete]
#>
#> ## 2. Declared dynamic missingness graph
#> - Motifs: M2 + M4
#> - Context: none
#> - Passive sensor available: TRUE; randomized probes: FALSE
#> - Substantive justification for each declared edge (cite compliance evidence or pilot data): [to complete]
#>
#> ## 3. Recoverability verdicts
#> - transition kernel (Phi, Psi, contemporaneous network): NOT recoverable; sensitivity analysis (tilt profile) or a calibration design is required
#> - person mean via observed within-person mean: NOT recoverable; biased
#> - person mean via recovered dynamics: NOT recoverable; not available
#> - between-person law (mu, Sigma_mu), person-weighted: NOT recoverable; not recoverable
#> - between-person law, prompt-weighted (pooling answered prompts): NOT recoverable; biased: response rate depends on the person's states
#> - silence test (coefficient of R_t in X_{t+1} ~ X_{t-1} + R_t, within person): non-null expected: silence is informative
#> - sensor-gap test (coefficient of R_t in S_t ~ X_{t-1} + R_t, within person): non-null expected: delta can be calibrated from the sensor gap
#>
#> ## 4. Tests of informativeness
#> - Silence test (666 triples, 106 with a skipped middle prompt; SE: cluster):
#> - NegA: coefficient of R_t = -0.424 (SE 0.112), p = 0.0005
#> - PosA: coefficient of R_t = 0.165 (SE 0.104), p = 0.12
#> - Stress: coefficient of R_t = -0.337 (SE 0.119), p = 0.0075
#> - Fatigue: coefficient of R_t = -0.140 (SE 0.115), p = 0.23
#> - joint test: statistic 15.230 on 4 df, p = 0.01
#> - Sensor-gap test (if a sensor is available): [to complete or state that no sensor exists]
#> - Fatigue check (response rate after answered vs skipped prompt; by study quarter): [to complete]
#>
#> ## 5. Sensitivity analysis
#> - Sensitivity parameter: delta, probit units per unit of NegA; grid {-1, -0.5, 0}; response-model intercept: person
#> - Effective number of complete pairs along the grid: 649, 686, 698 (of 698)
#> - Calibration by the sensor method: delta = -0.899, 95% interval [-Inf, -0.644]
#> - Plausible interval used for the band: [-1.000, 0.000]
#> - Identified set and band over the plausible interval (effects of the self-censoring variable):
#> - Fatigue<-NegA: estimate at delta = 0: -0.030; set [-0.030, -0.007]; band [-0.129, 0.099]; sign change at none on the grid; significance change at none on the grid
#> - NegA<-NegA: estimate at delta = 0: 0.337; set [0.337, 0.396]; band [0.246, 0.506]; sign change at none on the grid; significance change at none on the grid
#> - PosA<-NegA: estimate at delta = 0: -0.063; set [-0.098, -0.063]; band [-0.203, 0.044]; sign change at none on the grid; significance change at none on the grid
#> - Stress<-NegA: estimate at delta = 0: 0.086; set [0.086, 0.104]; band [-0.033, 0.234]; sign change at none on the grid; significance change at none on the grid
#>
#> ## 6. What is reported in the paper
#> - Estimates under the declared graph, the sensitivity band, and this declaration.
# a bare template for a preregistration, written to a file
tf <- tempfile(fileext = ".md")
missingness_declaration(dm_graph(c("M1", "M3")), file = tf)
readLines(tf)[1:12]
#> [1] "# Missingness declaration (silentema)"
#> [2] ""
#> [3] "## 1. Design facts"
#> [4] "- Prompts per day, days, scheduling, and the definition of a scheduled prompt: [to complete]"
#> [5] "- Response rate overall and by person (median, range): [to complete]"
#> [6] "- Whether prompt-level (whole prompt) or item-level missingness occurs: [to complete]"
#> [7] ""
#> [8] "## 2. Declared dynamic missingness graph"
#> [9] "- Motifs: M1 + M3"
#> [10] "- Context: none"
#> [11] "- Passive sensor available: FALSE; randomized probes: FALSE"
#> [12] "- Substantive justification for each declared edge (cite compliance evidence or pilot data): [to complete]"