DAM PROJECT

GROUP 6

Impact of COD on E-commerce Sales

Navin Chandran
Deepak Krishnan
R Santosh Kumar
Sivaramakrishnan R
Karuppaiya A
P Mohan Prashanth
P Praveen

Describing Data

The objective of this project is to determine what factors effect the COD purchase of products on E-commerce.

Reading data

Libraries Used

Importing and cleaning data

cod.df = read.csv("PromotionDataV4.csv")
cod.df$isMetro <- ifelse(cod.df$ShippingCity %like% "Delhi" | cod.df$ShippingCity %like% "Mumbai" | cod.df$ShippingCity %like% "Kolkata" | cod.df$ShippingCity %like% "Chennai" | cod.df$ShippingCity %like% "Bangalore" | cod.df$ShippingCity %like% "Hyderabad",1,0)
cod.df$isAddressSame <- ifelse(cod.df$ShippingPincode == cod.df$BillingPincode,1,0)
cod <- subset(cod.df,FinalTotalPrice!=0)
attach(cod)

Unique Customers

cod.df$CustomerID <- as.numeric(cod.df$CustomerID)
unique_customers<-unique(cod.df$CustomerID)
length(unique_customers)
[1] 31869

Effect of City on COD

mytable <- xtabs(~COD + isMetro)
prop.table(mytable,2)*100
   isMetro
COD        0        1
  0 33.79280 46.82649
  1 66.20720 53.17351

Contrary to the populistic view that people in Metros prefer electronic payment, it is seen from the data that Metro cities are more inclined towards COD.

This could be attributed to the increased liquidity of money in the Metro cities.

Effect of Difference in Addresses on COD

mytable <- xtabs(~COD + isAddressSame)
prop.table(mytable,2)*100
   isAddressSame
COD        0        1
  0 36.10063 39.35489
  1 63.89937 60.64511

If the Billing Address and Shipping Address are different, then it might indicate that the product might be intended as a gift to someone else.

Correlation Matrix

cod_df <- cod[,c("FinalTotalPrice","COD",
"VendorDiscount","WebsiteDiscount")]
cod_mat <- rcorr(as.matrix(cod_df), type="pearson")
cod_mat
                FinalTotalPrice   COD VendorDiscount WebsiteDiscount
FinalTotalPrice            1.00  0.09           0.10            0.31
COD                        0.09  1.00           0.01           -0.05
VendorDiscount             0.10  0.01           1.00           -0.33
WebsiteDiscount            0.31 -0.05          -0.33            1.00

n= 45507 


P
                FinalTotalPrice COD   VendorDiscount WebsiteDiscount
FinalTotalPrice                 0.000 0.000          0.000          
COD             0.000                 0.027          0.000          
VendorDiscount  0.000           0.027                0.000          
WebsiteDiscount 0.000           0.000 0.000                         

Correlation between Price and Discount

corrgram(cod[,c("FinalTotalPrice",
"VendorDiscount","WebsiteDiscount")], lower.panel = panel.shade, upper.panel = panel.pie)

plot of chunk unnamed-chunk-7

Correlation between COD and Discounts

corrgram(cod[,c("COD","HasVendorDiscount",
"HasWebsiteDiscount")], lower.panel = panel.shade, 
upper.panel = panel.pie)

plot of chunk unnamed-chunk-8

Finding the best model using glmulti

selector <- glmulti(FinalTotalPrice ~ SubCategory+Brand+ProductSize+ProductColor+COD+VendorDiscount+WebsiteDiscount+isMetro+ShippingState+isAddressSame, data = cod,level = 1,fitfunction = lm,crit = "aicc",confsetsize = 128)

GlMulti is a library which has been used to arrive upon the best fir model from across all given attributes. It is better than step function as it inherently takes into consideration pair wise interactions.

Based on glmulti initiating best model

model <- lm(FinalTotalPrice~1+SubCategory+Brand+ProductSize+
ProductColor+COD+VendorDiscount+WebsiteDiscount+isMetro+isAddressSame,data = cod)
summary(model)

Call:
lm(formula = FinalTotalPrice ~ 1 + SubCategory + Brand + ProductSize + 
    ProductColor + COD + VendorDiscount + WebsiteDiscount + isMetro + 
    isAddressSame, data = cod)

Residuals:
    Min      1Q  Median      3Q     Max 
-2230.5  -106.1   -16.8    86.7  5590.1 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)
(Intercept)                          1.016e+01  1.001e+02   0.102 0.919114
SubCategoryASYMMETRIC DRESS          2.659e+02  7.108e+01   3.741 0.000184
SubCategoryBEACHWEAR                -8.713e+01  1.148e+02  -0.759 0.447815
SubCategoryBODYCON DRESS             3.883e+02  6.299e+01   6.165 7.09e-10
SubCategoryCAMISOLES                -3.310e+02  6.014e+01  -5.503 3.74e-08
SubCategoryCAPRIS                    2.565e+02  5.907e+01   4.342 1.41e-05
SubCategoryCAPS & HATS               2.641e+02  4.994e+01   5.287 1.25e-07
SubCategoryCASUAL JACKETS            1.256e+03  5.342e+01  23.513  < 2e-16
SubCategoryCASUAL SHIRTS             1.390e+02  5.012e+01   2.774 0.005545
SubCategoryCHINOS                    6.017e+02  5.361e+01  11.225  < 2e-16
SubCategoryDENIM JACKETS             4.492e+02  7.572e+01   5.933 3.00e-09
SubCategoryDRESSES                   4.046e+02  4.818e+01   8.396  < 2e-16
SubCategoryETHNIC JACKETS            6.472e+02  5.466e+01  11.841  < 2e-16
SubCategoryFORMAL SHIRTS            -8.119e+01  1.517e+02  -0.535 0.592510
SubCategoryFORMAL TROUSERS           4.886e+02  8.400e+01   5.817 6.03e-09
SubCategoryGSTOP235BLK               2.044e+02  2.084e+02   0.981 0.326766
SubCategoryHENLEY T-SHIRTS          -1.554e+01  4.902e+01  -0.317 0.751173
SubCategoryHIGH NECK T SHIRTS        5.195e+01  4.911e+01   1.058 0.290180
SubCategoryJACKETS & BLAZERS         3.038e+03  6.192e+01  49.056  < 2e-16
SubCategoryJEANS                     5.054e+02  1.511e+02   3.345 0.000825
SubCategoryJEGGINGS                  5.449e+02  5.039e+01  10.814  < 2e-16
SubCategoryJUMPSUITS                 5.317e+02  5.073e+01  10.481  < 2e-16
SubCategoryKURTAS                    2.043e+02  5.179e+01   3.944 8.03e-05
SubCategoryKURTIS                    1.211e+02  5.124e+01   2.364 0.018061
SubCategoryLEGGINGS                 -1.099e+01  6.080e+01  -0.181 0.856565
SubCategoryLOUNGEWEAR                1.524e+01  1.267e+02   0.120 0.904247
SubCategoryMANDARIN T-SHIRTS         1.982e+02  5.651e+01   3.507 0.000453
SubCategoryNIGHTWEAR                -1.713e+01  5.787e+01  -0.296 0.767199
SubCategoryOFF SHOULDER/TUBE/HALTER  3.913e+02  1.266e+02   3.091 0.001997
SubCategoryPOLO-T-SHIRTS             6.875e+01  4.882e+01   1.408 0.159059
SubCategoryQUILTED JACKETS           5.974e+02  1.516e+02   3.940 8.15e-05
SubCategoryROUND NECK SWEATERS       3.941e+02  6.408e+01   6.149 7.86e-10
SubCategoryROUND NECK T-SHIRTS      -6.346e+01  4.889e+01  -1.298 0.194300
SubCategoryROUND NECK VESTS         -1.210e+02  7.147e+01  -1.693 0.090557
SubCategorySALWAR                    1.327e+02  5.454e+01   2.432 0.015008
SubCategorySCARVES                  -3.146e+02  9.366e+01  -3.359 0.000783
SubCategorySHIFT DRESS               1.776e+02  5.708e+01   3.111 0.001867
SubCategorySHIRTS                    1.740e+02  4.827e+01   3.606 0.000312
SubCategorySHORTS                   -1.487e+01  4.964e+01  -0.300 0.764488
SubCategorySHRUGS                    8.123e+01  5.017e+01   1.619 0.105423
SubCategorySKATER DRESS              3.030e+02  6.004e+01   5.046 4.53e-07
SubCategorySKIRTS                    2.920e+02  4.869e+01   5.998 2.01e-09
SubCategorySTOCKINGS                -6.470e+02  2.097e+02  -3.085 0.002036
SubCategorySUITS                     1.826e+03  5.852e+01  31.212  < 2e-16
SubCategorySUMMER JACKETS            8.949e+02  1.122e+02   7.978 1.53e-15
SubCategorySWEATERS                  1.670e+02  5.146e+01   3.244 0.001177
SubCategorySWEATSHIRTS               5.551e+02  5.303e+01  10.467  < 2e-16
SubCategoryT SHIRTS                 -3.786e+01  4.870e+01  -0.777 0.436906
SubCategoryTOPS                      4.762e+00  4.814e+01   0.099 0.921216
SubCategoryTRACK PANTS               4.889e+02  5.519e+01   8.858  < 2e-16
SubCategoryTRACKPANTS                1.471e+03  1.513e+02   9.724  < 2e-16
SubCategoryTRACKSUITS                3.219e+03  2.085e+02  15.441  < 2e-16
SubCategoryTROUSERS                  1.963e+02  4.857e+01   4.042 5.32e-05
SubCategoryTUNICS                    8.090e+01  5.161e+01   1.568 0.117000
SubCategoryV NECK SWEATERS           1.993e+02  9.120e+01   2.185 0.028881
SubCategoryV NECK T-SHIRTS          -1.317e+02  4.900e+01  -2.687 0.007204
SubCategoryWAISTCOATS                4.596e+02  5.037e+01   9.125  < 2e-16
SubCategoryWINTER JACKETS            6.721e+02  4.902e+01  13.711  < 2e-16
BrandFABALLEY                        7.872e+01  4.715e+00  16.694  < 2e-16
BrandGRITSTONES                     -2.053e+02  8.832e+00 -23.248  < 2e-16
BrandHARPA                           4.293e+01  4.666e+00   9.200  < 2e-16
BrandMEIRA                          -2.912e+02  5.096e+00 -57.152  < 2e-16
BrandMISS CHASE                      5.042e+01  6.516e+00   7.738 1.03e-14
BrandMONTEIL & MUNERO               -1.384e+02  9.392e+00 -14.733  < 2e-16
BrandMR BUTTON                       8.946e+02  1.363e+01  65.642  < 2e-16
BrandTHE VANCA                      -3.946e+01  5.142e+00  -7.674 1.70e-14
BrandTSHIRT COMPANY                  5.170e+01  7.635e+00   6.772 1.29e-11
ProductSize30                        2.949e+01  3.797e+01   0.777 0.437375
ProductSize32                        1.551e+01  3.599e+01   0.431 0.666429
ProductSize34                       -5.880e+01  4.401e+01  -1.336 0.181502
ProductSize36                        3.445e+01  5.772e+01   0.597 0.550683
ProductSize38                        6.825e+02  3.546e+01  19.243  < 2e-16
ProductSize3XL                       5.067e+02  5.778e+01   8.770  < 2e-16
ProductSize40                        7.226e+02  3.530e+01  20.472  < 2e-16
ProductSize42                        7.081e+02  3.594e+01  19.702  < 2e-16
ProductSize44                        7.167e+02  3.897e+01  18.389  < 2e-16
ProductSize46                        2.309e+02  2.061e+02   1.120 0.262613
ProductSizeFree Size                 7.578e+02  3.983e+01  19.028  < 2e-16
ProductSizeL                         3.811e+02  3.149e+01  12.101  < 2e-16
ProductSizeM                         3.838e+02  3.149e+01  12.187  < 2e-16
ProductSizeS                         3.749e+02  3.150e+01  11.900  < 2e-16
ProductSizeXL                        3.900e+02  3.153e+01  12.370  < 2e-16
ProductSizeXS                        3.590e+02  3.256e+01  11.026  < 2e-16
ProductSizeXXL                       3.913e+02  3.180e+01  12.305  < 2e-16
ProductColorAQUA BLUE                3.420e+02  8.325e+01   4.108 4.00e-05
ProductColorBEIGE                    3.846e+02  8.313e+01   4.626 3.73e-06
ProductColorBLACK                    3.436e+02  8.279e+01   4.151 3.32e-05
ProductColorBLUE                     3.613e+02  8.285e+01   4.361 1.30e-05
ProductColorBROWN                    3.201e+02  8.334e+01   3.841 0.000123
ProductColorCAMEL                    3.625e+02  1.229e+02   2.950 0.003177
ProductColorCHARCOAL GREY            4.163e+02  1.434e+02   2.904 0.003691
ProductColorCOBALT BLUE              7.987e+02  8.893e+01   8.981  < 2e-16
ProductColorCOFFEE                   4.151e+02  8.674e+01   4.786 1.71e-06
ProductColorCREAM                    3.549e+02  8.453e+01   4.199 2.69e-05
ProductColorDARK GREY                2.043e+02  8.418e+01   2.427 0.015235
ProductColorFUCHSIA                  3.541e+02  8.316e+01   4.258 2.07e-05
ProductColorGOLDEN                   5.809e+02  8.461e+01   6.865 6.72e-12
ProductColorGREEN                    3.139e+02  8.292e+01   3.786 0.000153
ProductColorGREY                     3.304e+02  8.291e+01   3.986 6.74e-05
ProductColorGREY MILANGE             3.143e+02  8.328e+01   3.774 0.000161
ProductColorICE BLUE                 4.285e+02  9.543e+01   4.490 7.12e-06
ProductColorKHAKI                    3.441e+02  8.490e+01   4.053 5.07e-05
ProductColorLAVENDER                 1.586e+03  1.667e+02   9.519  < 2e-16
ProductColorLEMON                    2.140e+02  9.175e+01   2.332 0.019691
ProductColorLIGHT BLUE               3.027e+02  8.951e+01   3.382 0.000720
ProductColorLIGHT GREY               2.704e+02  8.379e+01   3.227 0.001252
ProductColorLILAC                    1.108e+02  1.312e+02   0.844 0.398483
ProductColorMAGENTA                  1.925e+02  2.189e+02   0.880 0.379109
ProductColorMAROON                   3.240e+02  8.304e+01   3.902 9.56e-05
ProductColorMULTI                    2.897e+02  8.297e+01   3.492 0.000480
ProductColorMUSTARD YELLOW           2.475e+02  8.549e+01   2.895 0.003793
ProductColorNAVY BLUE                3.705e+02  8.289e+01   4.471 7.82e-06
ProductColorNUDE                     3.805e+02  8.380e+01   4.540 5.64e-06
ProductColorOFF WHITE                3.634e+02  8.440e+01   4.306 1.67e-05
ProductColorOLIVE                    4.065e+02  8.413e+01   4.832 1.36e-06
ProductColorORANGE                   3.205e+02  8.299e+01   3.862 0.000113
ProductColorPEACH                    3.789e+02  8.309e+01   4.560 5.12e-06
ProductColorPINK                     3.836e+02  8.289e+01   4.628 3.71e-06
ProductColorPURPLE                   2.947e+02  8.312e+01   3.545 0.000393
ProductColorRED                      3.705e+02  8.284e+01   4.472 7.77e-06
ProductColorRUST                     4.230e+02  8.444e+01   5.010 5.48e-07
ProductColorSILVER                   8.798e+02  9.127e+01   9.639  < 2e-16
ProductColorTAN                      1.021e+03  2.199e+02   4.640 3.49e-06
ProductColorVIOLET INDIGO            3.145e+02  8.649e+01   3.636 0.000277
ProductColorWHITE                    3.416e+02  8.290e+01   4.121 3.78e-05
ProductColorWINE                     3.882e+02  8.444e+01   4.597 4.30e-06
ProductColorYELLOW                   3.025e+02  8.310e+01   3.640 0.000273
COD                                  4.668e+01  1.984e+00  23.522  < 2e-16
VendorDiscount                      -4.513e-01  5.587e-03 -80.772  < 2e-16
WebsiteDiscount                     -2.541e-01  8.449e-03 -30.073  < 2e-16
isMetro                             -1.073e-01  1.962e+00  -0.055 0.956370
isAddressSame                        2.152e+01  3.117e+00   6.904 5.13e-12

(Intercept)                            
SubCategoryASYMMETRIC DRESS         ***
SubCategoryBEACHWEAR                   
SubCategoryBODYCON DRESS            ***
SubCategoryCAMISOLES                ***
SubCategoryCAPRIS                   ***
SubCategoryCAPS & HATS              ***
SubCategoryCASUAL JACKETS           ***
SubCategoryCASUAL SHIRTS            ** 
SubCategoryCHINOS                   ***
SubCategoryDENIM JACKETS            ***
SubCategoryDRESSES                  ***
SubCategoryETHNIC JACKETS           ***
SubCategoryFORMAL SHIRTS               
SubCategoryFORMAL TROUSERS          ***
SubCategoryGSTOP235BLK                 
SubCategoryHENLEY T-SHIRTS             
SubCategoryHIGH NECK T SHIRTS          
SubCategoryJACKETS & BLAZERS        ***
SubCategoryJEANS                    ***
SubCategoryJEGGINGS                 ***
SubCategoryJUMPSUITS                ***
SubCategoryKURTAS                   ***
SubCategoryKURTIS                   *  
SubCategoryLEGGINGS                    
SubCategoryLOUNGEWEAR                  
SubCategoryMANDARIN T-SHIRTS        ***
SubCategoryNIGHTWEAR                   
SubCategoryOFF SHOULDER/TUBE/HALTER ** 
SubCategoryPOLO-T-SHIRTS               
SubCategoryQUILTED JACKETS          ***
SubCategoryROUND NECK SWEATERS      ***
SubCategoryROUND NECK T-SHIRTS         
SubCategoryROUND NECK VESTS         .  
SubCategorySALWAR                   *  
SubCategorySCARVES                  ***
SubCategorySHIFT DRESS              ** 
SubCategorySHIRTS                   ***
SubCategorySHORTS                      
SubCategorySHRUGS                      
SubCategorySKATER DRESS             ***
SubCategorySKIRTS                   ***
SubCategorySTOCKINGS                ** 
SubCategorySUITS                    ***
SubCategorySUMMER JACKETS           ***
SubCategorySWEATERS                 ** 
SubCategorySWEATSHIRTS              ***
SubCategoryT SHIRTS                    
SubCategoryTOPS                        
SubCategoryTRACK PANTS              ***
SubCategoryTRACKPANTS               ***
SubCategoryTRACKSUITS               ***
SubCategoryTROUSERS                 ***
SubCategoryTUNICS                      
SubCategoryV NECK SWEATERS          *  
SubCategoryV NECK T-SHIRTS          ** 
SubCategoryWAISTCOATS               ***
SubCategoryWINTER JACKETS           ***
BrandFABALLEY                       ***
BrandGRITSTONES                     ***
BrandHARPA                          ***
BrandMEIRA                          ***
BrandMISS CHASE                     ***
BrandMONTEIL & MUNERO               ***
BrandMR BUTTON                      ***
BrandTHE VANCA                      ***
BrandTSHIRT COMPANY                 ***
ProductSize30                          
ProductSize32                          
ProductSize34                          
ProductSize36                          
ProductSize38                       ***
ProductSize3XL                      ***
ProductSize40                       ***
ProductSize42                       ***
ProductSize44                       ***
ProductSize46                          
ProductSizeFree Size                ***
ProductSizeL                        ***
ProductSizeM                        ***
ProductSizeS                        ***
ProductSizeXL                       ***
ProductSizeXS                       ***
ProductSizeXXL                      ***
ProductColorAQUA BLUE               ***
ProductColorBEIGE                   ***
ProductColorBLACK                   ***
ProductColorBLUE                    ***
ProductColorBROWN                   ***
ProductColorCAMEL                   ** 
ProductColorCHARCOAL GREY           ** 
ProductColorCOBALT BLUE             ***
ProductColorCOFFEE                  ***
ProductColorCREAM                   ***
ProductColorDARK GREY               *  
ProductColorFUCHSIA                 ***
ProductColorGOLDEN                  ***
ProductColorGREEN                   ***
ProductColorGREY                    ***
ProductColorGREY MILANGE            ***
ProductColorICE BLUE                ***
ProductColorKHAKI                   ***
ProductColorLAVENDER                ***
ProductColorLEMON                   *  
ProductColorLIGHT BLUE              ***
ProductColorLIGHT GREY              ** 
ProductColorLILAC                      
ProductColorMAGENTA                    
ProductColorMAROON                  ***
ProductColorMULTI                   ***
ProductColorMUSTARD YELLOW          ** 
ProductColorNAVY BLUE               ***
ProductColorNUDE                    ***
ProductColorOFF WHITE               ***
ProductColorOLIVE                   ***
ProductColorORANGE                  ***
ProductColorPEACH                   ***
ProductColorPINK                    ***
ProductColorPURPLE                  ***
ProductColorRED                     ***
ProductColorRUST                    ***
ProductColorSILVER                  ***
ProductColorTAN                     ***
ProductColorVIOLET INDIGO           ***
ProductColorWHITE                   ***
ProductColorWINE                    ***
ProductColorYELLOW                  ***
COD                                 ***
VendorDiscount                      ***
WebsiteDiscount                     ***
isMetro                                
isAddressSame                       ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 202.6 on 45375 degrees of freedom
Multiple R-squared:  0.6415,    Adjusted R-squared:  0.6405 
F-statistic: 619.8 on 131 and 45375 DF,  p-value: < 2.2e-16

Checking & Removing Outliers

test <- outlierTest(model, n.max = 150, order = FALSE, digits = 3)
rownum <- names(test$bonf.p)
codnew <- cod[!(rownames(cod) %in% rownum),]
summary(model)

Call:
lm(formula = FinalTotalPrice ~ 1 + SubCategory + Brand + ProductSize + 
    ProductColor + COD + VendorDiscount + WebsiteDiscount + isMetro + 
    isAddressSame, data = codnew)

Residuals:
    Min      1Q  Median      3Q     Max 
-979.23 -101.26  -13.64   87.76 1088.50 

Coefficients:
                                      Estimate Std. Error  t value
(Intercept)                          3.433e+01  9.018e+01    0.381
SubCategoryASYMMETRIC DRESS          2.873e+02  6.405e+01    4.485
SubCategoryBEACHWEAR                -8.934e+01  1.034e+02   -0.864
SubCategoryBODYCON DRESS             4.116e+02  5.676e+01    7.252
SubCategoryCAMISOLES                -3.321e+02  5.420e+01   -6.128
SubCategoryCAPRIS                    2.583e+02  5.324e+01    4.853
SubCategoryCAPS & HATS               2.791e+02  4.501e+01    6.200
SubCategoryCASUAL JACKETS            1.341e+03  4.839e+01   27.720
SubCategoryCASUAL SHIRTS             1.114e+02  4.518e+01    2.466
SubCategoryCHINOS                    6.460e+02  4.831e+01   13.372
SubCategoryDENIM JACKETS             4.724e+02  6.824e+01    6.923
SubCategoryDRESSES                   4.046e+02  4.342e+01    9.317
SubCategoryETHNIC JACKETS            7.175e+02  4.927e+01   14.560
SubCategoryFORMAL SHIRTS            -2.518e+01  1.367e+02   -0.184
SubCategoryFORMAL TROUSERS           5.447e+02  7.570e+01    7.195
SubCategoryGSTOP235BLK               2.111e+02  1.878e+02    1.124
SubCategoryHENLEY T-SHIRTS          -2.998e+00  4.417e+01   -0.068
SubCategoryHIGH NECK T SHIRTS        6.332e+01  4.426e+01    1.431
SubCategoryJACKETS & BLAZERS         3.784e+03  1.884e+02   20.081
SubCategoryJEANS                     5.256e+02  1.362e+02    3.859
SubCategoryJEGGINGS                  5.640e+02  4.541e+01   12.419
SubCategoryJUMPSUITS                 5.203e+02  4.579e+01   11.363
SubCategoryKURTAS                    2.275e+02  4.667e+01    4.875
SubCategoryKURTIS                    1.108e+02  4.617e+01    2.399
SubCategoryLEGGINGS                  8.706e+00  5.479e+01    0.159
SubCategoryLOUNGEWEAR                2.032e+01  1.142e+02    0.178
SubCategoryMANDARIN T-SHIRTS         2.144e+02  5.093e+01    4.209
SubCategoryNIGHTWEAR                -2.554e+01  5.216e+01   -0.490
SubCategoryOFF SHOULDER/TUBE/HALTER  4.454e+02  1.141e+02    3.904
SubCategoryPOLO-T-SHIRTS             8.223e+01  4.400e+01    1.869
SubCategoryQUILTED JACKETS           6.610e+02  1.366e+02    4.838
SubCategoryROUND NECK SWEATERS       4.427e+02  5.775e+01    7.665
SubCategoryROUND NECK T-SHIRTS      -4.942e+01  4.406e+01   -1.121
SubCategoryROUND NECK VESTS         -6.502e+01  6.442e+01   -1.009
SubCategorySALWAR                    1.513e+02  4.915e+01    3.079
SubCategorySCARVES                  -3.178e+02  8.441e+01   -3.765
SubCategorySHIFT DRESS               1.885e+02  5.144e+01    3.664
SubCategorySHIRTS                    1.828e+02  4.350e+01    4.202
SubCategorySHORTS                   -8.373e+00  4.473e+01   -0.187
SubCategorySHRUGS                    1.004e+02  4.521e+01    2.220
SubCategorySKATER DRESS              3.217e+02  5.411e+01    5.946
SubCategorySKIRTS                    3.011e+02  4.387e+01    6.863
SubCategorySTOCKINGS                -6.528e+02  1.890e+02   -3.454
SubCategorySUITS                     1.751e+03  5.288e+01   33.112
SubCategorySUMMER JACKETS            8.995e+02  1.011e+02    8.898
SubCategorySWEATERS                  1.822e+02  4.638e+01    3.928
SubCategorySWEATSHIRTS               6.090e+02  4.780e+01   12.742
SubCategoryT SHIRTS                 -6.163e+00  4.389e+01   -0.140
SubCategoryTOPS                      7.293e+00  4.339e+01    0.168
SubCategoryTRACK PANTS               5.404e+02  4.974e+01   10.864
SubCategoryTRACKPANTS                1.518e+03  1.364e+02   11.132
SubCategoryTRACKSUITS                3.261e+03  1.879e+02   17.357
SubCategoryTROUSERS                  1.982e+02  4.377e+01    4.528
SubCategoryTUNICS                    9.435e+01  4.651e+01    2.029
SubCategoryV NECK SWEATERS           2.350e+02  8.218e+01    2.859
SubCategoryV NECK T-SHIRTS          -1.219e+02  4.415e+01   -2.761
SubCategoryWAISTCOATS                4.535e+02  4.542e+01    9.984
SubCategoryWINTER JACKETS            6.889e+02  4.419e+01   15.590
BrandFABALLEY                        6.704e+01  4.256e+00   15.751
BrandGRITSTONES                     -2.447e+02  7.979e+00  -30.665
BrandHARPA                           3.895e+01  4.210e+00    9.251
BrandMEIRA                          -3.100e+02  4.606e+00  -67.310
BrandMISS CHASE                      4.797e+01  5.887e+00    8.149
BrandMONTEIL & MUNERO               -1.611e+02  8.474e+00  -19.006
BrandMR BUTTON                       8.592e+02  1.234e+01   69.610
BrandTHE VANCA                      -4.172e+01  4.645e+00   -8.982
BrandTSHIRT COMPANY                 -2.009e+01  7.000e+00   -2.870
ProductSize30                        3.437e+01  3.422e+01    1.005
ProductSize32                        2.496e+01  3.243e+01    0.770
ProductSize34                       -4.675e+01  3.966e+01   -1.179
ProductSize36                        5.465e+01  5.202e+01    1.050
ProductSize38                        7.790e+02  3.201e+01   24.337
ProductSize3XL                       5.108e+02  5.207e+01    9.810
ProductSize40                        7.994e+02  3.184e+01   25.106
ProductSize42                        8.058e+02  3.244e+01   24.837
ProductSize44                        7.956e+02  3.518e+01   22.617
ProductSize46                        2.361e+02  1.858e+02    1.271
ProductSizeFree Size                 7.726e+02  3.589e+01   21.525
ProductSizeL                         3.891e+02  2.838e+01   13.709
ProductSizeM                         3.936e+02  2.838e+01   13.869
ProductSizeS                         3.836e+02  2.839e+01   13.511
ProductSizeXL                        4.014e+02  2.841e+01   14.126
ProductSizeXS                        3.636e+02  2.935e+01   12.387
ProductSizeXXL                       3.998e+02  2.866e+01   13.950
ProductColorAQUA BLUE                3.424e+02  7.502e+01    4.565
ProductColorBEIGE                    3.875e+02  7.491e+01    5.172
ProductColorBLACK                    3.441e+02  7.461e+01    4.612
ProductColorBLUE                     3.625e+02  7.466e+01    4.856
ProductColorBROWN                    3.169e+02  7.511e+01    4.220
ProductColorCAMEL                    3.552e+02  1.107e+02    3.209
ProductColorCHARCOAL GREY            4.069e+02  1.292e+02    3.149
ProductColorCOBALT BLUE              8.156e+02  8.014e+01   10.176
ProductColorCOFFEE                   4.499e+02  7.822e+01    5.752
ProductColorCREAM                    3.494e+02  7.618e+01    4.586
ProductColorDARK GREY                2.675e+02  7.590e+01    3.525
ProductColorFUCHSIA                  3.620e+02  7.494e+01    4.830
ProductColorGOLDEN                   5.520e+02  7.629e+01    7.236
ProductColorGREEN                    3.137e+02  7.472e+01    4.199
ProductColorGREY                     3.374e+02  7.472e+01    4.516
ProductColorGREY MILANGE             3.119e+02  7.505e+01    4.156
ProductColorICE BLUE                 3.791e+02  8.657e+01    4.379
ProductColorKHAKI                    3.316e+02  7.651e+01    4.335
ProductColorLEMON                    2.009e+02  8.268e+01    2.429
ProductColorLIGHT BLUE               3.147e+02  8.066e+01    3.902
ProductColorLIGHT GREY               2.692e+02  7.551e+01    3.565
ProductColorLILAC                    1.543e+02  1.183e+02    1.305
ProductColorMAGENTA                  1.822e+02  1.972e+02    0.924
ProductColorMAROON                   3.170e+02  7.483e+01    4.237
ProductColorMULTI                    2.927e+02  7.477e+01    3.914
ProductColorMUSTARD YELLOW           2.666e+02  7.704e+01    3.460
ProductColorNAVY BLUE                3.666e+02  7.469e+01    4.908
ProductColorNUDE                     3.766e+02  7.552e+01    4.987
ProductColorOFF WHITE                3.696e+02  7.605e+01    4.860
ProductColorOLIVE                    3.760e+02  7.584e+01    4.958
ProductColorORANGE                   3.131e+02  7.479e+01    4.186
ProductColorPEACH                    3.789e+02  7.488e+01    5.060
ProductColorPINK                     3.904e+02  7.469e+01    5.227
ProductColorPURPLE                   2.888e+02  7.490e+01    3.855
ProductColorRED                      3.702e+02  7.465e+01    4.959
ProductColorRUST                     4.152e+02  7.610e+01    5.456
ProductColorSILVER                   8.127e+02  8.281e+01    9.814
ProductColorTAN                      1.064e+03  1.983e+02    5.365
ProductColorVIOLET INDIGO            3.131e+02  7.794e+01    4.017
ProductColorWHITE                    3.406e+02  7.471e+01    4.559
ProductColorWINE                     3.798e+02  7.609e+01    4.992
ProductColorYELLOW                   3.016e+02  7.488e+01    4.027
COD                                  4.347e+01  1.791e+00   24.269
VendorDiscount                      -5.289e-01  5.173e-03 -102.248
WebsiteDiscount                     -3.316e-01  7.814e-03  -42.443
isMetro                             -8.610e-01  1.771e+00   -0.486
isAddressSame                        1.856e+01  2.813e+00    6.596
                                    Pr(>|t|)    
(Intercept)                         0.703417    
SubCategoryASYMMETRIC DRESS         7.29e-06 ***
SubCategoryBEACHWEAR                0.387752    
SubCategoryBODYCON DRESS            4.18e-13 ***
SubCategoryCAMISOLES                8.97e-10 ***
SubCategoryCAPRIS                   1.22e-06 ***
SubCategoryCAPS & HATS              5.68e-10 ***
SubCategoryCASUAL JACKETS            < 2e-16 ***
SubCategoryCASUAL SHIRTS            0.013661 *  
SubCategoryCHINOS                    < 2e-16 ***
SubCategoryDENIM JACKETS            4.48e-12 ***
SubCategoryDRESSES                   < 2e-16 ***
SubCategoryETHNIC JACKETS            < 2e-16 ***
SubCategoryFORMAL SHIRTS            0.853887    
SubCategoryFORMAL TROUSERS          6.35e-13 ***
SubCategoryGSTOP235BLK              0.261018    
SubCategoryHENLEY T-SHIRTS          0.945893    
SubCategoryHIGH NECK T SHIRTS       0.152537    
SubCategoryJACKETS & BLAZERS         < 2e-16 ***
SubCategoryJEANS                    0.000114 ***
SubCategoryJEGGINGS                  < 2e-16 ***
SubCategoryJUMPSUITS                 < 2e-16 ***
SubCategoryKURTAS                   1.09e-06 ***
SubCategoryKURTIS                   0.016437 *  
SubCategoryLEGGINGS                 0.873762    
SubCategoryLOUNGEWEAR               0.858724    
SubCategoryMANDARIN T-SHIRTS        2.57e-05 ***
SubCategoryNIGHTWEAR                0.624361    
SubCategoryOFF SHOULDER/TUBE/HALTER 9.47e-05 ***
SubCategoryPOLO-T-SHIRTS            0.061616 .  
SubCategoryQUILTED JACKETS          1.32e-06 ***
SubCategoryROUND NECK SWEATERS      1.82e-14 ***
SubCategoryROUND NECK T-SHIRTS      0.262087    
SubCategoryROUND NECK VESTS         0.312794    
SubCategorySALWAR                   0.002076 ** 
SubCategorySCARVES                  0.000167 ***
SubCategorySHIFT DRESS              0.000249 ***
SubCategorySHIRTS                   2.66e-05 ***
SubCategorySHORTS                   0.851533    
SubCategorySHRUGS                   0.026400 *  
SubCategorySKATER DRESS             2.76e-09 ***
SubCategorySKIRTS                   6.81e-12 ***
SubCategorySTOCKINGS                0.000553 ***
SubCategorySUITS                     < 2e-16 ***
SubCategorySUMMER JACKETS            < 2e-16 ***
SubCategorySWEATERS                 8.57e-05 ***
SubCategorySWEATSHIRTS               < 2e-16 ***
SubCategoryT SHIRTS                 0.888333    
SubCategoryTOPS                     0.866512    
SubCategoryTRACK PANTS               < 2e-16 ***
SubCategoryTRACKPANTS                < 2e-16 ***
SubCategoryTRACKSUITS                < 2e-16 ***
SubCategoryTROUSERS                 5.98e-06 ***
SubCategoryTUNICS                   0.042510 *  
SubCategoryV NECK SWEATERS          0.004249 ** 
SubCategoryV NECK T-SHIRTS          0.005764 ** 
SubCategoryWAISTCOATS                < 2e-16 ***
SubCategoryWINTER JACKETS            < 2e-16 ***
BrandFABALLEY                        < 2e-16 ***
BrandGRITSTONES                      < 2e-16 ***
BrandHARPA                           < 2e-16 ***
BrandMEIRA                           < 2e-16 ***
BrandMISS CHASE                     3.76e-16 ***
BrandMONTEIL & MUNERO                < 2e-16 ***
BrandMR BUTTON                       < 2e-16 ***
BrandTHE VANCA                       < 2e-16 ***
BrandTSHIRT COMPANY                 0.004102 ** 
ProductSize30                       0.315131    
ProductSize32                       0.441540    
ProductSize34                       0.238536    
ProductSize36                       0.293506    
ProductSize38                        < 2e-16 ***
ProductSize3XL                       < 2e-16 ***
ProductSize40                        < 2e-16 ***
ProductSize42                        < 2e-16 ***
ProductSize44                        < 2e-16 ***
ProductSize46                       0.203807    
ProductSizeFree Size                 < 2e-16 ***
ProductSizeL                         < 2e-16 ***
ProductSizeM                         < 2e-16 ***
ProductSizeS                         < 2e-16 ***
ProductSizeXL                        < 2e-16 ***
ProductSizeXS                        < 2e-16 ***
ProductSizeXXL                       < 2e-16 ***
ProductColorAQUA BLUE               5.02e-06 ***
ProductColorBEIGE                   2.32e-07 ***
ProductColorBLACK                   3.99e-06 ***
ProductColorBLUE                    1.20e-06 ***
ProductColorBROWN                   2.45e-05 ***
ProductColorCAMEL                   0.001335 ** 
ProductColorCHARCOAL GREY           0.001639 ** 
ProductColorCOBALT BLUE              < 2e-16 ***
ProductColorCOFFEE                  8.88e-09 ***
ProductColorCREAM                   4.52e-06 ***
ProductColorDARK GREY               0.000425 ***
ProductColorFUCHSIA                 1.37e-06 ***
ProductColorGOLDEN                  4.70e-13 ***
ProductColorGREEN                   2.69e-05 ***
ProductColorGREY                    6.33e-06 ***
ProductColorGREY MILANGE            3.25e-05 ***
ProductColorICE BLUE                1.19e-05 ***
ProductColorKHAKI                   1.46e-05 ***
ProductColorLEMON                   0.015138 *  
ProductColorLIGHT BLUE              9.55e-05 ***
ProductColorLIGHT GREY              0.000364 ***
ProductColorLILAC                   0.192011    
ProductColorMAGENTA                 0.355641    
ProductColorMAROON                  2.27e-05 ***
ProductColorMULTI                   9.08e-05 ***
ProductColorMUSTARD YELLOW          0.000540 ***
ProductColorNAVY BLUE               9.24e-07 ***
ProductColorNUDE                    6.17e-07 ***
ProductColorOFF WHITE               1.18e-06 ***
ProductColorOLIVE                   7.14e-07 ***
ProductColorORANGE                  2.85e-05 ***
ProductColorPEACH                   4.21e-07 ***
ProductColorPINK                    1.73e-07 ***
ProductColorPURPLE                  0.000116 ***
ProductColorRED                     7.13e-07 ***
ProductColorRUST                    4.89e-08 ***
ProductColorSILVER                   < 2e-16 ***
ProductColorTAN                     8.12e-08 ***
ProductColorVIOLET INDIGO           5.90e-05 ***
ProductColorWHITE                   5.15e-06 ***
ProductColorWINE                    6.01e-07 ***
ProductColorYELLOW                  5.65e-05 ***
COD                                  < 2e-16 ***
VendorDiscount                       < 2e-16 ***
WebsiteDiscount                      < 2e-16 ***
isMetro                             0.626806    
isAddressSame                       4.26e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 182.6 on 45230 degrees of freedom
Multiple R-squared:  0.667, Adjusted R-squared:  0.6661 
F-statistic:   697 on 130 and 45230 DF,  p-value: < 2.2e-16

Data Comparison

dim(cod)
[1] 45507    31

Adjusted R square : 64.05%

dim(codnew)
[1] 45361    31

Adjusted R square : 66.61%

Checking the Assumptions

We will now proceed with testing the assumptions of linear regression

Visual inspection code

par(mfrow=c(2,2))
plot(model,1)
plot(model,2)

plot of chunk unnamed-chunk-16

Shapiro & AdTest

shapiro.test(FinalTotalPrice)

Shapiro test cannot be used in this case as the number of data points in the given data is very huge.

ad.test(FinalTotalPrice)

    Anderson-Darling normality test

data:  FinalTotalPrice
A = 1561.4, p-value < 2.2e-16

From the p-value of Adtest, we can see that the data is not normal. To rectify that we will now do a box-cox transformation of the data.

Performing Box-Cox Transform

newprice = BoxCoxTrans(cod$FinalTotalPrice)
newprice
Box-Cox Transformation

45507 data points used to estimate Lambda

Input data summary:
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   7.35  532.35  677.95  761.28  883.91 6977.95 

Largest/Smallest: 949 
Sample Skewness: 2.58 

Estimated Lambda: 0 
With fudge factor, Lambda = 0 will be used for transformations

Transformed Model

modelnew <- lm(PriceNew~1+SubCategory+Brand+ProductSize+ProductColor+COD+VendorDiscount+WebsiteDiscount+isMetro+isAddressSame,data = cod)
summary(modelnew)

Call:
lm(formula = PriceNew ~ 1 + SubCategory + Brand + ProductSize + 
    ProductColor + COD + VendorDiscount + WebsiteDiscount + isMetro + 
    isAddressSame, data = cod)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.3087 -0.1262  0.0021  0.1342  2.8053 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)
(Intercept)                          5.742e+00  1.183e-01  48.543  < 2e-16
SubCategoryASYMMETRIC DRESS          3.684e-01  8.402e-02   4.385 1.16e-05
SubCategoryBEACHWEAR                -2.768e-02  1.357e-01  -0.204 0.838304
SubCategoryBODYCON DRESS             4.782e-01  7.445e-02   6.424 1.34e-10
SubCategoryCAMISOLES                -4.884e-01  7.108e-02  -6.871 6.46e-12
SubCategoryCAPRIS                    3.459e-01  6.982e-02   4.954 7.30e-07
SubCategoryCAPS & HATS               3.549e-01  5.903e-02   6.013 1.84e-09
SubCategoryCASUAL JACKETS            1.315e+00  6.314e-02  20.820  < 2e-16
SubCategoryCASUAL SHIRTS             1.733e-01  5.924e-02   2.925 0.003447
SubCategoryCHINOS                    6.951e-01  6.336e-02  10.971  < 2e-16
SubCategoryDENIM JACKETS             6.153e-01  8.950e-02   6.875 6.28e-12
SubCategoryDRESSES                   5.037e-01  5.695e-02   8.844  < 2e-16
SubCategoryETHNIC JACKETS            5.640e-01  6.460e-02   8.730  < 2e-16
SubCategoryFORMAL SHIRTS             1.183e-01  1.793e-01   0.660 0.509539
SubCategoryFORMAL TROUSERS           6.579e-01  9.928e-02   6.627 3.47e-11
SubCategoryGSTOP235BLK               3.293e-01  2.463e-01   1.337 0.181281
SubCategoryHENLEY T-SHIRTS           1.596e-02  5.794e-02   0.276 0.782924
SubCategoryHIGH NECK T SHIRTS        1.200e-01  5.805e-02   2.068 0.038674
SubCategoryJACKETS & BLAZERS         2.107e+00  7.319e-02  28.791  < 2e-16
SubCategoryJEANS                     6.632e-01  1.786e-01   3.713 0.000205
SubCategoryJEGGINGS                  6.499e-01  5.956e-02  10.912  < 2e-16
SubCategoryJUMPSUITS                 5.784e-01  5.996e-02   9.646  < 2e-16
SubCategoryKURTAS                    2.462e-01  6.121e-02   4.022 5.79e-05
SubCategoryKURTIS                    2.238e-01  6.056e-02   3.695 0.000220
SubCategoryLEGGINGS                  3.188e-02  7.186e-02   0.444 0.657267
SubCategoryLOUNGEWEAR                3.860e-02  1.497e-01   0.258 0.796538
SubCategoryMANDARIN T-SHIRTS         3.827e-01  6.680e-02   5.729 1.02e-08
SubCategoryNIGHTWEAR                -5.186e-03  6.841e-02  -0.076 0.939566
SubCategoryOFF SHOULDER/TUBE/HALTER  5.502e-01  1.496e-01   3.677 0.000236
SubCategoryPOLO-T-SHIRTS             1.587e-01  5.770e-02   2.750 0.005959
SubCategoryQUILTED JACKETS           7.495e-01  1.792e-01   4.182 2.89e-05
SubCategoryROUND NECK SWEATERS       6.392e-01  7.575e-02   8.438  < 2e-16
SubCategoryROUND NECK T-SHIRTS      -5.518e-02  5.779e-02  -0.955 0.339720
SubCategoryROUND NECK VESTS         -7.100e-02  8.447e-02  -0.841 0.400609
SubCategorySALWAR                    1.356e-01  6.446e-02   2.104 0.035376
SubCategorySCARVES                  -4.074e-01  1.107e-01  -3.680 0.000233
SubCategorySHIFT DRESS               2.724e-01  6.747e-02   4.037 5.42e-05
SubCategorySHIRTS                    2.647e-01  5.706e-02   4.639 3.52e-06
SubCategorySHORTS                   -1.402e-02  5.867e-02  -0.239 0.811157
SubCategorySHRUGS                    1.258e-01  5.930e-02   2.121 0.033929
SubCategorySKATER DRESS              4.145e-01  7.097e-02   5.841 5.22e-09
SubCategorySKIRTS                    3.698e-01  5.754e-02   6.426 1.33e-10
SubCategorySTOCKINGS                -8.581e-01  2.479e-01  -3.462 0.000537
SubCategorySUITS                     1.626e+00  6.916e-02  23.506  < 2e-16
SubCategorySUMMER JACKETS            8.478e-01  1.326e-01   6.394 1.64e-10
SubCategorySWEATERS                  2.547e-01  6.083e-02   4.188 2.82e-05
SubCategorySWEATSHIRTS               7.675e-01  6.268e-02  12.245  < 2e-16
SubCategoryT SHIRTS                  2.893e-03  5.756e-02   0.050 0.959912
SubCategoryTOPS                      2.129e-02  5.691e-02   0.374 0.708332
SubCategoryTRACK PANTS               7.579e-01  6.523e-02  11.619  < 2e-16
SubCategoryTRACKPANTS                1.131e+00  1.788e-01   6.323 2.58e-10
SubCategoryTRACKSUITS                1.763e+00  2.464e-01   7.155 8.49e-13
SubCategoryTROUSERS                  2.815e-01  5.741e-02   4.903 9.48e-07
SubCategoryTUNICS                    1.272e-01  6.100e-02   2.086 0.037016
SubCategoryV NECK SWEATERS           3.825e-01  1.078e-01   3.549 0.000388
SubCategoryV NECK T-SHIRTS          -2.092e-01  5.791e-02  -3.612 0.000305
SubCategoryWAISTCOATS                4.702e-01  5.953e-02   7.898 2.89e-15
SubCategoryWINTER JACKETS            8.004e-01  5.794e-02  13.813  < 2e-16
BrandFABALLEY                        9.279e-02  5.573e-03  16.649  < 2e-16
BrandGRITSTONES                     -2.623e-01  1.044e-02 -25.122  < 2e-16
BrandHARPA                           5.967e-02  5.515e-03  10.819  < 2e-16
BrandMEIRA                          -3.969e-01  6.023e-03 -65.900  < 2e-16
BrandMISS CHASE                      5.577e-02  7.702e-03   7.241 4.51e-13
BrandMONTEIL & MUNERO               -2.585e-01  1.110e-02 -23.283  < 2e-16
BrandMR BUTTON                       7.814e-01  1.611e-02  48.512  < 2e-16
BrandTHE VANCA                      -5.638e-02  6.078e-03  -9.275  < 2e-16
BrandTSHIRT COMPANY                  3.304e-02  9.024e-03   3.661 0.000251
ProductSize30                        1.788e-02  4.488e-02   0.399 0.690263
ProductSize32                        1.337e-03  4.253e-02   0.031 0.974918
ProductSize34                       -4.061e-02  5.202e-02  -0.781 0.434989
ProductSize36                        2.968e-02  6.823e-02   0.435 0.663597
ProductSize38                        9.434e-01  4.192e-02  22.506  < 2e-16
ProductSize3XL                       5.041e-01  6.830e-02   7.381 1.60e-13
ProductSize40                        9.735e-01  4.172e-02  23.334  < 2e-16
ProductSize42                        9.710e-01  4.248e-02  22.858  < 2e-16
ProductSize44                        9.643e-01  4.607e-02  20.932  < 2e-16
ProductSize46                        3.133e-01  2.436e-01   1.286 0.198427
ProductSizeFree Size                 8.575e-01  4.707e-02  18.216  < 2e-16
ProductSizeL                         4.188e-01  3.722e-02  11.251  < 2e-16
ProductSizeM                         4.216e-01  3.722e-02  11.326  < 2e-16
ProductSizeS                         4.108e-01  3.724e-02  11.032  < 2e-16
ProductSizeXL                        4.260e-01  3.727e-02  11.431  < 2e-16
ProductSizeXS                        3.860e-01  3.849e-02  10.029  < 2e-16
ProductSizeXXL                       4.305e-01  3.759e-02  11.455  < 2e-16
ProductColorAQUA BLUE                3.712e-01  9.840e-02   3.772 0.000162
ProductColorBEIGE                    4.219e-01  9.825e-02   4.295 1.75e-05
ProductColorBLACK                    3.709e-01  9.786e-02   3.790 0.000151
ProductColorBLUE                     3.913e-01  9.792e-02   3.996 6.45e-05
ProductColorBROWN                    3.421e-01  9.851e-02   3.473 0.000515
ProductColorCAMEL                    3.160e-01  1.452e-01   2.176 0.029568
ProductColorCHARCOAL GREY            5.402e-01  1.695e-01   3.188 0.001434
ProductColorCOBALT BLUE              7.675e-01  1.051e-01   7.301 2.90e-13
ProductColorCOFFEE                   5.051e-01  1.025e-01   4.927 8.39e-07
ProductColorCREAM                    4.131e-01  9.991e-02   4.135 3.56e-05
ProductColorDARK GREY                2.276e-01  9.949e-02   2.288 0.022165
ProductColorFUCHSIA                  3.931e-01  9.830e-02   3.999 6.36e-05
ProductColorGOLDEN                   5.685e-01  1.000e-01   5.685 1.32e-08
ProductColorGREEN                    3.296e-01  9.801e-02   3.363 0.000772
ProductColorGREY                     3.555e-01  9.800e-02   3.628 0.000286
ProductColorGREY MILANGE             3.344e-01  9.843e-02   3.397 0.000681
ProductColorICE BLUE                 4.578e-01  1.128e-01   4.059 4.93e-05
ProductColorKHAKI                    3.856e-01  1.003e-01   3.842 0.000122
ProductColorLAVENDER                 9.230e-01  1.970e-01   4.686 2.80e-06
ProductColorLEMON                    1.029e-01  1.085e-01   0.949 0.342534
ProductColorLIGHT BLUE               3.187e-01  1.058e-01   3.012 0.002592
ProductColorLIGHT GREY               2.168e-01  9.904e-02   2.189 0.028579
ProductColorLILAC                   -1.415e-03  1.551e-01  -0.009 0.992720
ProductColorMAGENTA                  2.063e-01  2.587e-01   0.797 0.425191
ProductColorMAROON                   3.443e-01  9.815e-02   3.508 0.000452
ProductColorMULTI                    3.183e-01  9.807e-02   3.246 0.001171
ProductColorMUSTARD YELLOW           2.799e-01  1.010e-01   2.770 0.005603
ProductColorNAVY BLUE                4.026e-01  9.797e-02   4.110 3.97e-05
ProductColorNUDE                     4.241e-01  9.905e-02   4.282 1.86e-05
ProductColorOFF WHITE                3.888e-01  9.975e-02   3.897 9.74e-05
ProductColorOLIVE                    4.304e-01  9.943e-02   4.328 1.51e-05
ProductColorORANGE                   3.329e-01  9.810e-02   3.394 0.000690
ProductColorPEACH                    4.117e-01  9.821e-02   4.192 2.77e-05
ProductColorPINK                     4.240e-01  9.797e-02   4.328 1.51e-05
ProductColorPURPLE                   3.088e-01  9.825e-02   3.143 0.001673
ProductColorRED                      3.967e-01  9.792e-02   4.052 5.09e-05
ProductColorRUST                     4.672e-01  9.981e-02   4.681 2.87e-06
ProductColorSILVER                   7.728e-01  1.079e-01   7.163 8.01e-13
ProductColorTAN                      1.138e+00  2.600e-01   4.377 1.20e-05
ProductColorVIOLET INDIGO            3.167e-01  1.022e-01   3.098 0.001949
ProductColorWHITE                    3.765e-01  9.799e-02   3.843 0.000122
ProductColorWINE                     4.476e-01  9.981e-02   4.485 7.31e-06
ProductColorYELLOW                   3.126e-01  9.822e-02   3.182 0.001461
COD                                  5.966e-02  2.346e-03  25.435  < 2e-16
VendorDiscount                      -5.423e-04  6.604e-06 -82.115  < 2e-16
WebsiteDiscount                     -3.031e-04  9.987e-06 -30.349  < 2e-16
isMetro                             -2.710e-03  2.319e-03  -1.169 0.242518
isAddressSame                        1.921e-02  3.684e-03   5.214 1.85e-07

(Intercept)                         ***
SubCategoryASYMMETRIC DRESS         ***
SubCategoryBEACHWEAR                   
SubCategoryBODYCON DRESS            ***
SubCategoryCAMISOLES                ***
SubCategoryCAPRIS                   ***
SubCategoryCAPS & HATS              ***
SubCategoryCASUAL JACKETS           ***
SubCategoryCASUAL SHIRTS            ** 
SubCategoryCHINOS                   ***
SubCategoryDENIM JACKETS            ***
SubCategoryDRESSES                  ***
SubCategoryETHNIC JACKETS           ***
SubCategoryFORMAL SHIRTS               
SubCategoryFORMAL TROUSERS          ***
SubCategoryGSTOP235BLK                 
SubCategoryHENLEY T-SHIRTS             
SubCategoryHIGH NECK T SHIRTS       *  
SubCategoryJACKETS & BLAZERS        ***
SubCategoryJEANS                    ***
SubCategoryJEGGINGS                 ***
SubCategoryJUMPSUITS                ***
SubCategoryKURTAS                   ***
SubCategoryKURTIS                   ***
SubCategoryLEGGINGS                    
SubCategoryLOUNGEWEAR                  
SubCategoryMANDARIN T-SHIRTS        ***
SubCategoryNIGHTWEAR                   
SubCategoryOFF SHOULDER/TUBE/HALTER ***
SubCategoryPOLO-T-SHIRTS            ** 
SubCategoryQUILTED JACKETS          ***
SubCategoryROUND NECK SWEATERS      ***
SubCategoryROUND NECK T-SHIRTS         
SubCategoryROUND NECK VESTS            
SubCategorySALWAR                   *  
SubCategorySCARVES                  ***
SubCategorySHIFT DRESS              ***
SubCategorySHIRTS                   ***
SubCategorySHORTS                      
SubCategorySHRUGS                   *  
SubCategorySKATER DRESS             ***
SubCategorySKIRTS                   ***
SubCategorySTOCKINGS                ***
SubCategorySUITS                    ***
SubCategorySUMMER JACKETS           ***
SubCategorySWEATERS                 ***
SubCategorySWEATSHIRTS              ***
SubCategoryT SHIRTS                    
SubCategoryTOPS                        
SubCategoryTRACK PANTS              ***
SubCategoryTRACKPANTS               ***
SubCategoryTRACKSUITS               ***
SubCategoryTROUSERS                 ***
SubCategoryTUNICS                   *  
SubCategoryV NECK SWEATERS          ***
SubCategoryV NECK T-SHIRTS          ***
SubCategoryWAISTCOATS               ***
SubCategoryWINTER JACKETS           ***
BrandFABALLEY                       ***
BrandGRITSTONES                     ***
BrandHARPA                          ***
BrandMEIRA                          ***
BrandMISS CHASE                     ***
BrandMONTEIL & MUNERO               ***
BrandMR BUTTON                      ***
BrandTHE VANCA                      ***
BrandTSHIRT COMPANY                 ***
ProductSize30                          
ProductSize32                          
ProductSize34                          
ProductSize36                          
ProductSize38                       ***
ProductSize3XL                      ***
ProductSize40                       ***
ProductSize42                       ***
ProductSize44                       ***
ProductSize46                          
ProductSizeFree Size                ***
ProductSizeL                        ***
ProductSizeM                        ***
ProductSizeS                        ***
ProductSizeXL                       ***
ProductSizeXS                       ***
ProductSizeXXL                      ***
ProductColorAQUA BLUE               ***
ProductColorBEIGE                   ***
ProductColorBLACK                   ***
ProductColorBLUE                    ***
ProductColorBROWN                   ***
ProductColorCAMEL                   *  
ProductColorCHARCOAL GREY           ** 
ProductColorCOBALT BLUE             ***
ProductColorCOFFEE                  ***
ProductColorCREAM                   ***
ProductColorDARK GREY               *  
ProductColorFUCHSIA                 ***
ProductColorGOLDEN                  ***
ProductColorGREEN                   ***
ProductColorGREY                    ***
ProductColorGREY MILANGE            ***
ProductColorICE BLUE                ***
ProductColorKHAKI                   ***
ProductColorLAVENDER                ***
ProductColorLEMON                      
ProductColorLIGHT BLUE              ** 
ProductColorLIGHT GREY              *  
ProductColorLILAC                      
ProductColorMAGENTA                    
ProductColorMAROON                  ***
ProductColorMULTI                   ** 
ProductColorMUSTARD YELLOW          ** 
ProductColorNAVY BLUE               ***
ProductColorNUDE                    ***
ProductColorOFF WHITE               ***
ProductColorOLIVE                   ***
ProductColorORANGE                  ***
ProductColorPEACH                   ***
ProductColorPINK                    ***
ProductColorPURPLE                  ** 
ProductColorRED                     ***
ProductColorRUST                    ***
ProductColorSILVER                  ***
ProductColorTAN                     ***
ProductColorVIOLET INDIGO           ** 
ProductColorWHITE                   ***
ProductColorWINE                    ***
ProductColorYELLOW                  ** 
COD                                 ***
VendorDiscount                      ***
WebsiteDiscount                     ***
isMetro                                
isAddressSame                       ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.2395 on 45375 degrees of freedom
Multiple R-squared:  0.6247,    Adjusted R-squared:  0.6236 
F-statistic: 576.5 on 131 and 45375 DF,  p-value: < 2.2e-16

Checking Normality Post Transformation

plot(modelnew,1)

plot of chunk unnamed-chunk-22

plot(modelnew,2)

plot of chunk unnamed-chunk-22

ad.test(PriceNew)

    Anderson-Darling normality test

data:  PriceNew
A = 200.64, p-value < 2.2e-16

Even after BoxCox Transformation, the data does not comply with normality assumptions. Further the Adjusted R square value drops from 66% to 62% for the transformed model. Let us try to look at a Log-linear relationship now.

Log Linear Regression Model

test <- lm(log(FinalTotalPrice)~1+SubCategory+Brand+ProductSize+ProductColor+COD+VendorDiscount+WebsiteDiscount+isMetro+isAddressSame,data = cod)
summary(test)

Call:
lm(formula = log(FinalTotalPrice) ~ 1 + SubCategory + Brand + 
    ProductSize + ProductColor + COD + VendorDiscount + WebsiteDiscount + 
    isMetro + isAddressSame, data = cod)

Residuals:
    Min      1Q  Median      3Q     Max 
-4.3087 -0.1262  0.0021  0.1342  2.8053 

Coefficients:
                                      Estimate Std. Error t value Pr(>|t|)
(Intercept)                          5.742e+00  1.183e-01  48.543  < 2e-16
SubCategoryASYMMETRIC DRESS          3.684e-01  8.402e-02   4.385 1.16e-05
SubCategoryBEACHWEAR                -2.768e-02  1.357e-01  -0.204 0.838304
SubCategoryBODYCON DRESS             4.782e-01  7.445e-02   6.424 1.34e-10
SubCategoryCAMISOLES                -4.884e-01  7.108e-02  -6.871 6.46e-12
SubCategoryCAPRIS                    3.459e-01  6.982e-02   4.954 7.30e-07
SubCategoryCAPS & HATS               3.549e-01  5.903e-02   6.013 1.84e-09
SubCategoryCASUAL JACKETS            1.315e+00  6.314e-02  20.820  < 2e-16
SubCategoryCASUAL SHIRTS             1.733e-01  5.924e-02   2.925 0.003447
SubCategoryCHINOS                    6.951e-01  6.336e-02  10.971  < 2e-16
SubCategoryDENIM JACKETS             6.153e-01  8.950e-02   6.875 6.28e-12
SubCategoryDRESSES                   5.037e-01  5.695e-02   8.844  < 2e-16
SubCategoryETHNIC JACKETS            5.640e-01  6.460e-02   8.730  < 2e-16
SubCategoryFORMAL SHIRTS             1.183e-01  1.793e-01   0.660 0.509539
SubCategoryFORMAL TROUSERS           6.579e-01  9.928e-02   6.627 3.47e-11
SubCategoryGSTOP235BLK               3.293e-01  2.463e-01   1.337 0.181281
SubCategoryHENLEY T-SHIRTS           1.596e-02  5.794e-02   0.276 0.782924
SubCategoryHIGH NECK T SHIRTS        1.200e-01  5.805e-02   2.068 0.038674
SubCategoryJACKETS & BLAZERS         2.107e+00  7.319e-02  28.791  < 2e-16
SubCategoryJEANS                     6.632e-01  1.786e-01   3.713 0.000205
SubCategoryJEGGINGS                  6.499e-01  5.956e-02  10.912  < 2e-16
SubCategoryJUMPSUITS                 5.784e-01  5.996e-02   9.646  < 2e-16
SubCategoryKURTAS                    2.462e-01  6.121e-02   4.022 5.79e-05
SubCategoryKURTIS                    2.238e-01  6.056e-02   3.695 0.000220
SubCategoryLEGGINGS                  3.188e-02  7.186e-02   0.444 0.657267
SubCategoryLOUNGEWEAR                3.860e-02  1.497e-01   0.258 0.796538
SubCategoryMANDARIN T-SHIRTS         3.827e-01  6.680e-02   5.729 1.02e-08
SubCategoryNIGHTWEAR                -5.186e-03  6.841e-02  -0.076 0.939566
SubCategoryOFF SHOULDER/TUBE/HALTER  5.502e-01  1.496e-01   3.677 0.000236
SubCategoryPOLO-T-SHIRTS             1.587e-01  5.770e-02   2.750 0.005959
SubCategoryQUILTED JACKETS           7.495e-01  1.792e-01   4.182 2.89e-05
SubCategoryROUND NECK SWEATERS       6.392e-01  7.575e-02   8.438  < 2e-16
SubCategoryROUND NECK T-SHIRTS      -5.518e-02  5.779e-02  -0.955 0.339720
SubCategoryROUND NECK VESTS         -7.100e-02  8.447e-02  -0.841 0.400609
SubCategorySALWAR                    1.356e-01  6.446e-02   2.104 0.035376
SubCategorySCARVES                  -4.074e-01  1.107e-01  -3.680 0.000233
SubCategorySHIFT DRESS               2.724e-01  6.747e-02   4.037 5.42e-05
SubCategorySHIRTS                    2.647e-01  5.706e-02   4.639 3.52e-06
SubCategorySHORTS                   -1.402e-02  5.867e-02  -0.239 0.811157
SubCategorySHRUGS                    1.258e-01  5.930e-02   2.121 0.033929
SubCategorySKATER DRESS              4.145e-01  7.097e-02   5.841 5.22e-09
SubCategorySKIRTS                    3.698e-01  5.754e-02   6.426 1.33e-10
SubCategorySTOCKINGS                -8.581e-01  2.479e-01  -3.462 0.000537
SubCategorySUITS                     1.626e+00  6.916e-02  23.506  < 2e-16
SubCategorySUMMER JACKETS            8.478e-01  1.326e-01   6.394 1.64e-10
SubCategorySWEATERS                  2.547e-01  6.083e-02   4.188 2.82e-05
SubCategorySWEATSHIRTS               7.675e-01  6.268e-02  12.245  < 2e-16
SubCategoryT SHIRTS                  2.893e-03  5.756e-02   0.050 0.959912
SubCategoryTOPS                      2.129e-02  5.691e-02   0.374 0.708332
SubCategoryTRACK PANTS               7.579e-01  6.523e-02  11.619  < 2e-16
SubCategoryTRACKPANTS                1.131e+00  1.788e-01   6.323 2.58e-10
SubCategoryTRACKSUITS                1.763e+00  2.464e-01   7.155 8.49e-13
SubCategoryTROUSERS                  2.815e-01  5.741e-02   4.903 9.48e-07
SubCategoryTUNICS                    1.272e-01  6.100e-02   2.086 0.037016
SubCategoryV NECK SWEATERS           3.825e-01  1.078e-01   3.549 0.000388
SubCategoryV NECK T-SHIRTS          -2.092e-01  5.791e-02  -3.612 0.000305
SubCategoryWAISTCOATS                4.702e-01  5.953e-02   7.898 2.89e-15
SubCategoryWINTER JACKETS            8.004e-01  5.794e-02  13.813  < 2e-16
BrandFABALLEY                        9.279e-02  5.573e-03  16.649  < 2e-16
BrandGRITSTONES                     -2.623e-01  1.044e-02 -25.122  < 2e-16
BrandHARPA                           5.967e-02  5.515e-03  10.819  < 2e-16
BrandMEIRA                          -3.969e-01  6.023e-03 -65.900  < 2e-16
BrandMISS CHASE                      5.577e-02  7.702e-03   7.241 4.51e-13
BrandMONTEIL & MUNERO               -2.585e-01  1.110e-02 -23.283  < 2e-16
BrandMR BUTTON                       7.814e-01  1.611e-02  48.512  < 2e-16
BrandTHE VANCA                      -5.638e-02  6.078e-03  -9.275  < 2e-16
BrandTSHIRT COMPANY                  3.304e-02  9.024e-03   3.661 0.000251
ProductSize30                        1.788e-02  4.488e-02   0.399 0.690263
ProductSize32                        1.337e-03  4.253e-02   0.031 0.974918
ProductSize34                       -4.061e-02  5.202e-02  -0.781 0.434989
ProductSize36                        2.968e-02  6.823e-02   0.435 0.663597
ProductSize38                        9.434e-01  4.192e-02  22.506  < 2e-16
ProductSize3XL                       5.041e-01  6.830e-02   7.381 1.60e-13
ProductSize40                        9.735e-01  4.172e-02  23.334  < 2e-16
ProductSize42                        9.710e-01  4.248e-02  22.858  < 2e-16
ProductSize44                        9.643e-01  4.607e-02  20.932  < 2e-16
ProductSize46                        3.133e-01  2.436e-01   1.286 0.198427
ProductSizeFree Size                 8.575e-01  4.707e-02  18.216  < 2e-16
ProductSizeL                         4.188e-01  3.722e-02  11.251  < 2e-16
ProductSizeM                         4.216e-01  3.722e-02  11.326  < 2e-16
ProductSizeS                         4.108e-01  3.724e-02  11.032  < 2e-16
ProductSizeXL                        4.260e-01  3.727e-02  11.431  < 2e-16
ProductSizeXS                        3.860e-01  3.849e-02  10.029  < 2e-16
ProductSizeXXL                       4.305e-01  3.759e-02  11.455  < 2e-16
ProductColorAQUA BLUE                3.712e-01  9.840e-02   3.772 0.000162
ProductColorBEIGE                    4.219e-01  9.825e-02   4.295 1.75e-05
ProductColorBLACK                    3.709e-01  9.786e-02   3.790 0.000151
ProductColorBLUE                     3.913e-01  9.792e-02   3.996 6.45e-05
ProductColorBROWN                    3.421e-01  9.851e-02   3.473 0.000515
ProductColorCAMEL                    3.160e-01  1.452e-01   2.176 0.029568
ProductColorCHARCOAL GREY            5.402e-01  1.695e-01   3.188 0.001434
ProductColorCOBALT BLUE              7.675e-01  1.051e-01   7.301 2.90e-13
ProductColorCOFFEE                   5.051e-01  1.025e-01   4.927 8.39e-07
ProductColorCREAM                    4.131e-01  9.991e-02   4.135 3.56e-05
ProductColorDARK GREY                2.276e-01  9.949e-02   2.288 0.022165
ProductColorFUCHSIA                  3.931e-01  9.830e-02   3.999 6.36e-05
ProductColorGOLDEN                   5.685e-01  1.000e-01   5.685 1.32e-08
ProductColorGREEN                    3.296e-01  9.801e-02   3.363 0.000772
ProductColorGREY                     3.555e-01  9.800e-02   3.628 0.000286
ProductColorGREY MILANGE             3.344e-01  9.843e-02   3.397 0.000681
ProductColorICE BLUE                 4.578e-01  1.128e-01   4.059 4.93e-05
ProductColorKHAKI                    3.856e-01  1.003e-01   3.842 0.000122
ProductColorLAVENDER                 9.230e-01  1.970e-01   4.686 2.80e-06
ProductColorLEMON                    1.029e-01  1.085e-01   0.949 0.342534
ProductColorLIGHT BLUE               3.187e-01  1.058e-01   3.012 0.002592
ProductColorLIGHT GREY               2.168e-01  9.904e-02   2.189 0.028579
ProductColorLILAC                   -1.415e-03  1.551e-01  -0.009 0.992720
ProductColorMAGENTA                  2.063e-01  2.587e-01   0.797 0.425191
ProductColorMAROON                   3.443e-01  9.815e-02   3.508 0.000452
ProductColorMULTI                    3.183e-01  9.807e-02   3.246 0.001171
ProductColorMUSTARD YELLOW           2.799e-01  1.010e-01   2.770 0.005603
ProductColorNAVY BLUE                4.026e-01  9.797e-02   4.110 3.97e-05
ProductColorNUDE                     4.241e-01  9.905e-02   4.282 1.86e-05
ProductColorOFF WHITE                3.888e-01  9.975e-02   3.897 9.74e-05
ProductColorOLIVE                    4.304e-01  9.943e-02   4.328 1.51e-05
ProductColorORANGE                   3.329e-01  9.810e-02   3.394 0.000690
ProductColorPEACH                    4.117e-01  9.821e-02   4.192 2.77e-05
ProductColorPINK                     4.240e-01  9.797e-02   4.328 1.51e-05
ProductColorPURPLE                   3.088e-01  9.825e-02   3.143 0.001673
ProductColorRED                      3.967e-01  9.792e-02   4.052 5.09e-05
ProductColorRUST                     4.672e-01  9.981e-02   4.681 2.87e-06
ProductColorSILVER                   7.728e-01  1.079e-01   7.163 8.01e-13
ProductColorTAN                      1.138e+00  2.600e-01   4.377 1.20e-05
ProductColorVIOLET INDIGO            3.167e-01  1.022e-01   3.098 0.001949
ProductColorWHITE                    3.765e-01  9.799e-02   3.843 0.000122
ProductColorWINE                     4.476e-01  9.981e-02   4.485 7.31e-06
ProductColorYELLOW                   3.126e-01  9.822e-02   3.182 0.001461
COD                                  5.966e-02  2.346e-03  25.435  < 2e-16
VendorDiscount                      -5.423e-04  6.604e-06 -82.115  < 2e-16
WebsiteDiscount                     -3.031e-04  9.987e-06 -30.349  < 2e-16
isMetro                             -2.710e-03  2.319e-03  -1.169 0.242518
isAddressSame                        1.921e-02  3.684e-03   5.214 1.85e-07

(Intercept)                         ***
SubCategoryASYMMETRIC DRESS         ***
SubCategoryBEACHWEAR                   
SubCategoryBODYCON DRESS            ***
SubCategoryCAMISOLES                ***
SubCategoryCAPRIS                   ***
SubCategoryCAPS & HATS              ***
SubCategoryCASUAL JACKETS           ***
SubCategoryCASUAL SHIRTS            ** 
SubCategoryCHINOS                   ***
SubCategoryDENIM JACKETS            ***
SubCategoryDRESSES                  ***
SubCategoryETHNIC JACKETS           ***
SubCategoryFORMAL SHIRTS               
SubCategoryFORMAL TROUSERS          ***
SubCategoryGSTOP235BLK                 
SubCategoryHENLEY T-SHIRTS             
SubCategoryHIGH NECK T SHIRTS       *  
SubCategoryJACKETS & BLAZERS        ***
SubCategoryJEANS                    ***
SubCategoryJEGGINGS                 ***
SubCategoryJUMPSUITS                ***
SubCategoryKURTAS                   ***
SubCategoryKURTIS                   ***
SubCategoryLEGGINGS                    
SubCategoryLOUNGEWEAR                  
SubCategoryMANDARIN T-SHIRTS        ***
SubCategoryNIGHTWEAR                   
SubCategoryOFF SHOULDER/TUBE/HALTER ***
SubCategoryPOLO-T-SHIRTS            ** 
SubCategoryQUILTED JACKETS          ***
SubCategoryROUND NECK SWEATERS      ***
SubCategoryROUND NECK T-SHIRTS         
SubCategoryROUND NECK VESTS            
SubCategorySALWAR                   *  
SubCategorySCARVES                  ***
SubCategorySHIFT DRESS              ***
SubCategorySHIRTS                   ***
SubCategorySHORTS                      
SubCategorySHRUGS                   *  
SubCategorySKATER DRESS             ***
SubCategorySKIRTS                   ***
SubCategorySTOCKINGS                ***
SubCategorySUITS                    ***
SubCategorySUMMER JACKETS           ***
SubCategorySWEATERS                 ***
SubCategorySWEATSHIRTS              ***
SubCategoryT SHIRTS                    
SubCategoryTOPS                        
SubCategoryTRACK PANTS              ***
SubCategoryTRACKPANTS               ***
SubCategoryTRACKSUITS               ***
SubCategoryTROUSERS                 ***
SubCategoryTUNICS                   *  
SubCategoryV NECK SWEATERS          ***
SubCategoryV NECK T-SHIRTS          ***
SubCategoryWAISTCOATS               ***
SubCategoryWINTER JACKETS           ***
BrandFABALLEY                       ***
BrandGRITSTONES                     ***
BrandHARPA                          ***
BrandMEIRA                          ***
BrandMISS CHASE                     ***
BrandMONTEIL & MUNERO               ***
BrandMR BUTTON                      ***
BrandTHE VANCA                      ***
BrandTSHIRT COMPANY                 ***
ProductSize30                          
ProductSize32                          
ProductSize34                          
ProductSize36                          
ProductSize38                       ***
ProductSize3XL                      ***
ProductSize40                       ***
ProductSize42                       ***
ProductSize44                       ***
ProductSize46                          
ProductSizeFree Size                ***
ProductSizeL                        ***
ProductSizeM                        ***
ProductSizeS                        ***
ProductSizeXL                       ***
ProductSizeXS                       ***
ProductSizeXXL                      ***
ProductColorAQUA BLUE               ***
ProductColorBEIGE                   ***
ProductColorBLACK                   ***
ProductColorBLUE                    ***
ProductColorBROWN                   ***
ProductColorCAMEL                   *  
ProductColorCHARCOAL GREY           ** 
ProductColorCOBALT BLUE             ***
ProductColorCOFFEE                  ***
ProductColorCREAM                   ***
ProductColorDARK GREY               *  
ProductColorFUCHSIA                 ***
ProductColorGOLDEN                  ***
ProductColorGREEN                   ***
ProductColorGREY                    ***
ProductColorGREY MILANGE            ***
ProductColorICE BLUE                ***
ProductColorKHAKI                   ***
ProductColorLAVENDER                ***
ProductColorLEMON                      
ProductColorLIGHT BLUE              ** 
ProductColorLIGHT GREY              *  
ProductColorLILAC                      
ProductColorMAGENTA                    
ProductColorMAROON                  ***
ProductColorMULTI                   ** 
ProductColorMUSTARD YELLOW          ** 
ProductColorNAVY BLUE               ***
ProductColorNUDE                    ***
ProductColorOFF WHITE               ***
ProductColorOLIVE                   ***
ProductColorORANGE                  ***
ProductColorPEACH                   ***
ProductColorPINK                    ***
ProductColorPURPLE                  ** 
ProductColorRED                     ***
ProductColorRUST                    ***
ProductColorSILVER                  ***
ProductColorTAN                     ***
ProductColorVIOLET INDIGO           ** 
ProductColorWHITE                   ***
ProductColorWINE                    ***
ProductColorYELLOW                  ** 
COD                                 ***
VendorDiscount                      ***
WebsiteDiscount                     ***
isMetro                                
isAddressSame                       ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.2395 on 45375 degrees of freedom
Multiple R-squared:  0.6247,    Adjusted R-squared:  0.6236 
F-statistic: 576.5 on 131 and 45375 DF,  p-value: < 2.2e-16

Normality for Log Linear Model

plot(test,1)

plot of chunk unnamed-chunk-24

plot(test,2)

plot of chunk unnamed-chunk-24

ad.test(FinalTotalPrice)

    Anderson-Darling normality test

data:  FinalTotalPrice
A = 1561.4, p-value < 2.2e-16

Thus it can be seen that even for a Log-Linear model, the normality assumption has been violated.

Heteroskedasticity Test

ncvTest(model)
Non-constant Variance Score Test 
Variance formula: ~ fitted.values 
Chisquare = 10025.83, Df = 1, p = < 2.22e-16
bptest(model)

    studentized Breusch-Pagan test

data:  model
BP = 8220, df = 130, p-value < 2.2e-16

From the p-value, we can confirm that there is no Heteroskedasticity in the model.

Multicollinearity Test

vif(model)
                       GVIF Df GVIF^(1/(2*Df))
SubCategory     5193.428089 57        1.077933
Brand            599.810348  9        1.426705
ProductSize       47.993846 17        1.120590
ProductColor       6.930932 42        1.023315
COD                1.039119  1        1.019372
VendorDiscount     2.478921  1        1.574459
WebsiteDiscount    1.862976  1        1.364909
isMetro            1.024837  1        1.012342
isAddressSame      1.010842  1        1.005407
sqrt(vif(model)) > 2
                 GVIF    Df GVIF^(1/(2*Df))
SubCategory      TRUE  TRUE           FALSE
Brand            TRUE  TRUE           FALSE
ProductSize      TRUE  TRUE           FALSE
ProductColor     TRUE  TRUE           FALSE
COD             FALSE FALSE           FALSE
VendorDiscount  FALSE FALSE           FALSE
WebsiteDiscount FALSE FALSE           FALSE
isMetro         FALSE FALSE           FALSE
isAddressSame   FALSE FALSE           FALSE