SearcharxivSearch

arXiv subjects

Robin Denz

Publications and source records attributed to Robin Denz.

8 recordsLinked to original sources

The Symmetric Pair Matching Design: A Self-Controlled Method with Automatic Adjustment for Time Effects

Self-controlled study designs eliminate confounding by individual-level characteristics that remain constant during the observation time and are thus widely used in pharmacoepidemiology and vaccine safety research. However, existing methods remain vulnerable to time effects, including temporal trends and seasonality in the exposure or outcome, unless these are explicitly modeled or controlled through the study design. We introduce the symmetric pair matching design (SPM), a novel self-controlled method that combines design-based adjustment for time effects with automatic control of time-invariant confounding. Unlike previous design-based approaches that account for time effects, SPM uses observation time both before and after event occurrence, thereby retaining a larger proportion of the available information. We derive the theoretical properties of the method and evaluate its finite-sample performance through simulations. In the simulations, SPM produced unbiased estimates in the presence of temporal trends in both the outcome and exposure, while maintaining greater or comparable statistical efficiency than existing approaches. SPM extends the family of self-controlled methods by providing design-based control of time effects without requiring explicit modeling thereof. By combining robustness to temporal confounding with efficient use of observation time, SPM offers a practical alternative for observational studies with transient exposures. An accompanying R package is provided to facilitate its usage in applied research.

stat.ME

Causal Mediation Analysis with a Time-Dependent Mediator, Time-Dependent Confounders and a Time-to-Event Outcome: Revisiting the Difference Method

Mediation analysis is a powerful tool to decompose treatment effects into direct and indirect components, enabling explanations of total treatment effects in a formal statistical framework. However, applying such analyses to settings with time-to-event outcomes, time-dependent mediators and confounders remains challenging. Existing methods are statistically complex, computationally intensive, and rarely available in user-friendly software. The difference method offers a simple alternative, but its performance in this setting has not been systematically evaluated. We conducted a simulation study and real-world data analysis to fill this gap in the literature. Using Cox proportional hazards, Aalen additive hazards, and accelerated failure time (AFT) models with time-varying covariates, the difference method was compared across different data generation processes with time-dependent mediators and confounders, focusing on bias in estimated indirect effects. The parametric mediational g-formula was used as benchmark comparator. If correctly specified, the Aalen model based difference method produced unbiased estimates in the absence of a time-dependent confounder that was directly caused by the treatment. Similar results were obtained when using the Cox model based difference with rare outcomes, but not with common outcomes. The AFT model based difference method was biased in almost all scenarios, due to collapsibility issues. Only the parametric mediational g-formula was unbiased in all scenarios. In contrast to specialized methods, the difference method requires additional, often unrealistic, assumptions, such as the absence of a direct causal relationship of the treatment on time-dependent confounders. If those assumptions hold, however, it may be used as a simple and efficient alternative.

stat.ME

Simulating Complex Crossectional and Longitudinal Data using the simDAG R Package

Generating artificial data is a crucial step when performing Monte-Carlo simulation studies. Depending on the planned study, complex data generation processes (DGP) containing multiple, possibly time-varying, variables with various forms of dependencies and data types may be required. Simulating data from such DGP may therefore become a difficult and time-consuming endeavor. The simDAG R package offers a standardized approach to generate data from simple and complex DGP based on the definition of structural equations in directed acyclic graphs using arbitrary functions or regression models. The package offers a clear syntax with an enhanced formula interface and directly supports generating binary, categorical, count and time-to-event data with arbitrary dependencies, possibly non-linear relationships and interactions. It additionally includes a framework to conduct discrete-time based simulations which allows the generation of longitudinal data on a semi-continuous time-scale. This approach may be used to generate time-to-event data with both recurrent or competing events and possibly multiple time-varying covariates, which may themselves have arbitrary data types. In this article we demonstrate the vast amount of features included in simDAG by replicating the DGP of multiple real Monte-Carlo simulation studies.

stat.ME

ChatGPT Code Detection: Techniques for Uncovering the Source of Code

In recent times, large language models (LLMs) have made significant strides in generating computer code, blurring the lines between code created by humans and code produced by artificial intelligence (AI). As these technologies evolve rapidly, it is crucial to explore how they influence code generation, especially given the risk of misuse in areas like higher education. This paper explores this issue by using advanced classification techniques to differentiate between code written by humans and that generated by ChatGPT, a type of LLM. We employ a new approach that combines powerful embedding features (black-box) with supervised learning algorithms - including Deep Neural Networks, Random Forests, and Extreme Gradient Boosting - to achieve this differentiation with an impressive accuracy of 98%. For the successful combinations, we also examine their model calibration, showing that some of the models are extremely well calibrated. Additionally, we present white-box features and an interpretable Bayes classifier to elucidate critical differences between the code sources, enhancing the explainability and transparency of our approach. Both approaches work well but provide at most 85-88% accuracy. We also show that untrained humans solve the same task not better than random guessing. This study is crucial in understanding and mitigating the potential risks associated with using AI in code generation, particularly in the context of higher education, software development, and competitive programming.

cs.LG

adjustedCurves: Estimating Confounder-Adjusted Survival Curves in R

Kaplan-Meier curves stratified by treatment allocation are the most popular way to depict causal effects in studies with right-censored time-to-event endpoints. If the treatment is randomly assigned and the sample size of the study is adequate, this method produces unbiased estimates of the population-averaged counterfactual survival curves. However, in observational studies, this is no longer the case. Instead, specific methods that allow adjustment for confounding must be used. We present the \texttt{adjustedCurves} \textbf{R} package, which can be used to estimate and plot these confounder-adjusted survival curves using a variety of methods from the literature. It provides a convenient wrapper around existing \textbf{R} packages on the topic and adds additional methods and functionality on top of it, uniting the sometimes vastly different methods under one consistent framework. Among the additional features are the estimation of confidence intervals, confounder-adjusted restricted mean survival times and confounder-adjusted survival time quantiles. After giving a brief overview of the implemented methods, we illustrate the package using publicly available data from an observational study including 2982 breast cancer.

stat.ME

Impact of Record-Linkage Errors in Covid-19 Vaccine-Safety Analyses using German Health-Care Data: A Simulation Study

With unprecedented speed, 192,248,678 doses of Covid-19 vaccines were administered in Germany by July 11, 2023 to combat the pandemic. Limitations of clinical trials imply that the safety profile of these vaccines is not fully known before marketing. However, routine health-care data can help address these issues. Despite the high proportion of insured people, the analysis of vaccination-related data is challenging in Germany. Generally, the Covid-19 vaccination status and other health-care data are stored in separate databases, without persistent and database-independent person identifiers. Error-prone record-linkage techniques must be used to merge these databases. Our aim was to quantify the impact of record-linkage errors on the power and bias of different analysis methods designed to assess Covid-19 vaccine safety when using German health-care data with a Monte-Carlo simulation study. We used a discrete-time simulation and empirical data to generate realistic data with varying amounts of record-linkage errors. Afterwards, we analysed this data using a Cox model and the self-controlled case series (SCCS) method. Realistic proportions of random linkage errors only had little effect on the power of either method. The SCCS method produced unbiased results even with a high percentage of linkage errors, while the Cox model underestimated the true effect.

stat.ME

Visualizing the (Causal) Effect of a Continuous Variable on a Time-To-Event Outcome

Visualization is a key aspect of communicating the results of any study aiming to estimate causal effects. In studies with time-to-event outcomes, the most popular visualization approach is depicting survival curves stratified by the variable of interest. This approach cannot be used when the variable of interest is continuous. Simple workarounds, such as categorizing the continuous covariate and plotting survival curves for each category, can result in misleading depictions of the main effects. Instead, we propose a new graphic, the survival area plot, to directly depict the survival probability over time and as a function of a continuous covariate simultaneously. This plot utilizes g-computation based on a suitable time-to-event model to obtain the relevant estimates. Through the use of g-computation, those estimates can be adjusted for confounding without additional effort, allowing a causal interpretation under the standard causal identifiability assumptions. If those assumptions are not met, the proposed plot may still be used to depict noncausal associations. We illustrate and compare the proposed graphics to simpler alternatives using data from a large German observational study investigating the effect of the Ankle Brachial Index on survival. To facilitate the usage of these plots, we additionally developed the contsurvplot R-package which includes all methods discussed in this paper.

stat.ME

A Comparison of Different Methods to Adjust Survival Curves for Confounders

Treatment specific survival curves are an important tool to illustrate the treatment effect in studies with time-to-event outcomes. In non-randomized studies, unadjusted estimates can lead to biased depictions due to confounding. Multiple methods to adjust survival curves for confounders exist. However, it is currently unclear which method is the most appropriate in which situation. Our goal is to compare forms of Inverse Probability of Treatment Weighting, the G-Formula, Propensity Score Matching, Empirical Likelihood Estimation and augmented estimators as well as their pseudo-values based counterparts in different scenarios with a focus on their bias and goodness-of-fit. We provide a short review of all methods and illustrate their usage by contrasting the survival of smokers and non-smokers, using data from the German Epidemiological Trial on Ankle-Brachial-Index. Subsequently, we compare the methods using a Monte-Carlo simulation. We consider scenarios in which correctly or incorrectly specified models for describing the treatment assignment and the time-to-event outcome are used with varying sample sizes. The bias and goodness-of-fit is determined by taking the entire survival curve into account. When used properly, all methods showed no systematic bias in medium to large samples. Cox regression based methods, however, showed systematic bias in small samples. The goodness-of-fit varied greatly between different methods and scenarios. Methods utilizing an outcome model were more efficient than other techniques, while augmented estimators using an additional treatment assignment model were unbiased when either model was correct with a goodness-of-fit comparable to other methods. These doubly-robust methods have important advantages in every considered scenario.

stat.ME