Fully-featured multivariable regression on your browser via Shiny
Switch branches/tags
Nothing to show
Clone or download
Latest commit 8ade817 Dec 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Completion of glimpse Dec 7, 2018
server Completion of glimpse Dec 7, 2018
ui Completion of glimpse Dec 7, 2018
.gitignore Merge branch 'master' of github.com:ewenharrison/shinyfit Nov 17, 2018
0_prep.R Completion of glimpse Dec 7, 2018
LICENSE Initial commit Nov 17, 2018
README.md Create README.md Dec 7, 2018
app.R Completion of glimpse Dec 7, 2018
crosstabs_output.Rmd Completion of glimpse Dec 7, 2018
fit_output.Rmd Completion of glimpse Dec 7, 2018
shinyfit.Rproj shinyfit Nov 17, 2018
template.docx Completion of glimpse Dec 7, 2018

README.md

Shinyfit: Fully-featured multivariable regression on your browser via Shiny

Many of our projects involve getting doctors, nurses, and medical students to collect data on the patients they are looking after. We want to involve many of them in data analysis, without the requirement for coding experience or access to statistical software. To achieve this we have built Shinyfit, a shiny app for linear, logistic, and Cox PH regression.

  • Aim: allow access to model fitting without requirement for statistical software or coding experience.
  • Audience: Those sharing datasets in context of collaborative research or teaching.
  • Hosting requirements: Basic R coding skills including tidyverse to prepare dataset (5-10 minutes).
  • Deployment: Any shiny platform, shinyapps.io, ShinyServer, RStudio Connect etc.

shinyfit uses our finalfit package.

Features

  • Univariable, multivariable and mixed effects linear, logistic, and Cox Proportional Hazards regression via a web browser.
  • Intuitive model building with option to include a reduced model and common metrics.
  • Coefficient, odds ratio, hazard ratio plots.
  • Cross tabulation across multiple variables with statistical comparisons.
  • Subset data by any included factor.
  • Dataset inspection functions.
  • Export tables to Word for publication or as a CSV for further analysis/plotting.
  • Easy to deploy with your own data.

Examples

argoshare.is.ed.ac.uk/shinyfit_colon
argoshare.is.ed.ac.uk/shinyfit_melanoma

Code

github.com/ewenharrison/shinyfit

Screenshots

Linear, logistic or CPH regression tables

Coefficient, odds ratio or hazard ratio plots

Crosstabs

Inspect dataset with ff_glimpse

Use your data

To use your own data, clone or download app from github.

  • Edit 0_prep.R to create a shinyfit_data object. 
  • Test the app, usually within RStudio.
  • Deploy to your shiny hosting platform of choice.
  • Ensure you have permission to share the data

Editing 0_prep.R is straightforward and takes about 5 mins. The main purpose is to create human-readable menu items and allows sorting of variables into any categories, such as outcome and explanatory

Errors in shinyfit are usually related to the underlying dataset, e.g.

  • Variables not appropriately specified as numerics or factors. 
  • A particular factor level is empty, thus regression function (lm, glm, coxph etc.) gives error.
  • A variable with >2 factor levels is used as an outcome/dependent. This is not supported.
  • Use Glimpse tabs to check data when any error occurs.

It is fully mobile compliant, including datatables.

There will be bugs. Please report here