Package: tidyILD 0.4.1

Alex Litovchenko

tidyILD: Tidy Intensive Longitudinal Data Analysis

A reproducible, tidyverse-style framework for intensive longitudinal data analysis in R, with built-in methodological safeguards, provenance tracking, and reporting tools. Encodes time structure, enforces within-between decomposition, provides spacing-aware lags, and integrates diagnostics and visualization. Use ild_prepare(), ild_center(), ild_lag(), and related functions for a unified pipeline from raw EMA/diary data to interpretable models.

Authors:Alex Litovchenko [aut, cre]

tidyILD_0.4.1.tar.gz
tidyILD_0.4.1.zip(r-4.7-any)tidyILD_0.4.1.zip(r-4.6-any)tidyILD_0.4.1.zip(r-4.5-any)
tidyILD_0.4.1.tgz(r-4.6-any)tidyILD_0.4.1.tgz(r-4.5-any)
tidyILD_0.4.1.tar.gz(r-4.7-any)tidyILD_0.4.1.tar.gz(r-4.6-any)
tidyILD_0.4.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tidyILD/json (API)

# Install 'tidyILD' in R:
install.packages('tidyILD', repos = c('https://alitovchenko.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/alitovchenko/tidyild/issues

Datasets:
  • ema_example - Example EMA-style intensive longitudinal dataset

On CRAN:

Conda:

6.22 score 22 scripts 311 downloads 98 exports 41 dependencies

Last updated from:74c1166ed2. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK269
source / vignettesOK286
linux-releaseOK258
macos-releaseOK251
macos-oldrelOK278
windows-develOK159
windows-releaseOK143
windows-oldrelOK190
wasm-releaseOK155

Exports:as_ildaugment_ild_modelaugment.ild_lmeguardrail_registryild_acfild_alignild_as_tsibbleild_augmentild_augment_schemaild_augment_statesild_autoplotild_brmsild_brms_dynamics_formulaild_build_msm_historyild_bundleild_centerild_center_plotild_check_lagsild_circadianild_compare_fitsild_compare_pipelinesild_crosslagild_ctsemild_decompositionild_design_checkild_diagnoseild_diagnosticsild_diagnostics_bundleild_export_provenanceild_fitild_heatmapild_heterogeneityild_heterogeneity_stratifiedild_historyild_ipcw_weightsild_iptw_msm_weightsild_iptw_weightsild_ipw_essild_ipw_refitild_ipw_weightsild_joint_msm_weightsild_kfasild_lagild_lmeild_manifestild_metaild_methodsild_missing_biasild_missing_cohortild_missing_complianceild_missing_hazard_firstild_missing_modelild_missing_patternild_missingness_reportild_msm_balanceild_msm_bootstrapild_msm_contrast_over_timeild_msm_diagnoseild_msm_estimandild_msm_fitild_msm_history_specild_msm_overlap_plotild_msm_recoveryild_msm_simulate_scenarioild_panel_lag_prepareild_person_distributionild_person_modelild_plotild_plot_filtered_vs_smoothedild_plot_forecastild_plot_predicted_trajectoryild_plot_statesild_powerild_prepareild_prior_ildild_provenanceild_recovery_metricsild_reportild_robust_seild_simulateild_spacingild_spacing_classild_spaghettiild_summaryild_tidyild_tidy_schemaild_tidy_statesild_tsibble_metaild_tvemild_tvem_plotis_ildis_ild_diagnostics_bundlenew_ild_diagnostics_bundleplot_ild_diagnosticstidy_ild_modeltidy_ild_msm_bootstraptidy.ild_lmevalidate_ild

Dependencies:bootclicpp11dplyrfarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclelme4lubridatemagrittrMASSMatrixmgcvminqanlmenloptrpillarpkgconfigR6rbibutilsRColorBrewerRcppRcppEigenRdpackreformulasrlangS7scalestibbletidyselecttimechangeutf8vctrsviridisLitewithr

Glossary and quick-start checklist
Glossary of main functions | Quick-start checklist | Wide input (strict and explicit) | Comparison with generic workflows

Last update: 2026-04-29
Started: 2026-02-11

Bayesian dynamics recipes (ild_brms)
Prerequisites | Recipe 1: Random slope for a lagged predictor | Recipe 2: Bivariate lag sketch (two variables) | Recipe 3: Multivariate outcomes with mvbind (sketch) | See also

Last update: 2026-04-11
Started: 2026-04-06

Specialist backends: when to move beyond the default stack
Contract: what tidyILD owns vs what it does not | Decision table | Handoff pattern: export after prepare, center, and lag | Code stubs (not evaluated) | dynamite (multivariate dynamic models) | PGEE (penalized GEE / high-dimensional longitudinal) | lavaan / blavaan (DSEM) | See also

Last update: 2026-04-11
Started: 2026-04-11

Temporal dynamics: choosing a model for ILD
Three axes before you fit anything | Decision flow (conceptual) | Feature map | Minimal examples | Further reading

Last update: 2026-04-11
Started: 2026-04-06

Visualization in tidyILD
Role of visual inspection | Map: question → function → bundle section (if any) | Example: spaghetti, predicted trajectories, facet by cluster | Recipe: facet panels without a dedicated helper | Partial effects for _wp and _bp (external packages) | See also

Last update: 2026-04-06
Started: 2026-04-06

Heterogeneity and person-specific effects
Estimands: population, partial pooling, and no pooling | ild_heterogeneity() | Diagnostics bundle and plots | Stratified descriptive comparison | See also

Last update: 2026-04-06
Started: 2026-04-06

Missingness in ILD: diagnostics and sensitivity routes
Why missingness matters in intensive longitudinal data | Types of missingness (useful labels) | Descriptive profiling: ild_missing_pattern() and heatmaps | Person-level compliance: ild_missing_compliance() | When to use ild_missing_model() and ild_missing_bias() | Complete-case vs mixed models (careful wording) | Cohort-level and hazard summaries | One entry point: ild_missingness_report() | MNAR as sensitivity (no single fix) | IPW and causal tools as one sensitivity route | Other templates (not evaluated here) | What tidyILD does not do (and where to look) | See also

Last update: 2026-04-06
Started: 2026-04-06

Within-between decomposition and handling irregular spacing
Within-between decomposition | Irregular spacing and lags | Spacing classification

Last update: 2026-04-06
Started: 2026-02-11

Choosing between lme/nlme, brms, KFAS, and ctsem
Decision axes | Comparison table | Short pointers to other vignettes | See also

Last update: 2026-04-06
Started: 2026-03-21

From raw data to model with tidyILD
Simulate and prepare | Inspect | Within-person centering and lags | Fit a model | Diagnostics and plots | MSM-style weights (IPTW and IPCW) — optional | Reproducibility

Last update: 2026-04-06
Started: 2026-02-11

Simulation benchmarks: recovery and power
Simulation size and precision | What ild_simulate() encodes | Fixed-effect recovery with ild_power(..., return_sims = TRUE) | From recovery to power | Variance components (illustrative snapshot) | AR(1) in the DGP vs residual correlation in the fit | Bayesian and state-space extensions | Cross-backend validation harness (optional) | Limitations and scope | See also

Last update: 2026-04-06
Started: 2026-03-22

Continuous-Time Dynamics with ctsem in tidyILD
When to use ild_ctsem() | Minimal workflow | Diagnostics and plots | Guardrails and reporting | Notes

Last update: 2026-03-31
Started: 2026-03-31

MSM Identification and Recovery in tidyILD
Why this vignette exists | Identification assumptions | Estimand-first + history-builder workflow (v1) | Recovery harness | Inference caveats and strict mode | Notes on v1 scope

Last update: 2026-03-31
Started: 2026-03-31

Short analysis report
1. Fit model(s) | 2. Tidy fixed-effects table | 3. Fitted vs observed | 4. Residual diagnostics: ACF and Q-Q | With AR1 (nlme) | Time-varying effects (TVEM)

Last update: 2026-03-23
Started: 2026-03-05

Tsibble interoperability
Ingesting a tsibble with ild_prepare() | What provenance is kept | How to inspect | Round-trip with ild_as_tsibble() | Limitations and policy

Last update: 2026-03-21
Started: 2026-03-21

Irregular measurement and latent state tracking
Motivation | What ild_kfas() assumes today | irregular_time and guardrails | Workflow sketch | Where to go next

Last update: 2026-03-21
Started: 2026-03-21

State-space modeling in tidyILD with KFAS
What is a state-space model? | When use this instead of mixed-model residual correlation? | Filtered vs smoothed states | Minimal example | What the backend does not yet do | See also

Last update: 2026-03-21
Started: 2026-03-21

Developer contracts (package standards)
See also

Last update: 2026-03-21
Started: 2026-03-21

Reproducible ILD workflows with tidyILD provenance
1. Prepare data | 2. Center and lag | 3. Fit model | 4. Run diagnostics | 5. Inspect ild_history() | 6. Generate ild_methods() | 7. Run ild_report() | 8. Export provenance | 9. Compare two pipelines

Last update: 2026-03-07
Started: 2026-03-07

Readme and manuals

Help Manual

Help pageTopics
tidyILD: Tidy Intensive Longitudinal Data AnalysistidyILD-package tidyILD
Coerce to ILD objectas_ild
Augment an ILD model fit with fitted values and residualsaugment_ild_model
Tidy and augment ild_lme fits with broom.mixedaugment.ild_lme broom_ild_lme tidy.ild_lme
Example EMA-style intensive longitudinal datasetema_example
Guardrail rule registry (analysis safety layer)guardrail_registry
Autocorrelation function for ILD variables or model residualsild_acf
Align a secondary stream to primary ILD within a time windowild_align
Convert an ILD object to a tsibbleild_as_tsibble
Augment observations with fitted values and residuals (S3 generic)ild_augment ild_augment.brmsfit ild_augment.default ild_augment.ild_fit_ctsem ild_augment.ild_fit_kfas ild_augment.lme ild_augment.lmerMod
Column dictionary for 'ild_augment()' outputsild_augment_schema
Per-row latent states (long format) for complex multi-state modelsild_augment_states
Autoplot for ILD model fits or diagnostics (S3 generic)ild_autoplot ild_autoplot.brmsfit ild_autoplot.default ild_autoplot.ild_diagnostics ild_autoplot.ild_diagnostics_bundle ild_autoplot.ild_fit_ctsem ild_autoplot.ild_fit_kfas ild_autoplot.lme ild_autoplot.lmerMod
Fit a Bayesian mixed model to ILD data with 'brms'ild_brms
Template brms formula for person-varying lag slopeild_brms_dynamics_formula
Build MSM lagged history columns from a specild_build_msm_history
Bundle a result with a reproducibility manifestild_bundle
Within-person and between-person decomposition (centering)ild_center
Standalone WP/BP centering plotild_center_plot
Check lag variable validity (gap-aware)ild_check_lags
Time-of-day pattern plot for ILD (circadian-style)ild_circadian
Compare fitted models (AIC, BIC, nobs)ild_compare_fits
Compare provenance of two objects and report differencesild_compare_pipelines
Cross-lag model: lag predictor then fit outcome ~ lagild_crosslag
Fit a continuous-time state-space model via ctsemild_ctsem
Within-person and between-person variance decompositionild_decomposition
ILD design diagnostics: spacing, WP/BP, missingness, and recommendationsild_design_check
Engine-agnostic diagnostics façadeild_diagnose ild_diagnose.brmsfit ild_diagnose.default ild_diagnose.ild_fit_ctsem ild_diagnose.ild_fit_kfas ild_diagnose.lme ild_diagnose.lmerMod
Residual diagnostics for an ILD modelild_diagnostics
Canonical ILD diagnostics bundleild_diagnostics_bundle is_ild_diagnostics_bundle new_ild_diagnostics_bundle
Standalone diagnostics utilities and bundle section providersild_diagnostics_utilities
Export provenance to a JSON or YAML fileild_export_provenance
Fit a mixed model to ILD data (unified entry point)ild_fit
ILD heatmap (alias for ild_plot with type = "heatmap")ild_heatmap
Heterogeneity and person-specific effects from mixed modelsild_autoplot.ild_heterogeneity ild_heterogeneity ild_heterogeneity.brmsfit ild_heterogeneity.lme ild_heterogeneity.lmerMod ild_heterogeneity_stratified ild_tidy.ild_heterogeneity
Print a human-readable log of preprocessing or analysis stepsild_history
Inverse probability of censoring weights (IPCW) for monotone dropoutild_ipcw_weights
Sequential MSM inverse probability of treatment weights (IPTW for A_t)ild_iptw_msm_weights
Inverse probability of treatment weights (IPTW)ild_iptw_weights
Effective sample size from weightsild_ipw_ess
Refit an ILD model with inverse-probability weights (sensitivity analysis)ild_ipw_refit
Compute inverse-probability-of-observation weights from a missingness modelild_ipw_weights
Joint MSM weights from IPTW and IPCW componentsild_joint_msm_weights
Fit a Gaussian state-space model via KFAS (single-subject ILD)ild_kfas
Spacing-aware lag within personild_lag
Fit a linear mixed-effects model to ILDild_lme
Create a reproducibility manifestild_manifest
Get ILD metadata attributesild_meta
Generate methods-style narrative from provenanceild_methods
Test whether missingness is associated with a predictor (informative missingness)ild_missing_bias
Cohort-level fraction observed by occasion indexild_missing_cohort
Person-level missingness compliance for one outcomeild_missing_compliance
Discrete hazard of first missing outcome on an ordinal scheduleild_missing_hazard_first
Fit a model for missingness (diagnostic / sensitivity)ild_missing_model
Summarize missingness pattern in ILDild_missing_pattern
Missingness workflow report (orchestration)ild_missingness_report
Covariate balance (weighted SMD) for MSM / IPWild_msm_balance
Cluster bootstrap inference for weighted 'lmer' (MSM / IPW sensitivity)ild_msm_bootstrap
Compute MSM contrasts over time from a fitted weighted modelild_msm_contrast_over_time
Diagnose an 'ild_msm_fit' result in one callild_msm_diagnose
Define an MSM estimand specificationild_msm_estimand
Fit an MSM-style weighted mixed model from an estimand specild_msm_fit
Build a declarative MSM history specificationild_msm_history_spec
Propensity overlap plot (pooled or sequential MSM IPTW)ild_msm_overlap_plot
MSM recovery simulation harnessild_msm_recovery
Simulate a simple longitudinal MSM scenarioild_msm_simulate_scenario
Prepare several lag columns and audit themild_panel_lag_prepare
Plot distribution of person-level estimates from ild_person_modelild_person_distribution
Fit a model separately per person (N-of-1 / idiographic)ild_person_model
ILD-specific plotsild_plot
Plot filtered vs smoothed state (first state)ild_plot_filtered_vs_smoothed
Plot forecast or future simulation (stub when no horizon)ild_plot_forecast
Observed and fitted values vs time (trajectory overlay)ild_plot_predicted_trajectory
Plot smoothed latent states (first state by default)ild_plot_states
Simulation-based power analysis for a fixed effect in ILD modelsild_power
Prepare a data frame as an ILD (intensive longitudinal data) objectild_prepare
Prior specifications for common ILD mixed modelsild_prior_ild
Return the raw provenance objectild_provenance
Recovery metrics from simulation replicationsild_recovery_metrics
Assemble a light report from a model fitild_report
Cluster-robust variance-covariance matrix for ILD model fitsild_robust_se
Simulate simple ILD for examples, tests, and power analysisild_simulate
Spacing diagnostics and correlation-structure recommendationild_spacing
Classify spacing as regular-ish vs irregular-ishild_spacing_class
ILD spaghetti / person trajectories (alias for ild_plot with type = "trajectory")ild_spaghetti
One-shot summary of an ILD objectild_summary
Tidy fixed effects from an ILD model fit (S3 generic)ild_tidy ild_tidy.brmsfit ild_tidy.default ild_tidy.ild_fit_ctsem ild_tidy.ild_fit_kfas ild_tidy.lme ild_tidy.lmerMod
Column dictionary for ild_tidy() outputsild_tidy_schema
Tidy per-time state summaries for ild_kfasild_tidy_states
Tsibble provenance from an ILD objectild_tsibble_meta
Fit a time-varying effects model (TVEM) for ILDild_tvem
Plot the time-varying coefficient from a TVEM fitild_tvem_plot
Check if an object is a valid ILD tibbleis_ild
Plot diagnostics from an ild_diagnostics objectplot_ild_diagnostics
Tidy fixed effects from an ILD model fittidy_ild_model
Tidy fixed effects from 'ild_msm_bootstrap'tidy_ild_msm_bootstrap
Validate an ILD object and error if invalidvalidate_ild