← Back to all sparks
J

jstable

INFRA · APIS
Velocity0.0

Create Tables from Different Types of Regression

A clinical table generator paying down years of edge cases in survey-weighted models

biostatisticsr-packageclinical-researchsurvey-weightedregression-tablessurvival-analysis
Current state
jstable turns regression and survival models into the formatted tables medical papers publish, wrapping coxph, glm, geeglm, lmer and their survey-weighted counterparts. The recent line is almost entirely correction work, concentrated in two places: the .display family and the TableSubgroup family. Version 1.3.25 alone fixed quasibinomial support for survey-weighted logistic regression, automatic factor-to-numeric outcome conversion for svyglm, weighted-versus-original sample counts in the n row, data.table input handling, and Overall column labelling.
Where it's heading
Each CRAN release bundles several GitHub patch versions, so the notes read as rolled-up fix lists rather than feature announcements. The substantive thread is pcut.univariate, introduced across seven display functions in 1.3.11 to allow multivariable analysis restricted to significant variables, and repaired repeatedly since as it collided with interaction terms, single-variable selections, clustered models and data.table inputs. The survey-weighted path is the other recurring source: counts, labels and family handling that worked for unweighted data kept failing once weights were involved.
Prediction
Expect further patches in the survey-weighted subgroup functions, since 1.3.25 fixed four separate issues there and each recent release has surfaced more in the same area.

Recent moves

  1. 4mo ago

    Survey-weighted logistic regression and sample counts corrected

    The densest survey-weighted fix batch yet: quasibinomial now maps to svyglm properly with exponentiated coefficients labelled OR, factor outcomes convert automatically instead of erroring, and the n row shows actual sample counts rather than the sum of survey weights - a difference the notes illustrate as 23,641 against 181,174,390. The bundled 1.3.24 notes add interaction-term handling across the display functions and offset preservation in glmshow.display.

    View source ↗
  2. 6mo ago

    Competing-risk counts drawn from original rather than transformed data

    Rolls up three patch versions. The competing-risk fix is the one that changes published numbers: Count and Percent now come from the original data rather than the finegray-transformed frame, so sample sizes read correctly while cumulative incidence still uses the competing-risk method. The other two prevent dimension dropping when pcut.univariate selects a single variable.

    View source ↗
  3. 9mo ago

    Multi-state Cox models detected without a manual flag

    cox2.display now handles multi-state models automatically rather than requiring the msm parameter, and restricts output to selected variables when event_msm is applied. A small ergonomic win in the function that receives the most attention in this package.

    View source ↗
  4. 10mo ago

    Wide fix pass across the display functions

    Two versions bundled, covering strata() terms in coxph, hardcoded column indices in survey Cox p-value extraction, interaction terms and reference levels in glmshow.display, and refitting behaviour when pcut.univariate is combined with data_for_univariate. Most of these are consequences of the pcut.univariate feature meeting model structures it was not originally written against.

    View source ↗
  5. 0y ago

    Crude p-values computed from raw data via data_for_univariate

    Introduces data_for_univariate across cox2.display, geeglm.display and lmer.display so univariate p-values come from the raw data rather than the model frame, which matters when the multivariable model drops incomplete cases. Five patch versions are rolled together here, the rest being column naming and status-zero edge cases.

    View source ↗
  6. 1y ago

    Significance-filtered multivariable analysis added across seven functions

    The origin of the thread that dominates every release since: pcut.univariate lands in seven display functions at once, allowing the multivariable model to be built from only the variables significant in univariate testing. Also adds n_original for unweighted sample size in survey tables, the same weighted-versus-original distinction that 1.3.25 was still correcting a year later.

    View source ↗