Learn R Programming

pubh

A toolbox for Public Health and Epidemiology

pubh is an R package for making R functions and capabilities more accessible to students and professionals from epidemiology and public health related disciplines.

Information on use with examples can be found in "vignettes".

Copy Link

Version

Install

install.packages('pubh')

Monthly Downloads

694

Version

3.0.1

License

GPL-2

Maintainer

Josie Athens

Last Published

November 1st, 2026

Functions in pubh (3.0.1)

Fentress

Migraine pain reduction.
expand_df

Expand a data frame.
multiple

Multiple comparisons with plot.
gg_star

Annotating a plot to display differences between groups.
get_r2

Estimate R2 or Pseudo-R2 from regression models
model_labels

Using labels as coefficient names in tables of coefficients.
round_pval

Rounding p-values.
rel_dis

Relative Dispersion.
pseudo_r2

Pseudo R2 (logistic regression) pseudo_r2 Calculates R2 analogues (pseudo R2) of logistic regression.
prop_or

Proportion, p1 from proportion p2 and OR.
mhor

Mantel-Haenszel odds ratio.
Hodgkin

T-cell counts from Hodgkin's disease patients.
knife_mean

Jackknife for means.
bmj

Palette inspired by the British Medical Journal.
stats_quotes

Internal function to calculate descriptive statistics.
ss_jk

Sum of squares for Jackknife.
gen_bst_df

Generate a data frame with estimate and bootstrap CIs.
bst

Bootstrap Confidence Intervals.
geo_mean

Geometric mean.
Vanderpump

Smoking and mortality in Whickham, England.
Tuzson

Peak knee velocity in walking at flexion and extension.
freq_cont

Relative and Cumulative Frequency.
harm_mean

Harmonic mean.
glm_coef

Table of coefficients from generalised linear models.
leverage

Leverage.
inv_logit

Inverse of the logit
rank_leverage

Ranks observations by leverage.
jack_knife

Ranks leverage observations from Jackknife method.
odds_trend

Function to calculate OR and plot trend.
qq_plot

Quantile-quantile plots against the standard Normal distribution.
rank_influence

Ranks observations based upon influence measures on models.
predict_inv

Given y solve for x in a simple linear model.
strip_error

Strip plots with error bars.
reference_range

Reference range (reference interval).
theme_pubh

A theme for huxtables This function quickly set a default style for a huxtable.
Roberts

Extracorporeal membrane oxygenation in neonates.
Brenner

Prevalence of Helicobacter pylori infection in preschool children.
Bernard

Survival of patients with sepsis.
Oncho

Onchocerciasis in Sierra Leone.
Rothman

Oral contraceptives and stroke.
Sandler

Passive smoking in adulthood and cancer risk.
Sharples

Measured and self-reported weight in New Zealand.
coef_det

Coefficient of determination.
cosm_reg

Cosmetics for tables of regression coefficients. Converts tables generated by tbl_regression to huxtable and adds some cosmetics.
effect_plot

Constructs effect plots on for cases when the response (outcome) is a numerical variable and the explanatory (exposure) is a categorical variable.
logistic_gof

Goodness of fit for Logistic Regression.
Kirkwood

Body weight and plasma volume.
bar_error

Bar charts with error bars.
bland_altman

Bland-Altman agreement plots.
estat

Descriptive statistics for continuous variables.
cosm_sum

Cosmetics for summary tables Adds some cosmetics to tables of descriptive statistics generated by tbl_summary.
cross_tbl

Table of descriptive statistics by categorical variable.
Macmahon

Breast cancer and age of childbirth.
Thall

RCT on the treatment of epilepsy.