Stata has been widely used for decades in various research domains such as economics, biosciences, health and social sciences, including clinical trials. It is widely referenced in studies published in reputable scientific journals. While SAS has a longer history of being explicitly referenced by regulatory agencies such as the FDA, Stata can still meet regulatory compliance requirements in clinical trials. StataCorp actively engages with researchers, regulatory agencies, and industry professionals to address compliance needs and provide technical support, thereby maintaining a strong commitment to producing high-quality software and staying up to date with industry standards.
Stata’s commitment to accuracy, comprehensive documentation, integrated versioning, and rigorous certification processes provides researchers with a reliable and compliant statistical software for regulatory submissions. Stata’s worldwide reputation, excellent technical support, verification of data integrity, and ease of obtaining updates further contribute to its suitability for clinical trials and regulatory compliance.
To facilitate regulatory compliance in clinical trials, Stata offers features such as data documentation and audit trails, allowing researchers to document and track data manipulation steps for reproducibility and transparency. Stata’s built-in “do-files” and “log-files” can capture commands and results, aiding in the audit trail process. Stata provides the flexibility to generate analysis outputs and tables in formats commonly required for regulatory reporting (e.g., PDF, Excel, or CSV). It also enables the automation of reproducible, fully-formatted publication standard reports. Strong TLF and CRF programming used to be the domain of SAS which explains their early industry dominance. SAS was developed in 1966 using funding from the National Institutes of Health. In recent years, however, Stata has arguably surpassed what is achievable in SAS with the same efficiency, particularly in the context of clinical trials.
Stata has extensive documentation of adaptive clinical trial design. Adaptive group sequential designs can be achieved using the GSD functionality. The default graphs and tables produced using GSD analysis really do leave SAS in the dust being more visually appealing and easily interpretable. They are also more highly customisable than what can be produced in SAS. Furthermore the Stata syntax used to produce them is minimal compared to corresponding SAS commands, while still retaining full reproducibility.
Stata’s comprehensive causal inference suite enables experimental-style causal effects to be derived from observational data. This can be helpful in planning clinical trials based on observed patient data that is already available, with the process being fully documentable.
Advanced data science methods are being increasingly used in clinical trial design and planning as well as for follow-up exploratory analysis of clinical trial data. Stata has both supervised and unsupervised machine learning capability in its own right for decades. Stata can also integrate with other tools and programming languages, such as Python via PyStata and PyTrials, if additional functionalities or specific formats are needed. This can be instrumental for advanced machine learning and other data science methods goes beyond native features and user-made packages in terms of customisability. Furthermore, using Python within the Stata interface allows for compliant documentation of all analyses. Python integration is also available in SAS via numerous packages and is able to eliminate some of the limitations of native SAS, particularly when it comes to graphical outputs.
Stata for FDA regulatory compliance
While the FDA does not mandate the use of any specific statistical software, they emphasise the need for reliable software with appropriate documentation of testing procedures. Stata satisfies the requirements of the FDA and is recognised as one of the most respected and validated statistical tools for analysing clinical trial data across all phases, from pre-clinical to phase IV trials. With Stata’s extensive suite of statistical methods, data management capabilities, and graphics tools, researchers can rely on accurate and reproducible results at every step of the analysis process.
When it comes to FDA guidelines on statistical software, Stata offers features that assist in compliance. Stata provides an intuitive Installation Qualification tool that generates a report suitable for submission to regulatory agencies like the FDA. This report verifies that Stata has been installed properly, ensuring that the software meets the necessary standards.
Stata offers several key advantages when it comes to FDA regulatory compliance for clinical trials. Stata takes reproducibility seriously and is the only statistical package with integrated versioning. This means that if you wrote a script to perform an analysis in 1985, that same script will still run and produce the same results today. Stata ensures the integrity and consistency of results over time, providing reassurance when submitting applications that rely on data and results from clinical trials.
Stata also offers comprehensive manuals that detail the syntax, use, formulas, references, and examples for all commands in the software. These manuals provide researchers with extensive documentation, aiding in the verification and validity of data and analyses required by the FDA and other regulatory agencies.
To further ensure computational validity, Stata undergoes extensive software certification testing. Millions of lines of certification code are run on all supported platforms (Windows, Mac, Linux) with each release and update. Any discrepancies or changes in results, output, behaviour, or performance are thoroughly reviewed by statisticians and software engineers before making the updated software available to users. Stata’s accuracy is also verified through the National Institute of Standards and Technology (NIST) StRD numerical accuracy tests and the George Marsaglia Diehard random-number generator tests.
Data management in Stata
Stata’s Datasignature commands and other similar features offer powerful tools for data validation, quality control, and documentation. These features enable users to thoroughly examine and understand their datasets, ensuring data integrity and facilitating transparent research practices.
1. Datasignature commands:
Stata’s datasignature commands are a collection of commands in Stata that assists in data validation and documentation. It includes commands such as datasignature, which computes a checksum of the data and reports changes to variable counts, names, order and storage types. These commands help identify unintended changes and potential errors in the data.
2. Variable labelling:
Stata allows users to assign meaningful labels to variables, enhancing data documentation and interpretation. With the `label variable` command, users can provide descriptive labels to variables, making it easier to understand their purpose and content. This feature improves collaboration among researchers and ensures that the dataset remains comprehensible even when shared with others.
3. Value labels:
In addition to variable labels, Stata supports value labels. Researchers can assign descriptive labels to specific values within a variable, transforming cryptic codes into meaningful categories. Value labels enhance data interpretation and eliminate the need for constant reference to codebooks or data dictionaries.
4. Data documentation:
Stata encourages comprehensive data documentation through features like variable and dataset-level documentation. Users can attach detailed notes and explanations to variables, datasets, or even individual observations, providing context and aiding in data exploration and analysis. Proper documentation ensures transparency, reproducibility, and facilitates data sharing within research teams or with other stakeholders.
5. Data transformation:
Stata provides a wide range of data transformation capabilities, enabling users to manipulate variables, create new variables, and reshape datasets. These transformations facilitate data cleaning, preparation, and restructuring, ensuring data compatibility with statistical analyses and modelling procedures.
6. Data merging and appending:
Stata allows users to combine multiple datasets through merging and appending operations. By matching observations based on common identifiers, researchers can consolidate data from different sources or time periods, facilitating longitudinal or cross-sectional analyses. This feature is particularly useful when dealing with complex study designs or when merging administrative or survey datasets.
7. Data export and import:
Stata integrates various file formats, allowing users to import data from external sources or export datasets for further analysis or sharing. Supported formats include Excel, CSV, SPSS, SAS, and more. This versatility enhances data interoperability and enables collaboration with researchers using different software.
These features collectively contribute to data management best practices, ensuring data quality, reproducibility, and documentation. By leveraging the Datasignature Suite and other data management capabilities in Stata, researchers can confidently analyse their data and produce reliable results while maintaining transparency and facilitating collaboration within the scientific community.
Stata and maintaining CDISC standards. How does it compare to SAS?
Stata and SAS are both statistical software packages commonly used in the fields of data analysis, including in the pharmaceutical and clinical research industries. While they share some similarities, there are notable differences between the two when it comes to working with CDISC standards:
- CDISC Support:
SAS has extensive built-in support for CDISC standards. SAS provides specific modules and tools, such as SAS Clinical Standards Toolkit, which offer comprehensive functionalities for CDASH, SDTM, and ADaM. These modules provide pre-defined templates, libraries, and validation rules, making it easier to implement CDISC standards directly within the SAS environment. Stata, on the other hand, does not have native, dedicated modules specifically designed for CDISC standards. However, Stata’s flexibility allows users to implement CDISC guidelines through custom programming and data manipulation.
2. Data Transformation:
SAS has robust built-in capabilities for transforming data into SDTM and ADaM formats. SAS provides specific procedures and functions tailored for SDTM and ADaM mappings, making it relatively straightforward to convert datasets into CDISC-compliant formats. Stata, while lacking specific CDISC-oriented features, offers powerful data manipulation functions that allow users to reshape, merge, and transform datasets. Stata users may need to develop custom programming code to achieve CDISC transformations.
3. Industry Adoption:
SAS has been widely adopted in the pharmaceutical industry and is often the preferred choice for CDISC-compliant data management and analysis. Many pharmaceutical companies, regulatory agencies, and clinical research organisations have established workflows and processes built around SAS for CDISC standards. Stata, although less commonly associated with CDISC implementation, is still a popular choice for statistical analysis across various fields, including healthcare and social sciences. Stata has the potential to make adherence to CDISC standards a more affordable option for small companies and therefore an increased priority.
4. Learning Curve and Community Support:
SAS has a long been the default preference in the context of CDISC compliance and is what statistical programmers are used to, thus SAS is known for its comprehensive documentation and extensive user community. Resources including training materials, user forums, and user groups, which can facilitate learning and support for CDISC-related tasks. Stata also has an active user community and provides detailed documentation, but its community may be comparatively smaller in the context of CDISC-specific workflows. Stata, as a more efficient language, has the potential to reduce the volume of programming required to achieve CDISC compliance, for example in the creation of SDTM and ADaM data sets.
While SAS offers dedicated modules and tools specifically designed for CDISC standards, Stata provides flexibility and powerful data manipulation capabilities that can be leveraged to implement CDISC guidelines. The choice between SAS and Stata for CDISC-related work may depend on factors such as industry norms, organisational preferences, existing infrastructure, and individual familiarity with the software.
SAS has historically been more explicitly associated with regulatory compliance in the clinical trial domain, Stata is however fully equipped to fulfil regulatory requirements and has long been used effectively in clinical research. Researchers often choose the software they are most comfortable with and consider factors such as data analysis capabilities, familiarity, and support when deciding between SAS and Stata for their regulatory compliance needs.
It is important to note that compliance requirements can vary based on specific regulations and guidelines. Researchers are responsible for ensuring their analysis and reporting processes align with the appropriate regulatory standards and should consult relevant regulatory authorities when necessary.
New in Stata 19: Advanced Analytics for Modern Clinical Trials (Update)
With the release of Stata 19, biostatisticians gain a comprehensive suite of tools tailored to the increasingly complex demands of modern medical device and drug development. A major focus of this update is the expansion of causal inference capabilities, which are essential for analysing real-world data (RWD) and observational studies that increasingly support regulatory submissions. Stata 19 introduces commands for conditional average treatment effects (CATE) to explore treatment heterogeneity across patient subgroups, alongside local average treatment effects (LATE), causal mediation with two mediators, and control-function models. For trials facing non-compliance or endogeneity, Stata now offers inference robust to weak instruments, instrumental-variables local-projection IRFs, and SVAR models via instrumental variables, ensuring that causal estimates submitted to regulators are statistically defensible.
Survival analysis and longitudinal modeling, cornerstones of clinical trial endpoints, have also seen significant upgrades. Stata 19 adds the interval-censored multiple-event Cox model, allowing biostatisticians to analyse complex time-to-event data (such as the onset of multiple adverse events) when exact event times are unknown. For panel data and repeated measures, new high-dimensional fixed effects (HDFE) allow researchers to absorb multiple categorical covariates with remarkable speed gains, while the new panel-data vector autoregressive (VAR) model, correlated random-effects (CRE) model, and Mundlak specification test provide deeper insights into patient trajectories over time. Furthermore, literature synthesis for Clinical Evaluation Reports (CERs) under EU MDR/IVDR is enhanced through meta-analysis for correlations.
To address the FDA’s growing acceptance of Bayesian methods and machine learning in regulatory science, Stata 19 integrates directly with H2O for ensemble decision trees (random forests and gradient boosting machines), enabling advanced predictive modeling and subgroup discovery directly within the Stata environment. Bayesian analysis is vastly expanded with Bayesian variable selection for linear models, Bayesian quantile regression, the Bayesian asymmetric Laplace model for simultaneous and multilevel quantile regression, and the Bayesian bootstrap for robust inference in small sample sizes. Rounding out the statistical suite are additions like latent class model-comparison statistics, proportional odds tests, and power analysis for logistic regression.
Finally, Stata 19 introduces critical workflow enhancements that directly support ALCOA+ data integrity principles and audit-readiness. The generation of submission-ready Tables, Listings, and Figures (TLFs) is streamlined with new graphics (including bar graphs with confidence intervals and heat maps) and a unified table creation system that allows for easier tabulations and exporting. Reproducibility and traceability are non-negotiable in regulatory compliance. These are bolstered by Do-file Editor enhancements (autocompletion, templates, and code folding), the ability to modify multiple datasets (frames) without loading them into memory, and seamless import of Parquet data. These updates, alongside continuous StataNow™ features, ensure that clinical trial data management, analysis, and reporting remain transparent, fully documented, and audit-ready for regulatory authorities.
