Reproducible Pitch Presentation

About my app

My app contains a plot and simple linear regression model to predict temperature for a given value of solar radiation, based on the airquality dataset.

How does my app work?

When you input a value for solar radiation using the slider, the display will automatically update:

  • Plot: The pink marker will move to the appropriate place on the regression line. It will align with the given solar radiation value, i.e., the x-coordinate.
  • Text output: The text output will update to give the predicted temperature based on the value you input for solar radiation.

R expression (linear regression model)

The plot displays a line of best fit for a simple linear regression of temperature on solar radiation:

model1 <- lm(Temp ~ Solar.R, data=airquality)
model1

Call:
lm(formula = Temp ~ Solar.R, data = airquality)

Coefficients:
(Intercept)      Solar.R  
   72.86301      0.02825  

R expression (prediction)

When you input a value for solar radiation using the slider, the output will give you the predicted temperature for that value of solar radiation by evaluating the simple linear regression expression. For example, if you input a solar radiation value of 101…

72.86301 + 0.02825 * 101
[1] 75.71626

…you will get a predicted temperature of 75.71673.