carprice                package:DAAG                R Documentation

_U_S _C_a_r _P_r_i_c_e _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     carprice

_F_o_r_m_a_t:

     This data frame contains the following columns:

     _T_y_p_e Type of car, e.g. Sporty, Van, Compact

     _M_i_n._P_r_i_c_e Price for a basic model

     _P_r_i_c_e Price for a mid-range model

     _M_a_x._P_r_i_c_e Price for a `premium' model

     _R_a_n_g_e._P_r_i_c_e Difference between Max.Price and Min.Price

     _R_o_u_g_h_R_a_n_g_e Rough.Range plus some N(0,.0001) noise

     _g_p_m_1_0_0 The number of gallons required to travel 100 miles

     _M_P_G._c_i_t_y Average number of miles per gallon for city driving

     _M_P_G._h_i_g_h_w_a_y Average number of miles per gallon for highway 
          driving

_S_o_u_r_c_e:

     MASS package

_R_e_f_e_r_e_n_c_e_s:

     Venables, W.N. and Ripley, B.D., 3$^{rd}$ edn 1999. Modern Applied
     Statistics with S-Plus. Springer, New York.\ See also `R'
     Complements to Modern Applied Statistics with S-Plus, available
     from \ http://www.stats.ox.ac.uk/pub/MASS3/.

_E_x_a_m_p_l_e_s:

      
     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

