Package: pubh 1.3.7

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_1.3.7.tar.gz
pubh_1.3.7.zip(r-4.5)pubh_1.3.7.zip(r-4.4)pubh_1.3.7.zip(r-4.3)
pubh_1.3.7.tgz(r-4.4-any)pubh_1.3.7.tgz(r-4.3-any)
pubh_1.3.7.tar.gz(r-4.5-noble)pubh_1.3.7.tar.gz(r-4.4-noble)
pubh_1.3.7.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:

46 exports 5 stars 1.68 score 171 dependencies 1 mentions 72 scripts 775 downloads

Last updated 2 months agofrom:17b65ed640. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 31 2024
R-4.5-winOKAug 31 2024
R-4.5-linuxOKAug 31 2024
R-4.4-winOKAug 31 2024
R-4.4-macOKAug 31 2024
R-4.3-winOKAug 31 2024
R-4.3-macOKAug 31 2024

Exports:axis_labsbar_errorbland_altmanbox_plotbstchisq.fishercoef_detcontingencycontingency2cosm_regcosm_sumcross_tbldiag_testdiag_test2estatexpand_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_errortheme_pubh

Dependencies:abindaskpassassertthatbackportsbase64encbayestestRBiasedUrnbigDbitbit64bitopsbootbroombroom.mixedbslibcachemcarcarDatacardsclassclassIntclicliprcmprskcodacodetoolscolorspacecommonmarkcowplotcpp11crayoncurldata.tabledatawizardDBIDerivdigestdoBydplyre1071emmeansEpiepiRepitoolsestimabilityetmevaluatefansifarverfastmapflextablefontawesomefontBitstreamVerafontLiberationfontquiverforcatsfsfurrrfuturegdtoolsgenericsggformulaggplot2ggridgesglobalsgluegtgtablegtsummaryhavenhighrhmshtmltoolshtmlwidgetshuxtableinsightisobandjquerylibjsonlitejtoolsjuicyjuiceKernSmoothknitrlabelinglabelledlatticelifecyclelistenvlme4lmtestlubridatemagrittrmarkdownMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqamodelrmoonBookmosaicCoremunsellmvtnormnlmenloptrnnetnortestnumDerivofficeropensslpanderparallellypbkrtestperformancepillarpkgconfigplyrprettyunitsprogressproxypurrrquantregR6raggrappdirsRColorBrewerRcppRcppArmadilloRcppEigenreactablereactRreadrrlangrmarkdowns2sandwichsassscalessfsjlabelledsjmiscSparseMstringistringrsurvivalsyssystemfontstextshapingtibbletidyrtidyselecttimechangetinytextzdbunitsutf8uuidV8vctrsviridisLitevroomwithrwkxfunxml2yamlzipzoo

Introduction to the pubh package

Rendered fromintroduction.Rmdusingknitr::rmarkdownon Aug 31 2024.

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

Regression Examples

Rendered fromregression.Rmdusingknitr::rmarkdownon Aug 31 2024.

Last update: 2024-08-01
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
Internal test for chi-squared assumption.Fisher (2 by 2). If results = T, it failschisq.fisher
Coefficient of determination.coef_det
Measures of association from two by two contingency tables (formula).contingency
Measures of association from two by two contingency tables (direct input).contingency2
Cosmetics for tables of regression coefficients. Converts tables generated by 'tbl_regression' to 'huxtable' and adds some cosmetics.cosm_reg
Cosmetics for summary tables Adds some cosmetics to tables of descriptive statistics generated by tbl_summary.cosm_sum
Table of descriptive statistics by categorical variable.cross_tbl
Diagnostic tests from variables.diag_test
Diagnostic tests from direct input.diag_test2
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
A theme for huxtables This function quickly set a default style for a huxtable.theme_pubh
Peak knee velocity in walking at flexion and extension.Tuzson
Smoking and mortality in Whickham, England.Vanderpump