File:R-car stopping distances 1920+linear-resids.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 360 × 360 pixels, file size: 56 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Residuals from a simple linear model of car stopping distances
Date
Source Own work
Author HYanWong
 
This W3C-unspecified chart was created with R.

using the following commands

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()

Licensing[edit]

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:33, 19 January 2009Thumbnail for version as of 21:33, 19 January 2009360 × 360 (56 KB)HYanWong (talk | contribs){{Information |Description={{en|1=Residuals from a simple linear model of car stopping distances}} |Source=Own work by uploader |Author=HYanWong |Date=2009/01/19 |Permission= |other_versions= }} {{Created with R}} using the following com

There are no pages that use this file.