Wednesday, March 11, 2015

Car Sales March 2015


ManufacturePredicted Values for DLM 2015-01-01Predicted Values for RFVAR 2015-01-01log(Predicted DLM /Actual)log(Predicted RFVAR /Actual)
Acura541.333539.740483.950-0.003-0.112
Audi477.292548.856514.1910.1400.074
BMW1,050.042772.205850.140-0.307-0.211
Buick725.750789.259526.8670.084-0.320
Cadillac489.125499.725512.4290.0210.047
Chevrolet6,657.8336,318.7346,419.146-0.052-0.037
Chrysler1,187.5831,153.6031,068.802-0.029-0.105
Dodge1,754.7921,964.3601,572.5390.113-0.110
Ford7,229.5427,811.9667,488.8670.0770.035
GMC1,768.0421,713.1811,525.771-0.032-0.147
Honda3,853.0834,123.0604,053.1790.0680.051
Hyundai2,187.7082,037.9981,954.379-0.071-0.113
Infiniti485.792410.209400.440-0.169-0.193
Jaguar58.75056.90253.483-0.032-0.094
Jeep2,318.4172,159.7482,175.982-0.071-0.063
Kia1,834.5831,793.1251,476.735-0.023-0.217
Land.Rover204.875159.655221.370-0.2490.077
Lexus958.125916.676927.629-0.044-0.032
Lincoln256.833309.318283.8010.1860.100
Mazda1,068.750959.355801.417-0.108-0.288
Mercedes.Benz1,053.7921,123.0671,128.0420.0640.068
Mini155168.820130.8120.085-0.170
Mitsubishi313.875283.065282.621-0.103-0.105
Nissan4,449.0424,481.4893,514.8580.007-0.236
Porsche133.417145.404163.7030.0860.205
Subaru1,723.2501,679.0761,700.501-0.026-0.013
Toyota6,561.3336,251.4186,057.223-0.048-0.080
Volkswagen1,071.2501,092.829985.3780.020-0.084
Volvo167.167179.541142.5650.071-0.159
Predicted Values for DLM 2015-04-01Predicted Values for RFVAR 2015-04-01
Acura579.400596.329
Audi625.622534.464
BMW998.2171,068.511
Buick684.138764.444
Cadillac485.391505.867
Chevrolet6,782.4156,845.469
Chrysler1,238.6091,197.636
Dodge1,989.8711,957.252
Ford8,440.3067,530.339
GMC1,754.7872,002.711
Honda4,547.1574,551.639
Hyundai2,474.0372,446.165
Infiniti520.027551.387
Jaguar67.21562.959
Jeep2,398.7762,477.125
Kia1,956.7122,008.672
Land.Rover208.594243.447
Lexus1,234.9191,100.280
Lincoln342.649301.866
Mazda1,252.2201,170.785
Mercedes.Benz1,238.7491,234.362
Mini190.774168.846
Mitsubishi334.189356.788
Nissan5,195.7894,672.803
Porsche149.214152.985
Subaru1,857.2521,886.989
Toyota7,506.4707,019.463
Volkswagen1,214.1061,150.743
Volvo194.207166.979

Wednesday, February 11, 2015

Car Sales Feb 2015


ManufacturePredicted Values for DLM 2015-01-01Predicted Values for RFVAR 2015-01-01log(Predicted DLM /Actual)log(Predicted RFVAR /Actual)
Acura460.846507.466482.5030.0960.046
Audi442.846493.058534.7960.1070.189
BMW730.038537.307942.241-0.3070.255
Buick482.808663.501662.8670.3180.317
Cadillac449.231426.117422.310-0.053-0.062
Chevrolet5,495.4625,354.7765,933.536-0.0260.077
Chrysler899.731982.456974.3000.0880.080
Dodge1,359.5001,401.9671,485.9970.0310.089
Ford6,570.0776,380.9885,864.732-0.029-0.114
GMC1,371.9621,491.4371,401.8250.0830.022
Honda3,469.3083,535.9733,607.1570.0190.039
Hyundai1,711.7311,780.6591,998.8110.0390.155
Infiniti371.462338.773339.410-0.092-0.090
Jaguar48.69253.04154.8880.0860.120
Jeep1,981.6542,055.6842,063.3730.0370.040
Kia1,473.0381,734.4711,701.9860.1630.144
Land.Rover203.115158.073175.358-0.251-0.147
Lexus889.654778.053870.991-0.134-0.021
Lincoln254.577287.213285.1190.1210.113
Mazda779.654877.112839.2240.1180.074
Mercedes.Benz1,004.769914.9661,070.583-0.0940.063
Mini124.154194.780156.3320.4500.230
Mitsubishi249.731253.650251.1830.0160.006
Nissan3,632.6543,359.4223,640.657-0.0780.002
Porsche151.423153.518124.4970.014-0.196
Subaru1,569.6921,671.1661,399.7200.063-0.115
Toyota5,617.8085,623.7145,806.3840.0010.033
Volkswagen9041,050.9261,039.7370.1510.140
Volvo145.923144.025165.600-0.0130.126
Predicted Values for DLM 2015-02-01Predicted Values for RFVAR 2015-02-01
Acura539.740483.950
Audi548.856514.191
BMW772.205850.140
Buick789.259526.867
Cadillac499.725512.429
Chevrolet6,318.7346,419.146
Chrysler1,153.6031,068.802
Dodge1,964.3601,572.539
Ford7,811.9667,488.867
GMC1,713.1811,525.771
Honda4,123.0604,053.179
Hyundai2,037.9981,954.379
Infiniti410.209400.440
Jaguar56.90253.483
Jeep2,159.7482,175.982
Kia1,793.1251,476.735
Land.Rover159.655221.370
Lexus916.676927.629
Lincoln309.318283.801
Mazda959.355801.417
Mercedes.Benz1,123.0671,128.042
Mini168.820130.812
Mitsubishi283.065282.621
Nissan4,481.4893,514.858
Porsche145.404163.703
Subaru1,679.0761,700.501
Toyota6,251.4186,057.223
Volkswagen1,092.829985.378
Volvo179.541142.565

Monday, January 26, 2015

Car Sales 12-2014



Overall car sales are lower than expected.


Predicted Values 2014-12-01 Uni-DLMActual Values 2014-12-01log(Predicted DLM /Actual)Predicted Values 2014-12-01 RF-VARlog(Predicted RFVAR /Actual)
Acura667.614571.423-0.156638.471-0.111
Audi748.881640-0.157714.237-0.110
BMW1,231.5611,193.038-0.0321,347.554-0.122
Buick763.555736.269-0.036782.536-0.061
Cadillac655.731505.692-0.260580.159-0.137
Chevrolet6,835.1255,756.654-0.1726,122.498-0.062
Chrysler1,120.7991,047.808-0.0671,088.584-0.038
Dodge1,931.6391,619.538-0.1761,796.103-0.103
Ford7,970.1016,854.654-0.1517,841.763-0.135
GMC1,982.8011,686.692-0.1621,898.404-0.118
Honda4,761.9184,113.731-0.1464,646.172-0.122
Hyundai2,573.5712,064.308-0.2202,195.227-0.061
Infiniti481.029438.385-0.093498.734-0.129
Jaguar51.75648.192-0.07149.113-0.019
Jeep2,570.2222,211.115-0.1502,445.042-0.101
Kia1,691.1161,728.3080.0221,695.4020.019
Land.Rover186.583140.154-0.286153.189-0.089
Lexus1,401.4061,056.615-0.2821,261.509-0.177
Lincoln379.194312.038-0.195359.453-0.141
Mazda934.056817-0.134900.577-0.097
Mercedes.Benz1,182.4891,427.3080.1881,530.815-0.070
Mini201.142192.654-0.043214.853-0.109
Mitsubishi236.740251.3080.060263.551-0.048
Nissan3,842.3583,530.385-0.0853,752.873-0.061
Porsche150.558180.7310.183178.1170.015
Subaru1,937.0901,740.115-0.1072,012.891-0.146
Toyota6,542.2115,995.154-0.0876,486.288-0.079
Volkswagen1,310.0491,220.192-0.0711,307.579-0.069
Volvo153.500139.346-0.097144.812-0.038
Above are barplots for both the univariate DLM model and the RFVAR model I made last time. On the whole, the RFVAR performed better than DLM model. The success of the new technique shouldn't come as a huge surprise since it includes MANY explanatory variables and combines them in a nonlinear manner.  However, the old model predicted 5/29 car company sales better (in terms of sqrd residuals); BMW, Subaru, Infiniti, Mini, and Buick.

However, the success of the DLM predicted Mini compared to RFVAR is probably due to the fact that DLM's are much more susceptible to new data. This can be seen by viewing November's car predictions where the Mini Prediction was 22% off! This of course, was due the fact that Mini updated its main car, the Cooper. The DLM 'learned' from that error much better than an RFVAR did b/c an RFVAR weights all observations equally while DLM's heavily favor the most recent observation.  There are two ways I think I can improve the new technique: 1. introduce some sort of error term in regressors to make it a moving average model (RFVARMA anyone?) or 2. include new car updates as regressors... Stay tuned.




Predicted Values for DLM 2015-01-01Predicted Values for RFVAR 2015-01-01
Acura507.466482.503
Audi493.058534.796
BMW537.307942.241
Buick663.501662.867
Cadillac426.117422.310
Chevrolet5,354.7765,933.536
Chrysler982.456974.300
Dodge1,401.9671,485.997
Ford6,380.9885,864.732
GMC1,491.4371,401.825
Honda3,535.9733,607.157
Hyundai1,780.6591,998.811
Infiniti338.773339.410
Jaguar53.04154.888
Jeep2,055.6842,063.373
Kia1,734.4711,701.986
Land.Rover158.073175.358
Lexus778.053870.991
Lincoln287.213285.119
Mazda877.112839.224
Mercedes.Benz914.9661,070.583
Mini194.780156.332
Mitsubishi253.650251.183
Nissan3,359.4223,640.657
Porsche153.518124.497
Subaru1,671.1661,399.720
Toyota5,623.7145,806.384
Volkswagen1,050.9261,039.737
Volvo144.025165.600

Thursday, January 1, 2015

Vector Autoregression with Random Forests: New Technqiue

My previous predictions were fairly naive in that it only took previous values from each car make separately. However, other variables should be of importance (economic mostly) and could increase accuracy of predictions.

I've made new predictions based on a vector auto random forests. Like vector auto regressions, it models each time series with lagged values of itself and lag values of all other variables. The nice thing about using random forests, is that you don't necessarily need to worry about model specifications as the algorithm generally gives good predictions.

Below are predictions for December 2014 car sales.

Code

Predicted Values for 2014-12-01
Acura638.471
Audi714.237
BMW1,347.554
Buick782.536
Cadillac580.159
Chevrolet6,122.498
Chrysler1,088.584
Dodge1,796.103
Ford7,841.763
GMC1,898.404
Honda4,646.172
Hyundai2,195.227
Infiniti498.734
Jaguar49.113
Jeep2,445.042
Kia1,695.402
Land.Rover153.189
Lexus1,261.509
Lincoln359.453
Mazda900.577
Mercedes.Benz1,530.815
Mini214.853
Mitsubishi263.551
Nissan3,752.873
Porsche178.117
Subaru2,012.891
Toyota6,486.288
Volkswagen1,307.579
Volvo144.812