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

438

Version

1.3.2

License

GPL-2

Maintainer

Josie Athens

Last Published

January 11th, 2024

Functions in pubh (1.3.2)

contingency2

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

Coefficient of determination.
chisq.fisher

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

Annotating a plot to display differences between groups.
glm_coef

Table of coefficients from generalised linear models.
cosm_reg

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

Goodness of fit for Logistic Regression.
mhor

Mantel-Haenszel odds ratio.
estat

Descriptive statistics for continuous variables.
get_r2

Estimate R2 or Pseudo-R2 from regression models
expand_df

Expand a data frame.
geo_mean

Geometric mean.
pseudo_r2

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

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

Ranks leverage observations from Jackknife method.
inv_logit

Inverse of the logit
cosm_sum

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

Generate a data frame with estimate and bootstrap CIs.
cross_tbl

Table of descriptive statistics by categorical variable.
qq_plot

Quantile-quantile plots against the standard Normal distribution.
rank_influence

Ranks observations based upon influence measures on models.
odds_trend

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

Proportion, p1 from proportion p2 and OR.
contingency

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

Relative and Cumulative Frequency.
model_labels

Using labels as coefficient names in tables of coefficients.
multiple

Multiple comparisons with plot.
diag_test2

Diagnostic tests from direct input.
diag_test

Diagnostic tests from variables.
rank_leverage

Ranks observations by leverage.
ss_jk

Sum of squares for Jackknife.
reference_range

Reference range (reference interval).
strip_error

Strip plots with error bars.
rel_dis

Relative Dispersion.
round_pval

Rounding p-values.
stats_quotes

Internal function to calculate descriptive statistics.
theme_pubh

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

Harmonic mean.
knife_mean

Jackknife for means.
leverage

Leverage.
hist_norm

Histogram with Normal density curve.
Kirkwood

Body weight and plasma volume.
bst

Bootstrap Confidence Intervals.
Brenner

Prevalence of Helicobacter pylori infection in preschool children.
Fentress

Migraine pain reduction.
Hodgkin

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

Survival of patients with sepsis.
Sharples

Measured and self-reported weight in New Zealand.
Oncho

Onchocerciasis in Sierra Leone.
Thall

RCT on the treatment of epilepsy.
Rothman

Oral contraceptives and stroke.
Macmahon

Breast cancer and age of childbirth.
Roberts

Extracorporeal membrane oxygenation in neonates.
bar_error

Bar charts with error bars.
axis_labs

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

Passive smoking in adulthood and cancer risk.
bland_altman

Bland-Altman agreement plots.
box_plot

Construct box plots.
Tuzson

Peak knee velocity in walking at flexion and extension.
Vanderpump

Smoking and mortality in Whickham, England.