carsInteractive

Nikolas Giagtzoglou
October 26th, 2014

Application Cars Interactive

  • mtcars dataset is small and esay to manipulate
  • mtcars dataset produces nice, simple plots
  • mtcars dataset has been used in linear regression classes

Aim: to generate quick diagnostic tests using both plots...

For example:

plot(mpg~wt, mtcars)

plot of chunk unnamed-chunk-1

...and linear regression calculations

z<-lm(mpg~wt, mtcars)
print(rbind(c("Intercept:", "Slope:"), as.numeric(round(z$coefficients,2))))
     [,1]         [,2]    
[1,] "Intercept:" "Slope:"
[2,] "37.29"      "-5.34" 

The applications lives at:

http://nikolas.shinyapps.io/calculate_linear_fit_coeffcients_in_cars_dataset

Many thanks to Scientificdata for the inspiration!