How transmission type affects fuel consumption

Synopsis

We have found that the dataset is insufficient to make a strong conclusion about whether automatic cars or manual cars have lower fuel consumption. We have tried to fit 12 models, using one or several of the given variables as regressors. However,

The current document is the appendix showing details of the model comparison.

Loading data

Settting the options and loading the data

library(knitr)
data(mtcars)

The data set mtcars has 32 observations of 11 variables. We are interested in the relation between am and mpg. Obviously, other variables affect fuel consumption too, most notably the displacement disp and the weight wt.

We’ll do the following operations with the dataset:

C <- mtcars[,c(3,4,6,7,9)]
C$lp100 <- 235.214583/mtcars$mpg
names(C) 
## [1] "disp"  "hp"    "wt"    "qsec"  "am"    "lp100"

Appendix: Details of model comparison

Here is table of correlation coefficients of the new dataset C:

##        disp    hp    wt  qsec    am lp100
## disp   1.00  0.79  0.89 -0.43 -0.59  0.88
## hp     0.79  1.00  0.66 -0.71 -0.24  0.76
## wt     0.89  0.66  1.00 -0.17 -0.69  0.89
## qsec  -0.43 -0.71 -0.17  1.00 -0.23 -0.39
## am    -0.59 -0.24 -0.69 -0.23  1.00 -0.54
## lp100  0.88  0.76  0.89 -0.39 -0.54  1.00

Here is table of correlation coefficients of the original dataset mtcars:

##        mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
## mpg   1.00 -0.85 -0.85 -0.78  0.68 -0.87  0.42  0.66  0.60  0.48 -0.55
## cyl  -0.85  1.00  0.90  0.83 -0.70  0.78 -0.59 -0.81 -0.52 -0.49  0.53
## disp -0.85  0.90  1.00  0.79 -0.71  0.89 -0.43 -0.71 -0.59 -0.56  0.39
## hp   -0.78  0.83  0.79  1.00 -0.45  0.66 -0.71 -0.72 -0.24 -0.13  0.75
## drat  0.68 -0.70 -0.71 -0.45  1.00 -0.71  0.09  0.44  0.71  0.70 -0.09
## wt   -0.87  0.78  0.89  0.66 -0.71  1.00 -0.17 -0.55 -0.69 -0.58  0.43
## qsec  0.42 -0.59 -0.43 -0.71  0.09 -0.17  1.00  0.74 -0.23 -0.21 -0.66
## vs    0.66 -0.81 -0.71 -0.72  0.44 -0.55  0.74  1.00  0.17  0.21 -0.57
## am    0.60 -0.52 -0.59 -0.24  0.71 -0.69 -0.23  0.17  1.00  0.79  0.06
## gear  0.48 -0.49 -0.56 -0.13  0.70 -0.58 -0.21  0.21  0.79  1.00  0.27
## carb -0.55  0.53  0.39  0.75 -0.09  0.43 -0.66 -0.57  0.06  0.27  1.00

They show some light on why the best models are those including disp and wt.

Litres per 100 km:

Here are all the statistics values justifying our conclusions:

fit.disp <- lm(lp100 ~ disp , data=C)
summary(fit.disp)
## 
## Call:
## lm(formula = lp100 ~ disp, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
##  -5.15  -0.90   0.25   1.22   3.57 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   6.4276     0.7059     9.1  3.9e-10 ***
## disp          0.0274     0.0027    10.1  3.3e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.87 on 30 degrees of freedom
## Multiple R-squared:  0.774,  Adjusted R-squared:  0.767 
## F-statistic:  103 on 1 and 30 DF,  p-value: 3.32e-11
fit.disp.wt <- lm(lp100 ~ disp + wt , data=C)
anova(fit.disp,fit.disp.wt)
## Analysis of Variance Table
## 
## Model 1: lp100 ~ disp
## Model 2: lp100 ~ disp + wt
##   Res.Df   RSS Df Sum of Sq    F Pr(>F)   
## 1     30 104.5                            
## 2     29  78.7  1      25.8 9.51 0.0045 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.disp.wt)
## 
## Call:
## lm(formula = lp100 ~ disp + wt, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.013 -0.822  0.372  1.044  2.553 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  3.18321    1.22266    2.60   0.0144 * 
## disp         0.01321    0.00519    2.54   0.0165 * 
## wt           2.02797    0.65757    3.08   0.0045 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.65 on 29 degrees of freedom
## Multiple R-squared:  0.83,   Adjusted R-squared:  0.818 
## F-statistic: 70.7 on 2 and 29 DF,  p-value: 7.01e-12
fit.disp.am <- lm(lp100 ~ disp + am , data=C)
anova(fit.disp,fit.disp.am)
## Analysis of Variance Table
## 
## Model 1: lp100 ~ disp
## Model 2: lp100 ~ disp + am
##   Res.Df RSS Df Sum of Sq    F Pr(>F)
## 1     30 104                         
## 2     29 104  1     0.276 0.08   0.78
summary(fit.disp.am)
## 
## Call:
## lm(formula = lp100 ~ disp + am, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.147 -0.955  0.203  1.116  3.607 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.65172    1.08064    6.16  1.0e-06 ***
## disp         0.02687    0.00341    7.89  1.1e-08 ***
## am          -0.23458    0.84615   -0.28     0.78    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.9 on 29 degrees of freedom
## Multiple R-squared:  0.775,  Adjusted R-squared:  0.759 
## F-statistic: 49.9 on 2 and 29 DF,  p-value: 4.13e-10
fit.disp.wt.am <- lm(lp100 ~ disp + wt +am , data=C)
summary(fit.disp.wt.am)
## 
## Call:
## lm(formula = lp100 ~ disp + wt + am, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.189 -0.673  0.186  1.012  2.299 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)   
## (Intercept)  1.59494    1.78465    0.89   0.3791   
## disp         0.01276    0.00516    2.47   0.0198 * 
## wt           2.42850    0.73108    3.32   0.0025 **
## am           0.99168    0.81744    1.21   0.2352   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.63 on 28 degrees of freedom
## Multiple R-squared:  0.838,  Adjusted R-squared:  0.821 
## F-statistic: 48.4 on 3 and 28 DF,  p-value: 3.31e-11
fit.wt <- lm(lp100 ~ wt, data=C)
summary(fit.wt)
## 
## Call:
## lm(formula = lp100 ~ wt, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.230 -1.042  0.221  1.067  2.742 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    1.451      1.104    1.31      0.2    
## wt             3.514      0.329   10.68  9.6e-12 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.79 on 30 degrees of freedom
## Multiple R-squared:  0.792,  Adjusted R-squared:  0.785 
## F-statistic:  114 on 1 and 30 DF,  p-value: 9.57e-12
fit.wt.am <- lm(lp100 ~ wt + am, data=C)
anova(fit.wt,fit.wt.am)
## Analysis of Variance Table
## 
## Model 1: lp100 ~ wt
## Model 2: lp100 ~ wt + am
##   Res.Df  RSS Df Sum of Sq    F Pr(>F)
## 1     30 96.3                         
## 2     29 91.1  1      5.18 1.65   0.21
summary(fit.wt.am)
## 
## Call:
## lm(formula = lp100 ~ wt + am, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.622 -0.956  0.079  1.133  2.954 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   -0.301      1.748   -0.17     0.86    
## wt             3.915      0.451    8.68  1.5e-09 ***
## am             1.136      0.884    1.28     0.21    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.77 on 29 degrees of freedom
## Multiple R-squared:  0.803,  Adjusted R-squared:  0.79 
## F-statistic: 59.1 on 2 and 29 DF,  p-value: 5.84e-11
fit.hp <- lm(lp100 ~ hp, data=C)
summary(fit.hp)
## 
## Call:
## lm(formula = lp100 ~ hp, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.169 -1.334 -0.165  0.570  7.355 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  6.44908    1.07380    6.01  1.4e-06 ***
## hp           0.04299    0.00665    6.46  3.8e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.54 on 30 degrees of freedom
## Multiple R-squared:  0.582,  Adjusted R-squared:  0.568 
## F-statistic: 41.8 on 1 and 30 DF,  p-value: 3.84e-07
fit.hp.am <- lm(lp100 ~ hp + am, data=C)
anova(fit.hp,fit.hp.am)
## Analysis of Variance Table
## 
## Model 1: lp100 ~ hp
## Model 2: lp100 ~ hp + am
##   Res.Df RSS Df Sum of Sq    F  Pr(>F)    
## 1     30 193                              
## 2     29 132  1      61.7 13.6 0.00093 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.hp.am)
## 
## Call:
## lm(formula = lp100 ~ hp + am, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -2.760 -1.142 -0.365  0.761  6.471 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  8.39063    1.04357    8.04  7.2e-09 ***
## hp           0.03783    0.00575    6.57  3.3e-07 ***
## am          -2.91573    0.79053   -3.69  0.00093 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.13 on 29 degrees of freedom
## Multiple R-squared:  0.716,  Adjusted R-squared:  0.696 
## F-statistic: 36.5 on 2 and 29 DF,  p-value: 1.21e-08
fit.qsec <- lm(lp100 ~ qsec, data=C)
summary(fit.qsec)
## 
## Call:
## lm(formula = lp100 ~ qsec, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.809 -2.362 -0.282  1.836  9.971 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   27.644      6.531    4.23   0.0002 ***
## qsec          -0.834      0.364   -2.29   0.0292 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.62 on 30 degrees of freedom
## Multiple R-squared:  0.149,  Adjusted R-squared:  0.121 
## F-statistic: 5.25 on 1 and 30 DF,  p-value: 0.0292
fit.qsec.am <- lm(lp100 ~ qsec + am, data=C)
anova(fit.qsec,fit.qsec.am)
## Analysis of Variance Table
## 
## Model 1: lp100 ~ qsec
## Model 2: lp100 ~ qsec + am
##   Res.Df RSS Df Sum of Sq    F  Pr(>F)    
## 1     30 394                              
## 2     29 201  1       193 27.9 1.2e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.qsec.am)
## 
## Call:
## lm(formula = lp100 ~ qsec + am, data = C)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -3.521 -1.424 -0.391  0.835  7.927 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   35.618      4.978    7.16  7.1e-08 ***
## qsec          -1.164      0.272   -4.28  0.00018 ***
## am            -5.138      0.973   -5.28  1.2e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.63 on 29 degrees of freedom
## Multiple R-squared:  0.566,  Adjusted R-squared:  0.536 
## F-statistic: 18.9 on 2 and 29 DF,  p-value: 5.54e-06

Miles per gallon

If we used the original miles per gallon, we would basically have the same picture, maybe a little worse because of slightly smaller values of the variance proportion explained by the model:

fit.disp <- lm(mpg ~ disp , data=mtcars)
summary(fit.disp)
## 
## Call:
## lm(formula = mpg ~ disp, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.892 -2.202 -0.963  1.627  7.231 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 29.59985    1.22972   24.07  < 2e-16 ***
## disp        -0.04122    0.00471   -8.75  9.4e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.25 on 30 degrees of freedom
## Multiple R-squared:  0.718,  Adjusted R-squared:  0.709 
## F-statistic: 76.5 on 1 and 30 DF,  p-value: 9.38e-10
fit.disp.wt <- lm(mpg ~ disp + wt , data=mtcars)
anova(fit.disp, fit.disp.wt)
## Analysis of Variance Table
## 
## Model 1: mpg ~ disp
## Model 2: mpg ~ disp + wt
##   Res.Df RSS Df Sum of Sq    F Pr(>F)   
## 1     30 317                            
## 2     29 247  1      70.5 8.29 0.0074 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.disp.wt)
## 
## Call:
## lm(formula = mpg ~ disp + wt, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -3.409 -2.324 -0.768  1.772  6.348 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 34.96055    2.16454   16.15  4.9e-16 ***
## disp        -0.01772    0.00919   -1.93   0.0636 .  
## wt          -3.35083    1.16413   -2.88   0.0074 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.92 on 29 degrees of freedom
## Multiple R-squared:  0.781,  Adjusted R-squared:  0.766 
## F-statistic: 51.7 on 2 and 29 DF,  p-value: 2.74e-10
fit.disp.am <- lm(mpg ~ disp + am , data=mtcars)
anova(fit.disp,fit.disp.am)
## Analysis of Variance Table
## 
## Model 1: mpg ~ disp
## Model 2: mpg ~ disp + am
##   Res.Df RSS Df Sum of Sq    F Pr(>F)
## 1     30 317                         
## 2     29 300  1      16.9 1.63   0.21
summary(fit.disp.am)
## 
## Call:
## lm(formula = mpg ~ disp + am, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.638 -2.475 -0.563  2.233  6.839 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 27.84808    1.83407   15.18  2.5e-15 ***
## disp        -0.03685    0.00578   -6.37  5.7e-07 ***
## am           1.83346    1.43610    1.28     0.21    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.22 on 29 degrees of freedom
## Multiple R-squared:  0.733,  Adjusted R-squared:  0.715 
## F-statistic: 39.9 on 2 and 29 DF,  p-value: 4.75e-09
fit.disp.wt.am <- lm(mpg ~ disp + wt +am , data=mtcars)
summary(fit.disp.wt.am)
## 
## Call:
## lm(formula = mpg ~ disp + wt + am, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -3.489 -2.411 -0.723  1.750  6.329 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 34.67591    3.24061   10.70  2.1e-11 ***
## disp        -0.01780    0.00937   -1.90    0.068 .  
## wt          -3.27904    1.32751   -2.47    0.020 *  
## am           0.17772    1.48432    0.12    0.906    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.97 on 28 degrees of freedom
## Multiple R-squared:  0.781,  Adjusted R-squared:  0.758 
## F-statistic: 33.3 on 3 and 28 DF,  p-value: 2.25e-09
fit.wt <- lm(mpg ~ wt, data=mtcars)
summary(fit.wt)
## 
## Call:
## lm(formula = mpg ~ wt, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.543 -2.365 -0.125  1.410  6.873 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   37.285      1.878   19.86  < 2e-16 ***
## wt            -5.344      0.559   -9.56  1.3e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.05 on 30 degrees of freedom
## Multiple R-squared:  0.753,  Adjusted R-squared:  0.745 
## F-statistic: 91.4 on 1 and 30 DF,  p-value: 1.29e-10
fit.wt.am <- lm(mpg ~ wt + am, data=mtcars)
anova(fit.wt,fit.wt.am)
## Analysis of Variance Table
## 
## Model 1: mpg ~ wt
## Model 2: mpg ~ wt + am
##   Res.Df RSS Df Sum of Sq  F Pr(>F)
## 1     30 278                       
## 2     29 278  1   0.00224  0   0.99
summary(fit.wt.am)
## 
## Call:
## lm(formula = mpg ~ wt + am, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.530 -2.362 -0.132  1.403  6.878 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  37.3216     3.0546   12.22  5.8e-13 ***
## wt           -5.3528     0.7882   -6.79  1.9e-07 ***
## am           -0.0236     1.5456   -0.02     0.99    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.1 on 29 degrees of freedom
## Multiple R-squared:  0.753,  Adjusted R-squared:  0.736 
## F-statistic: 44.2 on 2 and 29 DF,  p-value: 1.58e-09
fit.hp <- lm(mpg ~ hp, data=mtcars)
summary(fit.hp)
## 
## Call:
## lm(formula = mpg ~ hp, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.712 -2.112 -0.885  1.582  8.236 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  30.0989     1.6339   18.42  < 2e-16 ***
## hp           -0.0682     0.0101   -6.74  1.8e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.86 on 30 degrees of freedom
## Multiple R-squared:  0.602,  Adjusted R-squared:  0.589 
## F-statistic: 45.5 on 1 and 30 DF,  p-value: 1.79e-07
fit.hp.am <- lm(mpg ~ hp + am, data=mtcars)
anova(fit.hp,fit.hp.am)
## Analysis of Variance Table
## 
## Model 1: mpg ~ hp
## Model 2: mpg ~ hp + am
##   Res.Df RSS Df Sum of Sq    F  Pr(>F)    
## 1     30 448                              
## 2     29 245  1       202 23.9 3.5e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.hp.am)
## 
## Call:
## lm(formula = mpg ~ hp + am, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.384 -2.264  0.137  1.697  5.866 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 26.58491    1.42509   18.65  < 2e-16 ***
## hp          -0.05889    0.00786   -7.50  2.9e-08 ***
## am           5.27709    1.07954    4.89  3.5e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.91 on 29 degrees of freedom
## Multiple R-squared:  0.782,  Adjusted R-squared:  0.767 
## F-statistic:   52 on 2 and 29 DF,  p-value: 2.55e-10
fit.qsec <- lm(mpg ~ qsec, data=mtcars)
summary(fit.qsec)
## 
## Call:
## lm(formula = mpg ~ qsec, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
##  -9.88  -3.45  -0.72   2.28  11.65 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept)   -5.114     10.030   -0.51    0.614  
## qsec           1.412      0.559    2.53    0.017 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.56 on 30 degrees of freedom
## Multiple R-squared:  0.175,  Adjusted R-squared:  0.148 
## F-statistic: 6.38 on 1 and 30 DF,  p-value: 0.0171
fit.qsec.am <- lm(mpg ~ qsec + am, data=mtcars)
anova(fit.qsec,fit.qsec.am)
## Analysis of Variance Table
## 
## Model 1: mpg ~ qsec
## Model 2: mpg ~ qsec + am
##   Res.Df RSS Df Sum of Sq    F  Pr(>F)    
## 1     30 929                              
## 2     29 353  1       576 47.4 1.5e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(fit.qsec.am)
## 
## Call:
## lm(formula = mpg ~ qsec + am, data = mtcars)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.345 -2.770  0.294  2.095  6.919 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   -18.89       6.60   -2.86   0.0077 ** 
## qsec            1.98       0.36    5.50  6.3e-06 ***
## am              8.88       1.29    6.88  1.5e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.49 on 29 degrees of freedom
## Multiple R-squared:  0.687,  Adjusted R-squared:  0.665 
## F-statistic: 31.8 on 2 and 29 DF,  p-value: 4.88e-08

System info

Our analysis has been originally created and run in RStudio v. 0.98.1080 under OS X 10.9.5.

Time and date the report has been generated: 2014-11-23 22:31:59 (Central European time).