All-in-one functions

Single functions to generate final output tables

finalfit() finalfit.lm() finalfit.glm() finalfit.coxph()

Final output tables for common regression models

ff_permute() finalfit_permute()

Permuate explanatory variables to produce multiple output tables for common regression models

summary_factorlist()

Summarise a set of factors (or continuous variables) by a dependent variable

summary_factorlist_stratified()

Summarise a set of factors (or continuous variables) by a dependent variable

Model wrappers

Wrappers for common statistical models

lmuni()

Linear regression univariable models: finalfit model wrapper

lmmulti()

Linear regression multivariable models: finalfit model wrapper

lmmixed()

Mixed effects linear regression models: finalfit model wrapper

glmuni()

Binomial logistic regression univariable models: finalfit model wrapper

glmmulti()

Binomial logistic regression multivariable models: finalfit model wrapper

glmmulti_boot()

Binomial logistic regression multivariable models with bootstrapped confidence intervals: finalfit model wrapper

glmmixed()

Mixed effects binomial logistic regression models: finalfit model wrapper

coxphuni()

Cox proprotional hazards univariable models: finalfit model wrapper

coxphmulti()

Cox proprotional hazards multivariable models: finalfit model wrapper

crruni()

Competing risks univariable regression: finalfit model wrapper

crrmulti()

Competing risks multivariable regression: finalfit model wrapper

svyglmuni()

Univariable survey-weighted generalised linear models

svyglmmulti()

Multivariable survey-weighted generalised linear models

Bootstrap functions

Bootstrap simulation for model prediction

boot_predict()

Bootstrap simulation for model prediction

boot_compare()

Compare bootstrapped distributions

Helper functions

fit2df()

Extract model fit results to dataframe (generic): finalfit model extractors

ff_column_totals() finalfit_column_totals()

Add column totals to summary_factorlist() output

ff_row_totals() finalfit_row_totals()

Add row totals to summary_factorlist() output

ff_formula() finalfit_formula()

Generate formula as character string

ff_glimpse() finalfit_glimpse()

Descriptive statistics for dataframe

ff_interaction() finalfit_interaction()

Make an interaction variable and add to dataframe

ff_label() finalfit_label()

Label a variable

ff_merge() finalfit_merge()

Merge a summary_factorlist() table with any number of model results tables.

ff_metrics()

Generate common metrics for regression model results

ff_newdata() finalfit_newdata()

Generate newdata for simulations

ff_percent_only() finalfit_percent_only()

Include only percentages for factors in summary_factorlist output

ff_parse_formula()

Parse a formula to finalfit grammar

ff_relabel() finalfit_relabel()

Relabel variables in a data frame

ff_relabel_df() finalfit_relabel_df()

Relabel variables from data frame after tidyverse functions

ff_remove_ref() finalfit_remove_ref()

Remove regression reference level row from table

ff_remove_p() finalfit_remove_p()

Remove p-value from output

ff_stratify_helper()

Help making stratified summary_factorlist tables

check_recode()

Check accurate recoding of variables

dependent_label()

Make a label for the dependent variable

extract_variable_label()

Extract variable labels from dataframe

format_n_percent()

Format n and percent as a character

labels_to_column()

Labels to column names

labels_to_level()

Labels to level

p_tidy()

Round p-values but keep trailing zeros

rm_duplicates()

Remove duplicates and replace

rm_empty_block()

Remove rows where all specified variables are missing

round_tidy()

Round values but keep trailing zeros

Plotting

or_plot()

Produce an odds ratio table and plot

hr_plot()

Produce a hazard ratio table and plot

coefficient_plot()

Produce a coefficient table and plot

ff_plot() finalfit_plot()

Produce a table and plot

surv_plot()

Plot survival curves with number-at-risk table

missing_plot()

Missing values occurrence plot

missing_pairs()

Missing values pairs plot

Missing data functions

missing_glimpse()

Summary of missing values

missing_pattern()

Characterise missing data for finalfit models

missing_compare()

Compare missing data

missing_pairs()

Missing values pairs plot

missing_plot()

Missing values occurrence plot

missing_predictorMatrix()

Create predictorMatrix for use with mice

Metrics

metrics_hoslem()

Hosmer-Lemeshow goodness of fit test

Data

Sample data for examples and testing

colon_s

Chemotherapy for Stage B/C colon cancer

wcgs

Western Collaborative Group Study

Misc

finalfit-package

finalfit: Quickly create elegant final results tables and plots when modelling.