Learn R Programming

⚠️There's a newer version (3.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

434

Version

1.2.5

License

GPL-2

Maintainer

Josie Athens

Last Published

October 11th, 2021

Functions in pubh (1.2.5)

Rothman

Oral contraceptives and stroke.
Bernard

Survival of patients with sepsis.
Sandler

Passive smoking in adulthood and cancer risk.
Oncho

Onchocerciasis in Sierra Leone.
Roberts

Extracorporeal membrane oxygenation in neonates.
Fentress

Migraine pain reduction.
Hodgkin

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

Breast cancer and age of childbirth.
Brenner

Prevalence of Helicobacter pylori infection in preschool children.
bland_altman

Bland-Altman agreement plots.
Kirkwood

Body weight and plasma volume.
bst

Bootstrap Confidence Intervals.
contingency2

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

Descriptive statistics for continuous variables.
diag_test2

Diagnostic tests from direct input.
cosm_reg

Tuzson

Peak knee velocity in walking at flexion and extension.
axis_labs

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

Smoking and mortality in Whickham, England.
glm_coef

Table of coefficients from generalised linear models.
jack_knife

Ranks leverage observations from Jackknife method.
harm_mean

Harmonic mean.
get_r2

Estimate R2 or Pseudo-R2 from regression models
gf_star

Annotating a plot to display differences between groups.
knife_mean

Jackknife for means.
ss_jk

Sum of squares for Jackknife.
model_labels

Using labels as coefficient names in tables of coefficients.
mhor

Mantel-Haenszel odds ratio.
round_pval

Rounding p-values.
theme_pubh

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

Cross-tabulation.
hist_norm

Histogram with Normal density curve.
cosm_sum

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

Construct box plots.
chisq.fisher

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

Measured and self-reported weight in New Zealand.
cross_tbl

Table of descriptive statistics by categorical variable.
expand_df

Expand a data frame.
freq_cont

Relative and Cumulative Frequency.
Thall

RCT on the treatment of epilepsy.
inv_logit

Inverse of the logit
diag_test

Diagnostic tests from variables.
rank_influence

Ranks observations based upon influence measures on models.
rank_leverage

Ranks observations by leverage.
odds_trend

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

Multiple comparisons with plot.
pseudo_r2

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

Bar charts with error bars.
logistic_gof

Goodness of fit for Logistic Regression.
leverage

Leverage.
stats_quotes

Internal function to calculate descriptive statistics.
qq_plot

Quantile-quantile plots against the standard Normal distribution.
contingency

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

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

Generate a data frame with estimate and bootstrap CIs.
geo_mean

Geometric mean.
coef_det

Coefficient of determination.
strip_error

Strip plots with error bars.
reference_range

Reference range (reference interval).
prop_or

Proportion, p1 from proportion p2 and OR.
rel_dis

Relative Dispersion.