Data

Let’s again consider the AmesHousing data set, which provides information on the sales of individual residential properties in Ames, Iowa from 2006 to 2010. The data set contains 2930 observations, and a large number of explanatory variables involved in assessing home values. A full description of this data set can be found here.

AmesHousing <- read.csv("data/AmesHousing.csv")

After we load any data set, it can be useful to see how big it is

dim(AmesHousing)
## [1] 2930   82

what variable types we have

str(AmesHousing)
## 'data.frame':    2930 obs. of  82 variables:
##  $ Order          : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ PID            : int  526301100 526350040 526351010 526353030 527105010 527105030 527127150 527145080 527146030 527162130 ...
##  $ MS.SubClass    : int  20 20 20 20 60 60 120 120 120 60 ...
##  $ MS.Zoning      : Factor w/ 7 levels "A (agr)","C (all)",..: 6 5 6 6 6 6 6 6 6 6 ...
##  $ Lot.Frontage   : int  141 80 81 93 74 78 41 43 39 60 ...
##  $ Lot.Area       : int  31770 11622 14267 11160 13830 9978 4920 5005 5389 7500 ...
##  $ Street         : Factor w/ 2 levels "Grvl","Pave": 2 2 2 2 2 2 2 2 2 2 ...
##  $ Alley          : Factor w/ 2 levels "Grvl","Pave": NA NA NA NA NA NA NA NA NA NA ...
##  $ Lot.Shape      : Factor w/ 4 levels "IR1","IR2","IR3",..: 1 4 1 4 1 1 4 1 1 4 ...
##  $ Land.Contour   : Factor w/ 4 levels "Bnk","HLS","Low",..: 4 4 4 4 4 4 4 2 4 4 ...
##  $ Utilities      : Factor w/ 3 levels "AllPub","NoSeWa",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ Lot.Config     : Factor w/ 5 levels "Corner","CulDSac",..: 1 5 1 1 5 5 5 5 5 5 ...
##  $ Land.Slope     : Factor w/ 3 levels "Gtl","Mod","Sev": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Neighborhood   : Factor w/ 28 levels "Blmngtn","Blueste",..: 16 16 16 16 9 9 25 25 25 9 ...
##  $ Condition.1    : Factor w/ 9 levels "Artery","Feedr",..: 3 2 3 3 3 3 3 3 3 3 ...
##  $ Condition.2    : Factor w/ 8 levels "Artery","Feedr",..: 3 3 3 3 3 3 3 3 3 3 ...
##  $ Bldg.Type      : Factor w/ 5 levels "1Fam","2fmCon",..: 1 1 1 1 1 1 5 5 5 1 ...
##  $ House.Style    : Factor w/ 8 levels "1.5Fin","1.5Unf",..: 3 3 3 3 6 6 3 3 3 6 ...
##  $ Overall.Qual   : int  6 5 6 7 5 6 8 8 8 7 ...
##  $ Overall.Cond   : int  5 6 6 5 5 6 5 5 5 5 ...
##  $ Year.Built     : int  1960 1961 1958 1968 1997 1998 2001 1992 1995 1999 ...
##  $ Year.Remod.Add : int  1960 1961 1958 1968 1998 1998 2001 1992 1996 1999 ...
##  $ Roof.Style     : Factor w/ 6 levels "Flat","Gable",..: 4 2 4 4 2 2 2 2 2 2 ...
##  $ Roof.Matl      : Factor w/ 8 levels "ClyTile","CompShg",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Exterior.1st   : Factor w/ 16 levels "AsbShng","AsphShn",..: 4 14 15 4 14 14 6 7 6 14 ...
##  $ Exterior.2nd   : Factor w/ 17 levels "AsbShng","AsphShn",..: 11 15 16 4 15 15 6 7 6 15 ...
##  $ Mas.Vnr.Type   : Factor w/ 6 levels "","BrkCmn","BrkFace",..: 6 5 3 5 5 3 5 5 5 5 ...
##  $ Mas.Vnr.Area   : int  112 0 108 0 0 20 0 0 0 0 ...
##  $ Exter.Qual     : Factor w/ 4 levels "Ex","Fa","Gd",..: 4 4 4 3 4 4 3 3 3 4 ...
##  $ Exter.Cond     : Factor w/ 5 levels "Ex","Fa","Gd",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ Foundation     : Factor w/ 6 levels "BrkTil","CBlock",..: 2 2 2 2 3 3 3 3 3 3 ...
##  $ Bsmt.Qual      : Factor w/ 6 levels "","Ex","Fa","Gd",..: 6 6 6 6 4 6 4 4 4 6 ...
##  $ Bsmt.Cond      : Factor w/ 6 levels "","Ex","Fa","Gd",..: 4 6 6 6 6 6 6 6 6 6 ...
##  $ Bsmt.Exposure  : Factor w/ 5 levels "","Av","Gd","Mn",..: 3 5 5 5 5 5 4 5 5 5 ...
##  $ BsmtFin.Type.1 : Factor w/ 7 levels "","ALQ","BLQ",..: 3 6 2 2 4 4 4 2 4 7 ...
##  $ BsmtFin.SF.1   : int  639 468 923 1065 791 602 616 263 1180 0 ...
##  $ BsmtFin.Type.2 : Factor w/ 7 levels "","ALQ","BLQ",..: 7 5 7 7 7 7 7 7 7 7 ...
##  $ BsmtFin.SF.2   : int  0 144 0 0 0 0 0 0 0 0 ...
##  $ Bsmt.Unf.SF    : int  441 270 406 1045 137 324 722 1017 415 994 ...
##  $ Total.Bsmt.SF  : int  1080 882 1329 2110 928 926 1338 1280 1595 994 ...
##  $ Heating        : Factor w/ 6 levels "Floor","GasA",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Heating.QC     : Factor w/ 5 levels "Ex","Fa","Gd",..: 2 5 5 1 3 1 1 1 1 3 ...
##  $ Central.Air    : Factor w/ 2 levels "N","Y": 2 2 2 2 2 2 2 2 2 2 ...
##  $ Electrical     : Factor w/ 6 levels "","FuseA","FuseF",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ X1st.Flr.SF    : int  1656 896 1329 2110 928 926 1338 1280 1616 1028 ...
##  $ X2nd.Flr.SF    : int  0 0 0 0 701 678 0 0 0 776 ...
##  $ Low.Qual.Fin.SF: int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Gr.Liv.Area    : int  1656 896 1329 2110 1629 1604 1338 1280 1616 1804 ...
##  $ Bsmt.Full.Bath : int  1 0 0 1 0 0 1 0 1 0 ...
##  $ Bsmt.Half.Bath : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Full.Bath      : int  1 1 1 2 2 2 2 2 2 2 ...
##  $ Half.Bath      : int  0 0 1 1 1 1 0 0 0 1 ...
##  $ Bedroom.AbvGr  : int  3 2 3 3 3 3 2 2 2 3 ...
##  $ Kitchen.AbvGr  : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Kitchen.Qual   : Factor w/ 5 levels "Ex","Fa","Gd",..: 5 5 3 1 5 3 3 3 3 3 ...
##  $ TotRms.AbvGrd  : int  7 5 6 8 6 7 6 5 5 7 ...
##  $ Functional     : Factor w/ 8 levels "Maj1","Maj2",..: 8 8 8 8 8 8 8 8 8 8 ...
##  $ Fireplaces     : int  2 0 0 2 1 1 0 0 1 1 ...
##  $ Fireplace.Qu   : Factor w/ 5 levels "Ex","Fa","Gd",..: 3 NA NA 5 5 3 NA NA 5 5 ...
##  $ Garage.Type    : Factor w/ 6 levels "2Types","Attchd",..: 2 2 2 2 2 2 2 2 2 2 ...
##  $ Garage.Yr.Blt  : int  1960 1961 1958 1968 1997 1998 2001 1992 1995 1999 ...
##  $ Garage.Finish  : Factor w/ 4 levels "","Fin","RFn",..: 2 4 4 2 2 2 2 3 3 2 ...
##  $ Garage.Cars    : int  2 1 1 2 2 2 2 2 2 2 ...
##  $ Garage.Area    : int  528 730 312 522 482 470 582 506 608 442 ...
##  $ Garage.Qual    : Factor w/ 6 levels "","Ex","Fa","Gd",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ Garage.Cond    : Factor w/ 6 levels "","Ex","Fa","Gd",..: 6 6 6 6 6 6 6 6 6 6 ...
##  $ Paved.Drive    : Factor w/ 3 levels "N","P","Y": 2 3 3 3 3 3 3 3 3 3 ...
##  $ Wood.Deck.SF   : int  210 140 393 0 212 360 0 0 237 140 ...
##  $ Open.Porch.SF  : int  62 0 36 0 34 36 0 82 152 60 ...
##  $ Enclosed.Porch : int  0 0 0 0 0 0 170 0 0 0 ...
##  $ X3Ssn.Porch    : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Screen.Porch   : int  0 120 0 0 0 0 0 144 0 0 ...
##  $ Pool.Area      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Pool.QC        : Factor w/ 4 levels "Ex","Fa","Gd",..: NA NA NA NA NA NA NA NA NA NA ...
##  $ Fence          : Factor w/ 4 levels "GdPrv","GdWo",..: NA 3 NA NA 3 NA NA NA NA NA ...
##  $ Misc.Feature   : Factor w/ 5 levels "Elev","Gar2",..: NA NA 2 NA NA NA NA NA NA NA ...
##  $ Misc.Val       : int  0 0 12500 0 0 0 0 0 0 0 ...
##  $ Mo.Sold        : int  5 6 6 4 3 6 4 1 3 6 ...
##  $ Yr.Sold        : int  2010 2010 2010 2010 2010 2010 2010 2010 2010 2010 ...
##  $ Sale.Type      : Factor w/ 10 levels "COD","Con","ConLD",..: 10 10 10 10 10 10 10 10 10 10 ...
##  $ Sale.Condition : Factor w/ 6 levels "Abnorml","AdjLand",..: 5 5 5 5 5 5 5 5 5 5 ...
##  $ SalePrice      : int  215000 105000 172000 244000 189900 195500 213500 191500 236500 189000 ...

and the first few rows

head(AmesHousing)
Order PID MS.SubClass MS.Zoning Lot.Frontage Lot.Area Street Alley Lot.Shape Land.Contour Utilities Lot.Config Land.Slope Neighborhood Condition.1 Condition.2 Bldg.Type House.Style Overall.Qual Overall.Cond Year.Built Year.Remod.Add Roof.Style Roof.Matl Exterior.1st Exterior.2nd Mas.Vnr.Type Mas.Vnr.Area Exter.Qual Exter.Cond Foundation Bsmt.Qual Bsmt.Cond Bsmt.Exposure BsmtFin.Type.1 BsmtFin.SF.1 BsmtFin.Type.2 BsmtFin.SF.2 Bsmt.Unf.SF Total.Bsmt.SF Heating Heating.QC Central.Air Electrical X1st.Flr.SF X2nd.Flr.SF Low.Qual.Fin.SF Gr.Liv.Area Bsmt.Full.Bath Bsmt.Half.Bath Full.Bath Half.Bath Bedroom.AbvGr Kitchen.AbvGr Kitchen.Qual TotRms.AbvGrd Functional Fireplaces Fireplace.Qu Garage.Type Garage.Yr.Blt Garage.Finish Garage.Cars Garage.Area Garage.Qual Garage.Cond Paved.Drive Wood.Deck.SF Open.Porch.SF Enclosed.Porch X3Ssn.Porch Screen.Porch Pool.Area Pool.QC Fence Misc.Feature Misc.Val Mo.Sold Yr.Sold Sale.Type Sale.Condition SalePrice
1 526301100 20 RL 141 31770 Pave NA IR1 Lvl AllPub Corner Gtl NAmes Norm Norm 1Fam 1Story 6 5 1960 1960 Hip CompShg BrkFace Plywood Stone 112 TA TA CBlock TA Gd Gd BLQ 639 Unf 0 441 1080 GasA Fa Y SBrkr 1656 0 0 1656 1 0 1 0 3 1 TA 7 Typ 2 Gd Attchd 1960 Fin 2 528 TA TA P 210 62 0 0 0 0 NA NA NA 0 5 2010 WD Normal 215000
2 526350040 20 RH 80 11622 Pave NA Reg Lvl AllPub Inside Gtl NAmes Feedr Norm 1Fam 1Story 5 6 1961 1961 Gable CompShg VinylSd VinylSd None 0 TA TA CBlock TA TA No Rec 468 LwQ 144 270 882 GasA TA Y SBrkr 896 0 0 896 0 0 1 0 2 1 TA 5 Typ 0 NA Attchd 1961 Unf 1 730 TA TA Y 140 0 0 0 120 0 NA MnPrv NA 0 6 2010 WD Normal 105000
3 526351010 20 RL 81 14267 Pave NA IR1 Lvl AllPub Corner Gtl NAmes Norm Norm 1Fam 1Story 6 6 1958 1958 Hip CompShg Wd Sdng Wd Sdng BrkFace 108 TA TA CBlock TA TA No ALQ 923 Unf 0 406 1329 GasA TA Y SBrkr 1329 0 0 1329 0 0 1 1 3 1 Gd 6 Typ 0 NA Attchd 1958 Unf 1 312 TA TA Y 393 36 0 0 0 0 NA NA Gar2 12500 6 2010 WD Normal 172000
4 526353030 20 RL 93 11160 Pave NA Reg Lvl AllPub Corner Gtl NAmes Norm Norm 1Fam 1Story 7 5 1968 1968 Hip CompShg BrkFace BrkFace None 0 Gd TA CBlock TA TA No ALQ 1065 Unf 0 1045 2110 GasA Ex Y SBrkr 2110 0 0 2110 1 0 2 1 3 1 Ex 8 Typ 2 TA Attchd 1968 Fin 2 522 TA TA Y 0 0 0 0 0 0 NA NA NA 0 4 2010 WD Normal 244000
5 527105010 60 RL 74 13830 Pave NA IR1 Lvl AllPub Inside Gtl Gilbert Norm Norm 1Fam 2Story 5 5 1997 1998 Gable CompShg VinylSd VinylSd None 0 TA TA PConc Gd TA No GLQ 791 Unf 0 137 928 GasA Gd Y SBrkr 928 701 0 1629 0 0 2 1 3 1 TA 6 Typ 1 TA Attchd 1997 Fin 2 482 TA TA Y 212 34 0 0 0 0 NA MnPrv NA 0 3 2010 WD Normal 189900
6 527105030 60 RL 78 9978 Pave NA IR1 Lvl AllPub Inside Gtl Gilbert Norm Norm 1Fam 2Story 6 6 1998 1998 Gable CompShg VinylSd VinylSd BrkFace 20 TA TA PConc TA TA No GLQ 602 Unf 0 324 926 GasA Ex Y SBrkr 926 678 0 1604 0 0 2 1 3 1 Gd 7 Typ 1 Gd Attchd 1998 Fin 2 470 TA TA Y 360 36 0 0 0 0 NA NA NA 0 6 2010 WD Normal 195500

Displaying the distribution of sales price

In lab we saw how to display univariate and bivariate distributions. For example, we can easily create a histogram of the sale price:

ggplot(data = AmesHousing, mapping = aes(x = SalePrice)) +
  geom_histogram(fill = "steelblue2", color = "black", binwidth = 10000) +
  labs(x = "Sale price (in $)")

Summarizing distributions

How much is a typical home in Ames, IA? The median seems like a reasonable choice.

median(AmesHousing$SalePrice)
## [1] 160000

We can find out more information via the five-number summary:

quantile(AmesHousing$SalePrice)
##     0%    25%    50%    75%   100% 
##  12789 129500 160000 213500 755000

If we need to calculate the IQR, we can do so by hand from the above table, or use the IQR function.

IQR(AmesHousing$SalePrice)
## [1] 84000

Another useful function is the summary function, which can be run a single variable, or an entire data set.

# example with single quantitative variable
summary(AmesHousing$SalePrice)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   12790  129500  160000  180800  213500  755000
# example with single categorical variable
summary(AmesHousing$Central.Air)
##    N    Y 
##  196 2734
# example with entire data set
summary(AmesHousing)
##      Order             PID             MS.SubClass       MS.Zoning   
##  Min.   :   1.0   Min.   :5.263e+08   Min.   : 20.00   A (agr):   2  
##  1st Qu.: 733.2   1st Qu.:5.285e+08   1st Qu.: 20.00   C (all):  25  
##  Median :1465.5   Median :5.355e+08   Median : 50.00   FV     : 139  
##  Mean   :1465.5   Mean   :7.145e+08   Mean   : 57.39   I (all):   2  
##  3rd Qu.:2197.8   3rd Qu.:9.072e+08   3rd Qu.: 70.00   RH     :  27  
##  Max.   :2930.0   Max.   :1.007e+09   Max.   :190.00   RL     :2273  
##                                                        RM     : 462  
##   Lot.Frontage       Lot.Area       Street      Alley      Lot.Shape 
##  Min.   : 21.00   Min.   :  1300   Grvl:  12   Grvl: 120   IR1: 979  
##  1st Qu.: 58.00   1st Qu.:  7440   Pave:2918   Pave:  78   IR2:  76  
##  Median : 68.00   Median :  9436               NA's:2732   IR3:  16  
##  Mean   : 69.22   Mean   : 10148                           Reg:1859  
##  3rd Qu.: 80.00   3rd Qu.: 11555                                     
##  Max.   :313.00   Max.   :215245                                     
##  NA's   :490                                                         
##  Land.Contour  Utilities      Lot.Config   Land.Slope  Neighborhood 
##  Bnk: 117     AllPub:2927   Corner : 511   Gtl:2789   NAmes  : 443  
##  HLS: 120     NoSeWa:   1   CulDSac: 180   Mod: 125   CollgCr: 267  
##  Low:  60     NoSewr:   2   FR2    :  85   Sev:  16   OldTown: 239  
##  Lvl:2633                   FR3    :  14              Edwards: 194  
##                             Inside :2140              Somerst: 182  
##                                                       NridgHt: 166  
##                                                       (Other):1439  
##   Condition.1    Condition.2    Bldg.Type     House.Style  
##  Norm   :2522   Norm   :2900   1Fam  :2425   1Story :1481  
##  Feedr  : 164   Feedr  :  13   2fmCon:  62   2Story : 873  
##  Artery :  92   Artery :   5   Duplex: 109   1.5Fin : 314  
##  RRAn   :  50   PosA   :   4   Twnhs : 101   SLvl   : 128  
##  PosN   :  39   PosN   :   4   TwnhsE: 233   SFoyer :  83  
##  RRAe   :  28   RRNn   :   2                 2.5Unf :  24  
##  (Other):  35   (Other):   2                 (Other):  27  
##   Overall.Qual     Overall.Cond     Year.Built   Year.Remod.Add
##  Min.   : 1.000   Min.   :1.000   Min.   :1872   Min.   :1950  
##  1st Qu.: 5.000   1st Qu.:5.000   1st Qu.:1954   1st Qu.:1965  
##  Median : 6.000   Median :5.000   Median :1973   Median :1993  
##  Mean   : 6.095   Mean   :5.563   Mean   :1971   Mean   :1984  
##  3rd Qu.: 7.000   3rd Qu.:6.000   3rd Qu.:2001   3rd Qu.:2004  
##  Max.   :10.000   Max.   :9.000   Max.   :2010   Max.   :2010  
##                                                                
##    Roof.Style     Roof.Matl     Exterior.1st   Exterior.2nd 
##  Flat   :  20   CompShg:2887   VinylSd:1026   VinylSd:1015  
##  Gable  :2321   Tar&Grv:  23   MetalSd: 450   MetalSd: 447  
##  Gambrel:  22   WdShake:   9   HdBoard: 442   HdBoard: 406  
##  Hip    : 551   WdShngl:   7   Wd Sdng: 420   Wd Sdng: 397  
##  Mansard:  11   ClyTile:   1   Plywood: 221   Plywood: 274  
##  Shed   :   5   Membran:   1   CemntBd: 126   CmentBd: 126  
##                 (Other):   2   (Other): 245   (Other): 265  
##   Mas.Vnr.Type   Mas.Vnr.Area    Exter.Qual Exter.Cond  Foundation  
##         :  23   Min.   :   0.0   Ex: 107    Ex:  12    BrkTil: 311  
##  BrkCmn :  25   1st Qu.:   0.0   Fa:  35    Fa:  67    CBlock:1244  
##  BrkFace: 880   Median :   0.0   Gd: 989    Gd: 299    PConc :1310  
##  CBlock :   1   Mean   : 101.9   TA:1799    Po:   3    Slab  :  49  
##  None   :1752   3rd Qu.: 164.0              TA:2549    Stone :  11  
##  Stone  : 249   Max.   :1600.0                         Wood  :   5  
##                 NA's   :23                                          
##  Bsmt.Qual   Bsmt.Cond   Bsmt.Exposure BsmtFin.Type.1  BsmtFin.SF.1   
##      :   1       :   1       :   4     GLQ    :859    Min.   :   0.0  
##  Ex  : 258   Ex  :   3   Av  : 418     Unf    :851    1st Qu.:   0.0  
##  Fa  :  88   Fa  : 104   Gd  : 284     ALQ    :429    Median : 370.0  
##  Gd  :1219   Gd  : 122   Mn  : 239     Rec    :288    Mean   : 442.6  
##  Po  :   2   Po  :   5   No  :1906     BLQ    :269    3rd Qu.: 734.0  
##  TA  :1283   TA  :2616   NA's:  79     (Other):155    Max.   :5644.0  
##  NA's:  79   NA's:  79                 NA's   : 79    NA's   :1       
##  BsmtFin.Type.2  BsmtFin.SF.2      Bsmt.Unf.SF     Total.Bsmt.SF 
##  Unf    :2499   Min.   :   0.00   Min.   :   0.0   Min.   :   0  
##  Rec    : 106   1st Qu.:   0.00   1st Qu.: 219.0   1st Qu.: 793  
##  LwQ    :  89   Median :   0.00   Median : 466.0   Median : 990  
##  BLQ    :  68   Mean   :  49.72   Mean   : 559.3   Mean   :1052  
##  ALQ    :  53   3rd Qu.:   0.00   3rd Qu.: 802.0   3rd Qu.:1302  
##  (Other):  36   Max.   :1526.00   Max.   :2336.0   Max.   :6110  
##  NA's   :  79   NA's   :1         NA's   :1        NA's   :1     
##   Heating     Heating.QC Central.Air Electrical    X1st.Flr.SF    
##  Floor:   1   Ex:1495    N: 196           :   1   Min.   : 334.0  
##  GasA :2885   Fa:  92    Y:2734      FuseA: 188   1st Qu.: 876.2  
##  GasW :  27   Gd: 476                FuseF:  50   Median :1084.0  
##  Grav :   9   Po:   3                FuseP:   8   Mean   :1159.6  
##  OthW :   2   TA: 864                Mix  :   1   3rd Qu.:1384.0  
##  Wall :   6                          SBrkr:2682   Max.   :5095.0  
##                                                                   
##   X2nd.Flr.SF     Low.Qual.Fin.SF     Gr.Liv.Area   Bsmt.Full.Bath  
##  Min.   :   0.0   Min.   :   0.000   Min.   : 334   Min.   :0.0000  
##  1st Qu.:   0.0   1st Qu.:   0.000   1st Qu.:1126   1st Qu.:0.0000  
##  Median :   0.0   Median :   0.000   Median :1442   Median :0.0000  
##  Mean   : 335.5   Mean   :   4.677   Mean   :1500   Mean   :0.4314  
##  3rd Qu.: 703.8   3rd Qu.:   0.000   3rd Qu.:1743   3rd Qu.:1.0000  
##  Max.   :2065.0   Max.   :1064.000   Max.   :5642   Max.   :3.0000  
##                                                     NA's   :2       
##  Bsmt.Half.Bath      Full.Bath       Half.Bath      Bedroom.AbvGr  
##  Min.   :0.00000   Min.   :0.000   Min.   :0.0000   Min.   :0.000  
##  1st Qu.:0.00000   1st Qu.:1.000   1st Qu.:0.0000   1st Qu.:2.000  
##  Median :0.00000   Median :2.000   Median :0.0000   Median :3.000  
##  Mean   :0.06113   Mean   :1.567   Mean   :0.3795   Mean   :2.854  
##  3rd Qu.:0.00000   3rd Qu.:2.000   3rd Qu.:1.0000   3rd Qu.:3.000  
##  Max.   :2.00000   Max.   :4.000   Max.   :2.0000   Max.   :8.000  
##  NA's   :2                                                         
##  Kitchen.AbvGr   Kitchen.Qual TotRms.AbvGrd      Functional  
##  Min.   :0.000   Ex: 205      Min.   : 2.000   Typ    :2728  
##  1st Qu.:1.000   Fa:  70      1st Qu.: 5.000   Min2   :  70  
##  Median :1.000   Gd:1160      Median : 6.000   Min1   :  65  
##  Mean   :1.044   Po:   1      Mean   : 6.443   Mod    :  35  
##  3rd Qu.:1.000   TA:1494      3rd Qu.: 7.000   Maj1   :  19  
##  Max.   :3.000                Max.   :15.000   Maj2   :   9  
##                                                (Other):   4  
##    Fireplaces     Fireplace.Qu  Garage.Type   Garage.Yr.Blt  Garage.Finish
##  Min.   :0.0000   Ex  :  43    2Types :  23   Min.   :1895       :   2    
##  1st Qu.:0.0000   Fa  :  75    Attchd :1731   1st Qu.:1960   Fin : 728    
##  Median :1.0000   Gd  : 744    Basment:  36   Median :1979   RFn : 812    
##  Mean   :0.5993   Po  :  46    BuiltIn: 186   Mean   :1978   Unf :1231    
##  3rd Qu.:1.0000   TA  : 600    CarPort:  15   3rd Qu.:2002   NA's: 157    
##  Max.   :4.0000   NA's:1422    Detchd : 782   Max.   :2207                
##                                NA's   : 157   NA's   :159                 
##   Garage.Cars     Garage.Area     Garage.Qual Garage.Cond Paved.Drive
##  Min.   :0.000   Min.   :   0.0       :   1       :   1   N: 216     
##  1st Qu.:1.000   1st Qu.: 320.0   Ex  :   3   Ex  :   3   P:  62     
##  Median :2.000   Median : 480.0   Fa  : 124   Fa  :  74   Y:2652     
##  Mean   :1.767   Mean   : 472.8   Gd  :  24   Gd  :  15              
##  3rd Qu.:2.000   3rd Qu.: 576.0   Po  :   5   Po  :  14              
##  Max.   :5.000   Max.   :1488.0   TA  :2615   TA  :2665              
##  NA's   :1       NA's   :1        NA's: 158   NA's: 158              
##   Wood.Deck.SF     Open.Porch.SF    Enclosed.Porch     X3Ssn.Porch     
##  Min.   :   0.00   Min.   :  0.00   Min.   :   0.00   Min.   :  0.000  
##  1st Qu.:   0.00   1st Qu.:  0.00   1st Qu.:   0.00   1st Qu.:  0.000  
##  Median :   0.00   Median : 27.00   Median :   0.00   Median :  0.000  
##  Mean   :  93.75   Mean   : 47.53   Mean   :  23.01   Mean   :  2.592  
##  3rd Qu.: 168.00   3rd Qu.: 70.00   3rd Qu.:   0.00   3rd Qu.:  0.000  
##  Max.   :1424.00   Max.   :742.00   Max.   :1012.00   Max.   :508.000  
##                                                                        
##   Screen.Porch   Pool.Area       Pool.QC       Fence      Misc.Feature
##  Min.   :  0   Min.   :  0.000   Ex  :   4   GdPrv: 118   Elev:   1   
##  1st Qu.:  0   1st Qu.:  0.000   Fa  :   2   GdWo : 112   Gar2:   5   
##  Median :  0   Median :  0.000   Gd  :   4   MnPrv: 330   Othr:   4   
##  Mean   : 16   Mean   :  2.243   TA  :   3   MnWw :  12   Shed:  95   
##  3rd Qu.:  0   3rd Qu.:  0.000   NA's:2917   NA's :2358   TenC:   1   
##  Max.   :576   Max.   :800.000                            NA's:2824   
##                                                                       
##     Misc.Val           Mo.Sold          Yr.Sold       Sale.Type   
##  Min.   :    0.00   Min.   : 1.000   Min.   :2006   WD     :2536  
##  1st Qu.:    0.00   1st Qu.: 4.000   1st Qu.:2007   New    : 239  
##  Median :    0.00   Median : 6.000   Median :2008   COD    :  87  
##  Mean   :   50.63   Mean   : 6.216   Mean   :2008   ConLD  :  26  
##  3rd Qu.:    0.00   3rd Qu.: 8.000   3rd Qu.:2009   CWD    :  12  
##  Max.   :17000.00   Max.   :12.000   Max.   :2010   ConLI  :   9  
##                                                     (Other):  21  
##  Sale.Condition   SalePrice     
##  Abnorml: 190   Min.   : 12789  
##  AdjLand:  12   1st Qu.:129500  
##  Alloca :  24   Median :160000  
##  Family :  46   Mean   :180796  
##  Normal :2413   3rd Qu.:213500  
##  Partial: 245   Max.   :755000  
## 

Other useful summary statistics functions