Searcharxiv⌕ Search

arXiv subjects

Tom Palmer

Publications and source records attributed to Tom Palmer.

3 recordsLinked to original sources

One-Sample Mendelian Randomization and Instrumental Variable Analyses in R and Stata: The OneSampleMR and ivonesamplemr Packages

Mendelian randomization (MR) uses genetic variants as instrumental variables (IVs) to estimate the causal effect of an exposure on an outcome. When individual-level data on the instruments, exposure, and outcome are available in a single sample (one-sample MR), a range of IV estimators can be used beyond the standard two-stage least squares estimator, including structural mean models (SMMs) and two-stage predictor substitu- tion (TSPS) and two-stage residual inclusion (TSRI) estimators with nonlinear second stage models. These estimators are important when the outcome is binary, where in- vestigators typically wish to report causal risk ratios or causal odds ratios. However, implementations of these estimators are scattered across software packages and are of- ten unavailable with standard errors that account for the estimation of the first stage. We describe two packages which implement these estimators: OneSampleMR for R and ivonesamplemr for Stata. Both packages fit the multiplicative and logistic SMMs and TSPS and TSRI estimators with identity, log-additive, log-multiplicative, and logit links using the generalized method of moments (GMM), so that the standard errors account for the uncertainty in both stages of estimation. OneSampleMR additionally provides the Sanderson-Windmeijer conditional F-statistic for assessing instrument strength in models with multiple exposures, and ivonesamplemr additionally provides prefix commands for moving window and within-quantile estimation for exploring nonlinear exposure-outcome relationships. We illustrate both packages using the same simulated dataset and show that they give the same estimates as each other and as existing implementations.

stat.ME↗

Compile-time Security Analysis and Optimization of Sensitive String Producers

Content composition vulnerabilities remain among the most prevalent and persistent classes of security weakness in deployed software. Prior mitigations, including developer training, static analysis tools, and domain-specific template languages, each face diminishing returns; AI code generation inherits these limitations and introduces new ones, reproducing insecure patterns from training data and lacking reliable context for self-correction. This paper introduces a general framework for secure content composition that extends across content languages and integrates directly into general-purpose programming languages via additive changes to string expression syntax. We define a language design goal of minimizing the lexical distance between secure and insecure idioms, and show that this goal admits practical compilation strategies: static analyses specified in terms of dynamic semantics, runtime performance approaching naïve string concatenation, and developer-facing diagnostics surfaced as compile-time errors or warnings. The approach enables an effective division of labor: security engineers encode composition hazards in libraries once; developers and AI coding agents select the appropriate library primitive to implement features correctly without needing to internalize specialist security knowledge; compiler diagnostics provide objective, position-keyed feedback that grounds both human review and iterative AI self-correction; and security responders focus on keeping libraries current rather than auditing ad-hoc security decisions distributed across a codebase.

cs.PL↗

A review of problem- and team-based methods for teaching statistics in Higher Education

The teaching of statistics in higher education in the UK is still largely lecture-based. This is despite recommendations such as those given by the American Statistical Association's GAISE report that more emphasis should be placed on active learning strategies where students take more responsibility for their own learning. One possible model is that of collaborative learning, where students learn in groups through carefully crafted `problems', which has long been suggested as a strategy for teaching statistics. In this article, we review two specific approaches that fall under the collaborative learning model: problem- and team-based learning. We consider the evidence for changing to this model of teaching in statistics, as well as give practical suggestions on how this could be implemented in typical statistics classes in Higher Education.

stat.OT↗