Package: pubh 3.0.0

pubh: A Toolbox for Public Health and Epidemiology

A toolbox for making R functions and capabilities more accessible to students and professionals from Epidemiology and Public Health related disciplines. Includes a function to report coefficients and confidence intervals from models using robust standard errors (when available), functions that expand 'ggplot2' plots and functions relevant for introductory papers in Epidemiology or Public Health. Please note that use of the provided data sets is for educational purposes only.

Authors:Josie Athens [aut, cre], Frank Harell [ctb], John Fox [ctb], R-Core [ctb]

pubh_3.0.0.tar.gz
pubh_3.0.0.zip(r-4.7)pubh_3.0.0.zip(r-4.6)pubh_3.0.0.zip(r-4.5)
pubh_3.0.0.tgz(r-4.6-any)pubh_3.0.0.tgz(r-4.5-any)
pubh_3.0.0.tar.gz(r-4.7-any)pubh_3.0.0.tar.gz(r-4.6-any)
pubh_3.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
pubh/json (API)

# Install 'pubh' in R:
install.packages('pubh', repos = c('https://josie-athens.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/josie-athens/pubh/issues

Datasets:
  • Bernard - Survival of patients with sepsis.
  • Brenner - Prevalence of Helicobacter pylori infection in preschool children.
  • Fentress - Migraine pain reduction.
  • Hodgkin - T-cell counts from Hodgkin's disease patients.
  • Kirkwood - Body weight and plasma volume.
  • Macmahon - Breast cancer and age of childbirth.
  • Oncho - Onchocerciasis in Sierra Leone.
  • Roberts - Extracorporeal membrane oxygenation in neonates.
  • Rothman - Oral contraceptives and stroke.
  • Sandler - Passive smoking in adulthood and cancer risk.
  • Sharples - Measured and self-reported weight in New Zealand.
  • Thall - RCT on the treatment of epilepsy.
  • Tuzson - Peak knee velocity in walking at flexion and extension.
  • Vanderpump - Smoking and mortality in Whickham, England.

On CRAN:

Conda:

5.27 score 5 stars 74 scripts 465 downloads 1 mentions 40 exports 136 dependencies

Last updated from:31425cd6e7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK267
source / vignettesOK260
linux-release-x86_64OK247
macos-release-arm64OK166
macos-oldrel-arm64OK173
windows-develOK154
windows-releaseOK141
windows-oldrelOK179
wasm-releaseOK191

Exports:bar_errorbland_altmanbmjbstcoef_detcosm_regcosm_sumcross_tbleffect_plotestatexpand_dffreq_contgen_bst_dfgeo_meanget_r2gg_starglm_coefharm_meaninv_logitjack_knifeknife_meanleveragelogistic_gofmhormodel_labelsmultipleodds_trendpredict_invprop_orpseudo_r2qq_plotrank_influencerank_leveragereference_rangerel_disround_pvalss_jkstats_quotesstrip_errortheme_pubh

Dependencies:abindassertthatbackportsbase64encbayestestRbigDbitopsbootbroombroom.mixedbslibcachemcarcarDatacardscardxclicmprskcodacodetoolscolorspacecommonmarkcowplotcpp11curldata.tabledatawizardDerivdigestdoBydplyremmeansEpiepitoolsestimabilityetmevaluatefansifarverfastmapfontawesomeforcatsforecastFormulafracdifffsfurrrfuturegenericsggplot2globalsgluegtgtablegtsummaryhighrhtmltoolshtmlwidgetshuxtableinsightisobandjquerylibjsonlitejtoolsjuicyjuiceknitrlabelinglatticelifecyclelistenvlitedownlme4lmtestmagrittrmarkdownMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqamodelrmvtnormnlmenloptrnnetnumDerivpanderparallellypbkrtestperformancepillarpkgconfigplyrpurrrquantregR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreactablereactRreformulasrlangrmarkdownS7sandwichsassscalessjlabelledsjmiscSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDatetinytexurcautf8V8vctrsviridisLitewithrxfunxml2yamlzoo

Introduction to the pubh package

Rendered fromintroduction.Rmdusingknitr::rmarkdownon May 09 2026.

Last update: 2025-10-10
Started: 2018-01-15

Readme and manuals

Help Manual

Help pageTopics
Bar charts with error bars.bar_error
Survival of patients with sepsis.Bernard
Bland-Altman agreement plots.bland_altman
Palette inspired by the British Medical Journal.bmj
Prevalence of Helicobacter pylori infection in preschool children.Brenner
Bootstrap Confidence Intervals.bst
Coefficient of determination.coef_det
Cosmetics for tables of regression coefficients. Converts tables generated by 'tbl_regression' to 'huxtable' and adds some cosmetics.cosm_reg
Cosmetics for summary tables Adds some cosmetics to tables of descriptive statistics generated by tbl_summary.cosm_sum
Table of descriptive statistics by categorical variable.cross_tbl
Constructs effect plots on for cases when the response (outcome) is a numerical variable and the explanatory (exposure) is a categorical variable.effect_plot
Descriptive statistics for continuous variables.estat
Expand a data frame.expand_df
Migraine pain reduction.Fentress
Relative and Cumulative Frequency.freq_cont
Generate a data frame with estimate and bootstrap CIs.gen_bst_df
Geometric mean.geo_mean
Estimate R2 or Pseudo-R2 from regression modelsget_r2
Annotating a plot to display differences between groups.gg_star
Table of coefficients from generalised linear models.glm_coef
Harmonic mean.harm_mean
T-cell counts from Hodgkin's disease patients.Hodgkin
Inverse of the logitinv_logit
Ranks leverage observations from Jackknife method.jack_knife
Body weight and plasma volume.Kirkwood
Jackknife for means.knife_mean
Leverage.leverage
Goodness of fit for Logistic Regression.logistic_gof
Breast cancer and age of childbirth.Macmahon
Mantel-Haenszel odds ratio.mhor
Using labels as coefficient names in tables of coefficients.model_labels
Multiple comparisons with plot.multiple
Function to calculate OR using Wald CI, and plot trend.odds_trend
Onchocerciasis in Sierra Leone.Oncho
Given y solve for x in a simple linear model.predict_inv
Proportion, p1 from proportion p2 and OR.prop_or
Pseudo R2 (logistic regression) 'pseudo_r2' Calculates R2 analogues (pseudo R2) of logistic regression.pseudo_r2
Quantile-quantile plots against the standard Normal distribution.qq_plot
Ranks observations based upon influence measures on models.rank_influence
Ranks observations by leverage.rank_leverage
Reference range (reference interval).reference_range
Relative Dispersion.rel_dis
Extracorporeal membrane oxygenation in neonates.Roberts
Oral contraceptives and stroke.Rothman
Rounding p-values.round_pval
Passive smoking in adulthood and cancer risk.Sandler
Measured and self-reported weight in New Zealand.Sharples
Sum of squares for Jackknife.ss_jk
Internal function to calculate descriptive statistics.stats_quotes
Strip plots with error bars.strip_error
RCT on the treatment of epilepsy.Thall
A theme for huxtables This function quickly set a default style for a huxtable.theme_pubh
Peak knee velocity in walking at flexion and extension.Tuzson
Smoking and mortality in Whickham, England.Vanderpump