May 10, 2019

Introduction

  • The shiny app displays the relationships between two variables, Agriculture (% of Males Involved in Agriculture), Catholic (% 'catholic' (as opposed to 'protestant'), and Fertility Measures.
  • Two regression models are displayed in the app, and users can select desired values for Agriculture and Catholic by sliding the bars on the left side of the app.
  • The predicted values for Fertility Measure based on the values that the user selected will display on the right side of the app, below each plot.

Regression Model1

This model displays the relationship between Agriculture (% of Males Involved in Agriculture) and Fertility.

model1 <- lm(Fertility ~ Agriculture, data = swiss); plot(model1)

Regression Model2

This model displays the relationship between Catholic (% 'catholic' (as opposed to 'protestant') and Fertility.

model2 <- lm(Fertility ~ Catholic, data = swiss); plot(model2)

The shiny app