Package: pubh 2.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_2.0.0.tar.gz
pubh_2.0.0.zip(r-4.5)pubh_2.0.0.zip(r-4.4)pubh_1.3.7.zip(r-4.3)
pubh_2.0.0.tgz(r-4.4-any)pubh_1.3.7.tgz(r-4.3-any)
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_1.3.7.tgz(r-4.3-emscripten)
pubh.pdf |pubh.html
pubh/json (API)

# Install 'pubh' in R:
install.packages('pubh', repos = c('https://josie-athens.r-universe.dev', '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.

On CRAN:

5.95 score 5 stars 71 scripts 618 downloads 1 mentions 37 exports 106 dependencies

Last updated 2 months agofrom:6876c300b1. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 07 2024
R-4.5-winOKNov 07 2024
R-4.5-linuxOKNov 07 2024
R-4.4-winOKNov 07 2024
R-4.4-macOKNov 07 2024
R-4.3-winOKSep 30 2024
R-4.3-macOKSep 30 2024

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 Nov 07 2024.

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

Readme and manuals

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