Learn R Programming

⚠️There's a newer version (2.0.0) of this package.Take me there.

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

542

Version

1.3.7

License

GPL-2

Maintainer

Josie Athens

Last Published

August 17th, 2024

Functions in pubh (1.3.7)

box_plot

Construct box plots.
bar_error

Bar charts with error bars.
cosm_reg

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

Diagnostic tests from variables.
contingency2

Measures of association from two by two contingency tables (direct input).
diag_test2

Diagnostic tests from direct input.
Vanderpump

Smoking and mortality in Whickham, England.
get_r2

Estimate R2 or Pseudo-R2 from regression models
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.
geo_mean

Geometric mean.
gf_star

Annotating a plot to display differences between groups.
expand_df

Expand a data frame.
logistic_gof

Goodness of fit for Logistic Regression.
freq_cont

Relative and Cumulative Frequency.
mhor

Mantel-Haenszel odds ratio.
predict_inv

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

Table of coefficients from generalised linear models.
gen_bst_df

Generate a data frame with estimate and bootstrap CIs.
odds_trend

Function to calculate OR using Wald CI, and plot trend.
knife_mean

Jackknife for means.
inv_logit

Inverse of the logit
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.
jack_knife

Ranks leverage observations from Jackknife method.
qq_plot

Quantile-quantile plots against the standard Normal distribution.
coef_det

Coefficient of determination.
rel_dis

Relative Dispersion.
leverage

Leverage.
harm_mean

Harmonic mean.
hist_norm

Histogram with Normal density curve.
model_labels

Using labels as coefficient names in tables of coefficients.
multiple

Multiple comparisons with plot.
contingency

Measures of association from two by two contingency tables (formula).
round_pval

Rounding p-values.
ss_jk

Sum of squares for Jackknife.
stats_quotes

Internal function to calculate descriptive statistics.
theme_pubh

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

Strip plots with error bars.
rank_leverage

Ranks observations by leverage.
reference_range

Reference range (reference interval).
rank_influence

Ranks observations based upon influence measures on models.
Rothman

Oral contraceptives and stroke.
bst

Bootstrap Confidence Intervals.
chisq.fisher

Internal test for chi-squared assumption.Fisher (2 by 2). If results = T, it fails
axis_labs

Apply labels from variables to axis-labels in plots.
Oncho

Onchocerciasis in Sierra Leone.
Hodgkin

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

Passive smoking in adulthood and cancer risk.
Sharples

Measured and self-reported weight in New Zealand.
Bernard

Survival of patients with sepsis.
bland_altman

Bland-Altman agreement plots.
Thall

RCT on the treatment of epilepsy.
Kirkwood

Body weight and plasma volume.
Macmahon

Breast cancer and age of childbirth.
Roberts

Extracorporeal membrane oxygenation in neonates.
Fentress

Migraine pain reduction.
Brenner

Prevalence of Helicobacter pylori infection in preschool children.
Tuzson

Peak knee velocity in walking at flexion and extension.