User Manual

by Gunnie59

Background

The idea is compare two different approaches to linear regression on the basis of a simple dataset. The dataset chosen is the mammals dataframet as it comes with the MASS library. It includes body and brain weight data of 62 species
There are linear model fits applied to the data with body weight being the regressor and brain weight being the outcome. 1. to the data themselves 2. to the natural log values of both As all data points are amassed close to the origin in the linear fit, at a high level the fit looks acceptable within reason. The linear fit to the log values showes a decent linear relation across the whole range of the data. #### Source of data Weisberg, S. (1985) Applied Linear Regression. 2nd edition. Wiley, pp. 144–5. Selected from: Allison, T. and Cicchetti, D. V. (1976) Sleep in mammals: ecological and constitutional correlates. Science 194, 732–734. ####References Venables, W. N. and Ripley, B. D. (1999) Modern Applied Statistics with S-PLUS. Third Edition. Spring

Shiny application

Screen Layout

Main panel

The mainpanel shows the data points and linear model fits for both direct (upper) and log-values (lower) of the dataset. The plot of the linear depiction can be changed by a slider in the side panel. This is not implemented for the log values, as it is not sensible there. At the bottom of the main panel the predictions of the values driven by the slider are being shown.

How to use the shiny app

Please move sliders for the values of the regressors. You could see in the plots how the points are moving. You can see in particular that the direct linear fit only produces a somewhat acceptable result for large numbers. In particular you can see the differences of the two models and how the lin-log-log gives much better results for small absolute numbers near the origin. For this purpose please use also the slider for enlarging the plot of the original numbers, so see how the predictions change for small numbers.