The car.test.frame data frame has 60 rows and 8 columns, giving data on makes of cars taken from the April, 1990 issue of Consumer Reports. This is part of a larger dataset, some columns of which are given in cu.summary.

car.test.frame

Format

This data frame contains the following columns:

Price

a numeric vector giving the list price in US dollars of a standard model

Country

of origin, a factor with levels France, Germany, Japan , Japan/USA, Korea, Mexico, Sweden and USA

Reliability

a numeric vector coded 1 to 5.

Mileage

fuel consumption miles per US gallon, as tested.

Type

a factor with levels Compact Large Medium Small Sporty Van

Weight

kerb weight in pounds.

Disp.

the engine capacity (displacement) in litres.

HP

the net horsepower of the vehicle.

Source

Consumer Reports, April, 1990, pp. 235--288 quoted in

John M. Chambers and Trevor J. Hastie eds. (1992) Statistical Models in S, Wadsworth and Brooks/Cole, Pacific Grove, CA, pp. 46--47.

See also

Examples

z.auto <- rpart(Mileage ~ Weight, car.test.frame) summary(z.auto)
#> Call: #> rpart(formula = Mileage ~ Weight, data = car.test.frame) #> n= 60 #> #> CP nsplit rel error xerror xstd #> 1 0.59534912 0 1.0000000 1.0519643 0.18167427 #> 2 0.13452819 1 0.4046509 0.5841534 0.10773921 #> 3 0.01282843 2 0.2701227 0.4027442 0.07617707 #> 4 0.01000000 3 0.2572943 0.3978289 0.06648886 #> #> Variable importance #> Weight #> 100 #> #> Node number 1: 60 observations, complexity param=0.5953491 #> mean=24.58333, MSE=22.57639 #> left son=2 (45 obs) right son=3 (15 obs) #> Primary splits: #> Weight < 2567.5 to the right, improve=0.5953491, (0 missing) #> #> Node number 2: 45 observations, complexity param=0.1345282 #> mean=22.46667, MSE=8.026667 #> left son=4 (22 obs) right son=5 (23 obs) #> Primary splits: #> Weight < 3087.5 to the right, improve=0.5045118, (0 missing) #> #> Node number 3: 15 observations #> mean=30.93333, MSE=12.46222 #> #> Node number 4: 22 observations #> mean=20.40909, MSE=2.78719 #> #> Node number 5: 23 observations, complexity param=0.01282843 #> mean=24.43478, MSE=5.115312 #> left son=10 (15 obs) right son=11 (8 obs) #> Primary splits: #> Weight < 2747.5 to the right, improve=0.1476996, (0 missing) #> #> Node number 10: 15 observations #> mean=23.8, MSE=4.026667 #> #> Node number 11: 8 observations #> mean=25.625, MSE=4.984375 #>