Keywords: R-car stopping distances 1920+linear-resids.svg en Residuals from a simple linear model of car stopping distances Own HYanWong 2009-01-19 Created with R using the following commands <pre>svg R-car_stopping_distances_1920+linear-resids svg 4 4 8 par mar c 5 4 1 1 + 0 1 cars speed kph <- cars speed 1 609344 cars dist m <- cars dist 0 3048 straight line model <- lm dist m~speed kph data cars This creates and stores a model lm means Linear Model plot residuals straight line model type h ylim c -25 25 yaxp c -25 25 10 bty n xaxt n las 2 xlab NA ylab residual stopping distance m col lightblue points residuals straight line model dev off </pre> Uncategorized 2015 March 23 |