Definition, scope, and accountability boundaries
Clinical data management and statistical analysis is the professional service that turns protocol-defined observations into a complete, traceable, interpretable dataset and uses prespecified methods to answer research questions. Data management includes collection design, ingestion, coding, review, queries, cleaning, standardization, finalization, retention, and delivery. Statistical work includes design support, sample size, randomization, estimands, analysis populations, models, sensitivity analyses, presentation, and reproducibility. Within WSIC 6.5.2, “Subject and Sample Management,” the object is the research data and its evidence chain, not participant recruitment, sample testing, clinical diagnosis, or software hosting alone.
Investigators, sponsors, data managers, statisticians, programmers, medical monitors, central laboratories, imaging or sleep-reading centers, and technology providers have distinct responsibilities. A statistician cannot use a model to repair erroneous source data, and a data manager cannot reinterpret a clinical event without medical and protocol authority. Outsourcing does not transfer final responsibility for participant safety, protocol compliance, data reliability, or result reporting. Automated checks, machine learning, and generative tools may help identify issues, but their outputs require validation and human oversight proportionate to risk.
The scope should be fixed in a data management plan, statistical analysis plan, transfer specifications, programming conventions, and responsibility matrix. Agreements need to define sources, systems, standards, deliverables, milestones, blinding, query authority, medical coding, external data, randomization and interim-analysis interfaces, quality indicators, ownership of software and code, subcontracting, audit, security, retention, and exit. Exploratory analysis, confirmatory inference, regulatory submission, academic publication, and internal decision support carry different requirements; the phrase “statistical support” is not enough to define purpose or evidentiary level.
Protocol, data standards, and analytical prespecification
Sound data work begins in protocol design, not with cleaning after the final visit. The question should define the population, treatment or exposure, comparator, outcome, observation period, and relevant post-randomization or post-baseline events. Primary, secondary, and exploratory variables need operational definitions. The statistical analysis plan should be finalized before access to unblinded results that could influence choices and should specify populations, derivations, baseline, visit windows, covariates, strata, models, tests, confidence intervals, missing data, outliers, multiplicity, interim analyses, and sensitivity analyses. Later changes require the date, rationale, decision maker, and whether results had been seen.
Data standards should connect collection through analysis. A case report form or electronic acquisition tool should collect what is needed for protocol and safety questions and define each field's name, meaning, type, unit, permitted values, time basis, missing reason, and origin. Standard acquisition, tabulation, and analysis models can improve cross-system traceability, but the project needs versions acceptable for its intended use and documented implementation. Renaming a field to match a standard does not correct a faulty definition, wrong unit, or inconsistent observation window.
Sample-size and analytical methods should reflect design, effect size, variability, event frequency, clustering or repeated observations, attrition, and intended use, with critical assumptions and uncertainty disclosed. Randomization sequences, allocation concealment, and maintenance of the blind need independent control. Access to unblinded data, people, and time points should be minimized and logged. If an independent monitoring committee or interim decision is used, its charter, independence, information flow, stopping or adaptation rules, and control of statistical error and operational bias should be defined in advance.
Data capture, integration, and sleep-specific characteristics
Clinical studies may combine electronic case reports, health records, participant-reported outcomes, laboratories, drug or device systems, images, audio, diaries, wearables, and sensors. Each record should preserve participant, visit or time point, origin, acquisition method, device and software version, unit, time zone, creator and modifier, and necessary metadata. Automated transfers need checks of counts, keys, ranges, times, and integrity; manual transcription requires risk-based verification. Interface failures, duplicates, late arrivals, partial files, clock drift, and reprocessed versions must remain identifiable rather than letting the most recently received file silently replace its predecessor.
Sleep data often cross midnight and time zones and may encounter daylight-saving changes, so calendar date, local time, coordinated universal time, and time relative to sleep onset or awakening should remain distinct. Polysomnography combines continuous signals, channel and sensor information, stages and event annotations, quality flags, and summary indices. Actigraphy and wearable data add wear state, sampling rate, raw signals, algorithm version, and diary boundaries. Signal-to-annotation alignment, channel units, valid recording intervals, and scoring rules should be checked. A summary value cannot replace the source signals, annotations, and rules that produced it.
The same named sleep metric may differ by sensor, montage, sampling, sleep-time or recording-time denominator, event threshold, scoring version, and manual review. Device nonwear is not automatically wakefulness, and algorithmic sleep is not identical to laboratory scoring. Scheduled bedtime, time in bed, attempted sleep, sleep onset, and final awakening should not be collapsed. Multinight, bilateral, and multichannel data are hierarchical and temporally correlated; the statistical unit may be a participant, night, interval, signal segment, or event. Treating thousands of segments as independent participants creates pseudoreplication and false precision.
Review, queries, and database finalization
Data review should follow importance and risk rather than pursue zero error in every field. Automated rules and human review may examine completeness, range, temporal order, cross-form consistency, duplicates, unusual trends, protocol deviations, safety events, randomization, external reconciliation, and critical outcomes. Rules need versions, testing, and management of false alerts. A center difference, extreme value, or statistical anomaly is an investigation signal, not automatic proof of error or misconduct. A rare but genuine observation should not be removed to make a distribution look tidier.
Queries should be specific, nonleading, and traceable, retaining the original value, changed value, reason, originator, respondent, and time. Correction of a source record, correction of a case report form, statistical derivation, and medical coding are different operations, and no change should obscure the original record. Laboratory, reading-center, device, and electronic participant-reported data require reconciliation by critical keys and version, with material mismatches escalated. Coding dictionary and version, automated suggestions, manual adjudication, and merge or split rules are also part of analytical reproducibility.
Before a freeze or lock, planned checks, queries, important deviations and safety reconciliation, blinded review, external confirmation, coding finalization, and analysis-readiness assessment should be completed and approved by authorized roles. Lock is not a declaration that data are perfect; it records that prespecified analysis standards have been met subject to known limitations. Unlocking requires a controlled reason, impact assessment, authorization, and relock history. Analysis snapshots, transfer files, programs, metadata, and lock state must correspond so that one report does not inadvertently combine versions.
Statistical estimation, missingness, and uncertainty
Analysis should center on a defined estimand, not merely the choice of a test. In a randomized study, the question should specify population, treatment conditions, outcome variable, population-level summary, and how discontinuation, rescue treatment, crossover, adherence change, or death enters the question. Observational research also needs to address confounding, selection, measurement error, time-varying exposure, and reverse causation. Model choice should reflect the design and data structure, and its assumptions should be checked. A significance value does not replace effect size, interval, uncertainty, or clinical relevance.
Missingness should first be described by reason, time, group, center, and variable, distinguishing not scheduled, not collected, device failure, invalid recording, withdrawal, loss to follow-up, structural inapplicability, and below-measurement capability. Assumptions about the missing-data mechanism in the primary analysis should be explicit, and sensitivity analyses should test whether conclusions withstand plausible alternatives. Complete-case deletion, last observation carried forward, or a single imputation is not universally valid. Imputation models, auxiliary variables, randomness, and combination rules need documentation. Outlier handling likewise calls for prespecification, source review, and comparisons with and without the observation.
Repeated measures, multiple nights, centers, families, paired body sites, or many signal segments require correlation and clustering to be reflected. Multiple outcomes, time points, subgroups, models, and repeated looks increase chance findings; confirmatory conclusions need a prespecified hierarchy or suitable multiplicity control. Subgroup analysis should report interaction, uncertainty, and prior rationale rather than claim a difference because one group is significant and another is not. Model failure, convergence problems, small samples, protocol departures, and analytical choices should be disclosed instead of presenting only the most favorable result.
Presentation, reproducibility, and data sharing
Tables, figures, and listings should trace to analysis data, standardized data, and source. Outputs need the analysis population, denominator, unit, model, adjustments, amount of missing data, estimate, interval, and necessary test, together with participant flow, baseline, intervention or exposure delivery, safety, and adverse events. Randomized and observational studies should use reporting guidance suited to their design, but a checklist improves transparency; it does not repair weak design or transform weak evidence into strong evidence. Exploratory, post hoc, and data-driven findings must be labeled accordingly.
A reproducibility package commonly includes the final protocol and analysis plan, data-management and analysis specifications, dictionaries, controlled terms, source-to-analysis mappings, programs and dependency versions, run logs, quality-control records, and an output index. Critical analyses can be checked through independent programming, double programming, or risk-based review. Exact duplication is not the only valid method, but review scope and discrepancy resolution need records. Dynamic reports, interactive graphics, and machine-learning models also require input snapshots, settings, random seeds, training and test splits, and model versions so that later reviewers can reconstruct rather than merely view the output.
Sharing must align with consent, ethics approval, law, funder policy, and use restrictions. De-identified sleep signals, precise times, location, or device traces may still permit re-identification, so open access is not automatically the safest default. Risk-based controls may include managed repositories, request review, data-use agreements, least privilege, and output checking. A shared package should contain enough metadata and version information for interpretation but no unnecessary direct or indirect identifiers. Negative findings, deviations, and limitations on code should also be reported; selective sharing reduces the value of independent review.
Procurement oversight, change, and exit delivery
Procurement of data-management or statistical services should assess people, methods, systems, and governance in project-like scenarios rather than compare only software brands, automation percentages, or price. Due diligence may examine experience in similar designs, qualifications and independence, validation evidence, standard versions, programming and statistical review, escalation, security, continuity, subcontracting, and inspection support. A pilot should exercise cross-midnight times, late external data, duplicates, blinded data, coding changes, query closure, lock, and rerun to test interfaces and accountability.
Changes to protocol, forms, devices, algorithms, scoring rules, dictionaries, data standards, statistical models, software, or providers require impact assessment. Before adoption, the project should consider existing data, randomization, blinding, sample size, primary outcomes, and comparability and use migration, retrospective reprocessing, bridging, or plan revision where needed. An urgent safety change may precede full documentation, but it still requires prompt recording and review. Keeping only the newest file while deleting earlier versions destroys the ability to reconstruct research decisions and results.
At service end, delivery should include reconciled data and definitions, every applicable version, query and deviation status, coding, transfer inventories, lock and unlock history, analysis data, programs, logs, quality-control evidence, controlled randomization and blinding materials, reports, and open issues. The recipient should verify counts, hashes or other integrity identifiers, readability, execution environment, and reproducibility. The former provider should handle accounts, keys, copies, and retention obligations as agreed. An exit clause requiring only a final spreadsheet, without source-to-result lineage, code, metadata, and software dependencies, leaves the study difficult to audit, update, or reproduce.