Package: pubh 2.0.0

Josie Athens

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_2.0.0.tar.gz
pubh_2.0.0.tar.gz(r-4.5-noble)pubh_2.0.0.tar.gz(r-4.4-noble)
pubh_2.0.0.tgz(r-4.4-emscripten)
pubh.pdf |pubh.html
pubh/json (API)

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

Peer review:

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.

4.03 score 72 scripts 464 downloads 1 mentions 37 exports 106 dependencies

Last updated 3 months agofrom:3ea22fffaf. Checks:2 OK. Indexed: no.

TargetResultLatest binary
Doc / VignettesOKJan 07 2025
R-4.5-linuxOKJan 07 2025

Exports:axis_labsbar_errorbland_altmanbox_plotbstcoef_detestatexpand_dffreq_contgen_bst_dfgeo_meanget_r2gf_starglm_coefharm_meanhist_norminv_logitjack_knifeknife_meanleveragelogistic_gofmhormodel_labelsmultipleodds_trendpredict_invprop_orpseudo_r2qq_plotrank_influencerank_leveragereference_rangerel_disround_pvalss_jkstats_quotesstrip_error

Dependencies:abindbackportsbayestestRbitbit64bootbroombroom.mixedcarcarDataclicliprcmprskcodacodetoolscolorspacecowplotcpp11crayondata.tabledatawizardDerivdigestdoBydplyremmeansEpiepitoolsestimabilityetmfansifarverforcatsFormulafurrrfuturegenericsggformulaggplot2ggridgesglobalsgluegtablehavenhmsinsightisobandjtoolslabelinglabelledlatticelifecyclelistenvlme4lmtestmagrittrMASSMatrixMatrixModelsmgcvmicrobenchmarkminqamodelrmosaicCoremunsellmvtnormnlmenloptrnnetnumDerivpanderparallellypbkrtestperformancepillarpkgconfigplyrprettyunitsprogresspurrrquantregR6RColorBrewerRcppRcppArmadilloRcppEigenreadrrlangsandwichscalessjlabelledsjmiscSparseMstringistringrsurvivaltibbletidyrtidyselecttzdbutf8vctrsviridisLitevroomwithrzoo

Introduction to the pubh package

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Jan 07 2025.

Last update: 2024-10-08
Started: 2018-01-19

Citation

To cite package ‘pubh’ in publications use:

Athens J (2024). pubh: A Toolbox for Public Health and Epidemiology. R package version 2.0.0, https://CRAN.R-project.org/package=pubh.

Corresponding BibTeX entry:

  @Manual{,
    title = {pubh: A Toolbox for Public Health and Epidemiology},
    author = {Josie Athens},
    year = {2024},
    note = {R package version 2.0.0},
    url = {https://CRAN.R-project.org/package=pubh},
  }

Readme and manuals

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".

Help Manual

Help pageTopics
Apply labels from variables to axis-labels in plots.axis_labs
Bar charts with error bars.bar_error
Survival of patients with sepsis.Bernard
Bland-Altman agreement plots.bland_altman
Construct box plots.box_plot
Prevalence of Helicobacter pylori infection in preschool children.Brenner
Bootstrap Confidence Intervals.bst
Coefficient of determination.coef_det
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.gf_star
Table of coefficients from generalised linear models.glm_coef
Harmonic mean.harm_mean
Histogram with Normal density curve.hist_norm
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
Peak knee velocity in walking at flexion and extension.Tuzson
Smoking and mortality in Whickham, England.Vanderpump