Cars: Consumer reports car data: dimensions

Description Usage Format Source References Examples

Description

A data frame containing 11 variables with different dimensions of 111 cars

Usage

1

Format

A data frame with 111 observations on the following 11 variables.

length

a numeric vector

wheelbase

a numeric vector

width

a numeric vector

height

a numeric vector

front.hd

a numeric vector

rear.hd

a numeric vector

front.leg

a numeric vector

rear.seating

a numeric vector

front.shoulder

a numeric vector

rear.shoulder

a numeric vector

luggage

a numeric vector

Source

Consumer reports. (April 1990). http://backissues.com/issue/Consumer-Reports-April-1990, pp. 235–288.

References

Chambers, J. M. and Hastie, T. J. (1992). Statistical models in S. Cole, Pacific Grove, CA: Wadsworth and Brooks, pp. 46–47.

M. Hubert, P. J. Rousseeuw, K. Vanden Branden (2005), ROBPCA: A new approach to robust principal components analysis, Technometrics, 47, 64–79.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    data(Cars)

## Plot a pairwise scaterplot matrix
    pairs(Cars[,1:6])

    mcd <- CovMcd(Cars[,1:6])    
    plot(mcd, which="pairs")
    
## Start with robust PCA
    pca <- PcaHubert(Cars, k=ncol(Cars), kmax=ncol(Cars))
    pca

## Compare with the classical PCA
    prcomp(Cars)

## or  
    PcaClassic(Cars, k=ncol(Cars), kmax=ncol(Cars))
    
## If you want to print the scores too, use
    print(pca, print.x=TRUE)

## Using the formula interface
    PcaHubert(~., data=Cars, k=ncol(Cars), kmax=ncol(Cars))

## To plot the results:

    plot(pca)                    # distance plot
    pca2 <- PcaHubert(Cars, k=4)  
    plot(pca2)                   # PCA diagnostic plot (or outlier map)
    
## Use the standard plots available for prcomp and princomp
    screeplot(pca)    # it is interesting with all variables    
    biplot(pca)       # for biplot we need more than one PCs
    
## Restore the covraiance matrix     
    py <- PcaHubert(Cars, k=ncol(Cars), kmax=ncol(Cars))
    cov.1 <- py@loadings %*% diag(py@eigenvalues) %*% t(py@loadings)
    cov.1      

rrcovHD documentation built on May 29, 2017, 7:14 p.m.

Related to Cars in rrcovHD...