R Dataset / Package DAAG / carprice

How To Create a Barplot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Stacked Barplot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Pie Chart

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Compute the Mean

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Plot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How to Compute the Median

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Boxplot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Correlation Coefficient

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Cumulative Frequency Histogram

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Dotplot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Hollow Histogram

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Numerical Summaries

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Pie Chart

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Plot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Regression

Stem and Leaf Plots

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Visual Summaries

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.
Embed
<iframe src="https://embed.picostat.com/r-dataset-package-daag-carprice.html" frameBorder="0" width="100%" height="307px" />
Attachment Size
dataset-70618.csv 2.03 KB
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0
Dataset Help

On this Picostat.com statistics page, you will find information about the carprice data set which pertains to US Car Price Data. The carprice data set is found in the DAAG R package. You can load the carprice data set in R by issuing the following command at the console data("carprice"). This will load the data into a variable called carprice. If R says the carprice data set is not found, you can try installing the package by issuing this command install.packages("DAAG") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the carprice R data set. The size of this file is about 2,076 bytes.

Documentation

US Car Price Data

Description

U.S. data extracted from Cars93, a data frame in the MASS package.

Usage

carprice

Format

This data frame contains the following columns:

Type

Type of car, e.g. Sporty, Van, Compact

Min.Price

Price for a basic model

Price

Price for a mid-range model

Max.Price

Price for a ‘premium’ model

Range.Price

Difference between Max.Price and Min.Price

RoughRange

Rough.Range plus some N(0,.0001) noise

gpm100

The number of gallons required to travel 100 miles

MPG.city

Average number of miles per gallon for city driving

MPG.highway

Average number of miles per gallon for highway driving

Source

MASS package

References

Venables, W.N.\ and Ripley, B.D., 4th edn 2002. Modern Applied Statistics with S. Springer, New York.

See also ‘R’ Complements to Modern Applied Statistics with S-Plus, available from http://www.stats.ox.ac.uk/pub/MASS3/

Examples

 
print("Multicollinearity - Example 6.8")
pairs(carprice[,-c(1,8,9)])carprice1.lm <- lm(gpm100 ~ Type+Min.Price+Price+Max.Price+Range.Price,
    data=carprice)
round(summary(carprice1.lm)$coef,3)
pause()alias(carprice1.lm)
pause()carprice2.lm <- lm(gpm100 ~ Type+Min.Price+Price+Max.Price+RoughRange, data=carprice)
round(summary(carprice2.lm)$coef, 2)
pause()carprice.lm <- lm(gpm100 ~ Type + Price, data = carprice)
round(summary(carprice.lm)$coef,4)  
pause()summary(carprice1.lm)$sigma   # residual standard error when fitting all 3 price variables
pause()summary(carprice.lm)$sigma    # residual standard error when only price is used
pause()vif(lm(gpm100 ~ Price, data=carprice)) # Baseline Price
pause()vif(carprice1.lm)    # includes Min.Price, Price & Max.Price
pause()vif(carprice2.lm)    # includes Min.Price, Price, Max.Price & RoughRange
pause()vif(carprice.lm)     # Price alone
--

Dataset imported from https://www.r-project.org.