The stock market is an exchange market for shares of publicly traded companies. There are many types of publicly traded stocks on the market, including options, futures, and stocks. Oil is a basic resource for the entire economy since it runs all machines necessary to produce goods and do services. Crude oil futures, West Texas Intermediate, are futures located on the NYSE, New York Stock Exchange, that commonly represent the price of an oil barrel in the United States. The future, WTI, is highly volatile; OPEC regulates crude oil prices by slowing production. Every week a report is released with metrics on the previous week’s progress, including inventory and production in the United States. Based on the inventories and production in the United States many investors trade futures on Wednesday as the data is released. With these factors and more attributes saved by the stock market, models can be made to predict the trend of the crude oil futures daily.
Money, risk, gambling are all terms associated with the stock market. If you know the probability of success then you can make an analytic response. Currently professionals from all around the world are trading on the stock market. Many are able to make a rational guess, but still are unaware of the exact factors included in the result. Possible investors in a solution to predicting oil futures include day-to-day traders, big banks, investment bankers, brokerage firms, Oil producers and OPEC. All of these agencies have billions of dollars tied to the price of oil, whether it be the production of oil or the trading of the stock. My motivation for this project is that for the last four months I have been trading oil futures and have made 12% profit on my investment. Recently, I lost 5% of my profit because I was unable to predict a big swing before and after it had occurred. I hope to learn more from these factors so that I do not sustain as many loses and can increase my profit.Therefore I need a risk management model that predicts the direction of the stock over the next day based on current data, while including a confidence metric. A research team from the University of Ballarat had previously worked on a model similar to my proposed model. The Ballarat team used a three layers feed forward network. Using an ANN (Artificial Neural Network) model. First they determined how they planned to measure the performance of the system; a risk management tool. From there they determined the system only had to determine the direction of the price instead of the magnitude of the change. The metrics they used were RMSE, R2, MSE, MAE, and SSE. The team also used an information coefficient, which “provides an indication of the prediction compared to the trivial predictor based on the random walk” ( [3]). For their base data, West Texas Intermediate (WTI) futures were selected; from daily frequency to the 1, 2, 3, 4 months maturity. The data was preprocessed by changing the future price to force and momentum (equations 3.3, 3.4). To train and test the team used a 90/10 split. Previous work related to this problem brought forward more features to be used; on the most basic scale crude oil price is set by supply and demand. Demand varies by season and supply is regulated by OPEC. Difficulties of modeling brought up by other researchers of oil futures are detailed below: . Stochastic and nonlinear data - A logarithmic transformation is the suggested solution . Chaotic, noisy, large dataset - A moving 3 day average mitigates some of the noise . Some features unavailable on a daily frequency - Use the data for the entire week . Data is somewhat old and may be irrelevant compared to newer data - Use two separate datasets; full data, and the previous 5 year’s data. In my opinion the most important difference between my work and previous work is the confidence metric given in each prediction. The confidence metric will be useful for real world application. For example, If the model predicts upwards trend, but gives a confidence of 20%, then it is likely that I would not trade that day. But in another example if the model predicts upwards trend with 60% confidence, it is more likely that I would trade that day. This will be useful to any trader of stocks as they know how confident the model is of the direction.
My project is to better understand crude oil futures and the highest weighted features. The goal is to determine the direction of oil futures based on today’s data. The model I propose is a regression model similar to the Ballarat team’s ANN, predicting daily change instead of daily and monthly, since larger trends of the data are much more spontaneous currently than in the past. I am proposing a risk management tool as well, so that the model only has to determine the direction of price instead of magnitude of change. Since the magnitude of change is effected much more by speculation. Also I plan on using the same metrics as the Ballarat team; RMSE, R2, MSE, MAE, and SSE.
The Ballarat Team and I differ on the later stages of modeling. I plan on using the more data than their team, WTI on a daily basis, as well as including features mentioned in the section below. I plan on preprocessing the data by making it normal and attempting a logarithmic transformation on the daily WTI data. Based on the size of the data an 80/20 split may be better for the data, as it is highly volatile data and over-training is a possibility. Since my methodology is similar to the Ballarat team’s I believe it will perform fairly well, as we differ opinions with data collection and processing and training. My proposed project is a risk management tool to predict the direction of crude oil futures on a daily basis using a time series regression model. This particular project is relevant because there is value in predicting the direction of any future and previous research has found adequate solutions. I plan on using time series regression to model the project since the data is based on time. Other models make the assumption that all data points are independent, which cannot be true since the direction of a future is based on its previous price. I include more data than the Ballarat team so that I can explore for any variables that haven’t been considered as features before. With less features I may be able to get a slimmer, more lean model, yet it may not account for all possible attributes that have an effect on oil futures. I am using WTI as my prime feature since WTI is the basic measurement industry-wide for United States crude oil futures. The alternatives to WTI would be other foreign countries’ oil futures, as well as the New York oil price, which is less commonly used for the US industry. My approach to this project is sound as I modeled my entire project around the Ballarat team’s project, which was fairly successful. Therefore, my project goal is to reach the same success in predictions as Ballarat. (78% on day, 65% two day) The result of this project will be functional value to me for increasing monetary gains and intellectual to the rest of the students in class. With a working model I can invest in the futures market with more certainty and success than before. The rest of the students in class will have a new understanding of the stock amrket and may be surprised to learn that the stock market can be modeled. The field will not be changed, as if this is successful, then I would n’t share it with my competitors for fear that if everyone uses the model, then the market would swing more amplitude than before. Therefore it would likely only affect the persons in this class.
The data includes attributes: Y-Variable - The direction of crude oil futures over the next day, from close to close as a moving average of three days Crude Oil Price - The spot price of crude oil stock symbol WTI (West Texas Intermediate); The price of a crude oil barrel in the United States. Crude Oil Products Gas Price - The price per barrel for gasoline in the United States (A product of Crude Oil) Heating Oil - The price of Heating oil for the US US Economy Averages Dow Price - The Dow Jones Transportation Average (30 large publicly owned companies) Nasdaq Price - The National Association of Securities Dealers Automated Quotations Exchange Rates of the USD Euro - Importer of Oil China - Importer of Oil Canada - Exporter of Oil Saudi Arabia - Exporter of Oil Russia - Exporter of Oil Weekly Report Oil Production in US Oil Imports in US Yvalue on trend is 1 or -1. 1 represents an upwards trend and -1 represents a downward trend. The attributes are mainly scalar and somewhat arbitrary as they as stocks based on what the market determines the price should be. The rest of the data is in numeric form but is then scaled to mean 0 and standard deviation of 1. The weekly report includes stock information, such as volume and WIP and other types of oil. It also includes weekly imports and exports and 4-week averages. ##Plan of Activities with Deadlines: Current Deadlines for the project are below: 3/20 - Updated Project Proposal 3/22 - Clean Data Controlling for missing values Creating appropriate headers and labels for the data Delete any undefined data points 3/31 - Preprocessing Data Organizing the data in an excel document Normalizing the data Creating the Y-value Office Hours 4/15- Initial Report Updating this report for my model Adding missing elements currently not in this report Office Hours 4/22- Initial Presentation Formatting a presentation Creating a general presentation Adding specifics that will likely be needed for class Office Hours 5/1 - Finalized Report and Presentation Update report based on proposed changes Update presentation based on proposed changes Data has been taken from the US department of energy for Crude oil and weekly reports Yahoo Finance has historical data for exchange rates and US economy averages.
A working and documented program Sample code Example of code being put into use The evaluation criteria includes the following: Testing greater than 75% correctness for one day prediction 3:1 ratio of correct predictions High success rate of prediction, larger profits from trading Ballarat team was able to predict with 78% correct R-squared greater than .5 The features explain more than 50% of the variations in the data Much of the variance is due to speculation of the market At least 4 factors found to be significant These factors can be monitored during the day, which will help predicting movement
Testing Greater than 75% Correct for One day prediction Predicting more than 50% correct wouldn’t be a great feat, since predicting up every day would result in greater than a 52% correctness value. With 75% correct, the model cannot predict upwards each time, it will need to use the data to determine the swing. Also the effect will be 3 gains and 1 loss for day traders, resulting in 2 gains every four days, assuming all magnitudes are equal. R-square greater than .5 This again shows that the features are explaining the model. The less arbitrary values, the better. If the data didn’t explain the model then predict up everyday and make small profits. At least 4 features found to be significant These four features can be scrutinized throughout the day, so that if changes occur the trader is aware that the result of the model may have changed as well. I would classify these features as “Jaws” features; if they aren’t watched then your money will be eaten by a shark. Combined Together these three measures will determine whether this model can be used in the real world for day traders. The model will be correct more often than incorrect; better than current predictions. The features will explain the model and therefore it can be understood by day traders. With four significant features, day traders can keep an eye on changes during the day of these features and can leave the market if any large swings occur.
smp_size <- floor(0.75 * nrow(data))
set.seed(123)
train_ind <- sample(seq_len(nrow(data)), size = smp_size)
train <- data[train_ind, ]
test <- data[-train_ind, ]
simple.lm = lm(Y~log10(WTI3MA))
summary(simple.lm)
##
## Call:
## lm(formula = Y ~ log10(WTI3MA))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.6027 -0.5083 0.4085 0.4864 0.5252
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.5944 1.1273 1.414 0.159
## log10(WTI3MA) -0.6481 0.6771 -0.957 0.339
##
## Residual standard error: 0.5008 on 250 degrees of freedom
## Multiple R-squared: 0.003651, Adjusted R-squared: -0.0003347
## F-statistic: 0.916 on 1 and 250 DF, p-value: 0.3394
plot(simple.lm)
pls1 = plsreg1( train, train$Y, comps = 5)
pls1$R2
## t1 t2 t3 t4 t5
## NA NA NA NA NA
pls1$Q2
## PRESS RSS Q2 LimQ2 Q2cum
## 1 NaN 188 NaN 0.0975 NaN
## 2 NaN NaN NaN 0.0975 NaN
## 3 NaN NaN NaN 0.0975 NaN
## 4 NaN NaN NaN 0.0975 NaN
## 5 NaN NaN NaN 0.0975 NaN
pls1$y.loads
## c1 c2 c3 c4 c5
## NaN NaN NaN NaN NaN
summary(pls1$y.pred)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## NA NA NA NaN NA NA 189
summary(pls1$std.coefs)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## NA NA NA NaN NA NA 89
summary(pls1$resid)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## NA NA NA NaN NA NA 189
plot(pls1)
summary(pls1)
## Length Class Mode
## x.scores 945 -none- numeric
## x.loads 445 -none- numeric
## y.scores 945 -none- numeric
## y.loads 5 -none- numeric
## cor.xyt 450 -none- numeric
## raw.wgs 445 -none- numeric
## mod.wgs 445 -none- numeric
## std.coefs 89 -none- numeric
## reg.coefs 90 -none- numeric
## R2 5 -none- numeric
## R2Xy 450 -none- numeric
## y.pred 189 -none- numeric
## resid 189 -none- numeric
## T2 950 -none- numeric
## Q2 25 -none- numeric
## y 189 -none- numeric
Simple linear model based on three day moving average of WTI to describe the direction of price for tomorrow.
All.lm <- lm(Y~., df)
summary(All.lm)
##
## Call:
## lm(formula = Y ~ ., data = df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.9759 -0.3860 0.1059 0.3283 1.0536
##
## Coefficients: (33 not defined because of singularities)
## Estimate
## (Intercept) 3.173e+05
## Date 3.266e-02
## WCRSTUS1 -4.579e-01
## WCESTUS1 4.575e-01
## WCSSTUS1 NA
## WGTSTUS1 -8.241e-01
## WGRSTUS1 6.451e-01
## WG4ST.NUS.1 8.233e-01
## WBCSTUS1 8.236e-01
## W.EPOOXE.SAE.NUS.MBBL 1.365e-03
## WKJSTUS1 -3.497e-04
## WDISTUS1 -8.545e-02
## WD0ST.NUS.1 8.566e-02
## WD1ST.NUS.1 8.461e-02
## WDGSTUS1 8.501e-02
## WRESTUS1 1.290e-03
## WPRSTUS1 -4.861e-04
## W.EPPO6.SAE.NUS.MBBL 2.601e-04
## WUOSTUS1 2.164e-04
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 -6.256e-01
## W.EPC0.FPF.SAK.MBBLD -3.038e-02
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 -6.391e-01
## WCRIMUS2 -3.269e-04
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 2.593e+00
## WCSSCUS2 NA
## WCESCUS2 -1.953e+00
## WCRAUUS2 -6.367e-01
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD -8.287e-01
## W.EPL0.YPG.NUS.MBBLD 1.821e-01
## W.EPOOXR.YPT.NUS.MBBLD 2.145e-01
## W.EPOOXE.YOP.NUS.MBBLD -8.661e-03
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 -6.428e-01
## WRPIMUS2 2.998e-04
## WRPEXUS2 NA
## WPESCUS2 6.467e-01
## W.EPP0.VUA.NUS.MBBLD -4.637e-01
## WRPUPUS2 2.628e-01
## WGFUPUS2 3.823e-01
## WKJUPUS2 3.832e-01
## WDIUPUS2 3.867e-01
## WREUPUS2 3.867e-01
## WPRUP.NUS.2 3.846e-01
## WWOUP.NUS.2 3.813e-01
## WTTNTUS2 NA
## WCRFPUS2.1 2.988e-01
## W.EPC0.FPF.SAK.MBBLD.1 -2.438e-01
## W.EPC0.FPF.R48.MBBLD.1 -3.109e-01
## WCRNTUS2.1 3.287e-01
## WCRIMUS2.1 -3.097e-01
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 3.335e-01
## W.EPC0.SCG.NUS.MBBLD.1 -1.234e-01
## WCSSCUS2.1 NA
## WCESCUS2.1 1.127e-01
## WCRAUUS2.1 7.424e-04
## WCRRIUS2.1 -5.981e-03
## W.EPP1.YPT.NUS.MBBLD.1 -3.078e-02
## W.EPL0.YPG.NUS.MBBLD.1 -1.501e-02
## W.EPOOXR.YPT.NUS.MBBLD.1 -1.272e-02
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 NA
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. -9.286e-02
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. -1.397e+00
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA -1.242e-01
## Std. Error
## (Intercept) 1.046e+06
## Date 1.443e-02
## WCRSTUS1 1.504e+00
## WCESTUS1 1.503e+00
## WCSSTUS1 NA
## WGTSTUS1 1.026e+00
## WGRSTUS1 5.394e-01
## WG4ST.NUS.1 1.024e+00
## WBCSTUS1 1.026e+00
## W.EPOOXE.SAE.NUS.MBBL 5.705e-03
## WKJSTUS1 2.977e-04
## WDISTUS1 1.330e+00
## WD0ST.NUS.1 1.329e+00
## WD1ST.NUS.1 1.335e+00
## WDGSTUS1 1.332e+00
## WRESTUS1 3.540e-03
## WPRSTUS1 2.919e-04
## W.EPPO6.SAE.NUS.MBBL 2.094e-04
## WUOSTUS1 1.303e-03
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 3.418e+00
## W.EPC0.FPF.SAK.MBBLD 6.698e-02
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 3.455e+00
## WCRIMUS2 4.658e-03
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 4.961e+00
## WCSSCUS2 NA
## WCESCUS2 1.602e+00
## WCRAUUS2 3.450e+00
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD 4.388e+00
## W.EPL0.YPG.NUS.MBBLD 8.384e-01
## W.EPOOXR.YPT.NUS.MBBLD 9.471e-01
## W.EPOOXE.YOP.NUS.MBBLD 5.855e-02
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 3.505e+00
## WRPIMUS2 1.924e-03
## WRPEXUS2 NA
## WPESCUS2 3.512e+00
## W.EPP0.VUA.NUS.MBBLD 3.004e+00
## WRPUPUS2 1.341e+00
## WGFUPUS2 2.193e+00
## WKJUPUS2 2.185e+00
## WDIUPUS2 2.194e+00
## WREUPUS2 2.192e+00
## WPRUP.NUS.2 2.199e+00
## WWOUP.NUS.2 2.187e+00
## WTTNTUS2 NA
## WCRFPUS2.1 1.139e+00
## W.EPC0.FPF.SAK.MBBLD.1 9.771e-01
## W.EPC0.FPF.R48.MBBLD.1 1.212e+00
## WCRNTUS2.1 1.437e+00
## WCRIMUS2.1 1.475e+00
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 1.397e+00
## W.EPC0.SCG.NUS.MBBLD.1 5.428e-02
## WCSSCUS2.1 NA
## WCESCUS2.1 4.294e-02
## WCRAUUS2.1 7.074e-03
## WCRRIUS2.1 5.922e-02
## W.EPP1.YPT.NUS.MBBLD.1 6.060e-01
## W.EPL0.YPG.NUS.MBBLD.1 6.543e-01
## W.EPOOXR.YPT.NUS.MBBLD.1 6.408e-01
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 NA
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. 2.939e-02
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 1.111e+00
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA 5.239e-02
## t value
## (Intercept) 0.303
## Date 2.263
## WCRSTUS1 -0.304
## WCESTUS1 0.304
## WCSSTUS1 NA
## WGTSTUS1 -0.803
## WGRSTUS1 1.196
## WG4ST.NUS.1 0.804
## WBCSTUS1 0.803
## W.EPOOXE.SAE.NUS.MBBL 0.239
## WKJSTUS1 -1.175
## WDISTUS1 -0.064
## WD0ST.NUS.1 0.064
## WD1ST.NUS.1 0.063
## WDGSTUS1 0.064
## WRESTUS1 0.364
## WPRSTUS1 -1.665
## W.EPPO6.SAE.NUS.MBBL 1.242
## WUOSTUS1 0.166
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 -0.183
## W.EPC0.FPF.SAK.MBBLD -0.454
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 -0.185
## WCRIMUS2 -0.070
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 0.523
## WCSSCUS2 NA
## WCESCUS2 -1.219
## WCRAUUS2 -0.185
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD -0.189
## W.EPL0.YPG.NUS.MBBLD 0.217
## W.EPOOXR.YPT.NUS.MBBLD 0.226
## W.EPOOXE.YOP.NUS.MBBLD -0.148
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 -0.183
## WRPIMUS2 0.156
## WRPEXUS2 NA
## WPESCUS2 0.184
## W.EPP0.VUA.NUS.MBBLD -0.154
## WRPUPUS2 0.196
## WGFUPUS2 0.174
## WKJUPUS2 0.175
## WDIUPUS2 0.176
## WREUPUS2 0.176
## WPRUP.NUS.2 0.175
## WWOUP.NUS.2 0.174
## WTTNTUS2 NA
## WCRFPUS2.1 0.262
## W.EPC0.FPF.SAK.MBBLD.1 -0.249
## W.EPC0.FPF.R48.MBBLD.1 -0.257
## WCRNTUS2.1 0.229
## WCRIMUS2.1 -0.210
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 0.239
## W.EPC0.SCG.NUS.MBBLD.1 -2.273
## WCSSCUS2.1 NA
## WCESCUS2.1 2.625
## WCRAUUS2.1 0.105
## WCRRIUS2.1 -0.101
## W.EPP1.YPT.NUS.MBBLD.1 -0.051
## W.EPL0.YPG.NUS.MBBLD.1 -0.023
## W.EPOOXR.YPT.NUS.MBBLD.1 -0.020
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 NA
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. -3.160
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. -1.257
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA -2.370
## Pr(>|t|)
## (Intercept) 0.76195
## Date 0.02471
## WCRSTUS1 0.76113
## WCESTUS1 0.76120
## WCSSTUS1 NA
## WGTSTUS1 0.42295
## WGRSTUS1 0.23315
## WG4ST.NUS.1 0.42227
## WBCSTUS1 0.42305
## W.EPOOXE.SAE.NUS.MBBL 0.81108
## WKJSTUS1 0.24157
## WDISTUS1 0.94884
## WD0ST.NUS.1 0.94869
## WD1ST.NUS.1 0.94954
## WDGSTUS1 0.94918
## WRESTUS1 0.71588
## WPRSTUS1 0.09742
## W.EPPO6.SAE.NUS.MBBL 0.21563
## WUOSTUS1 0.86823
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 0.85493
## W.EPC0.FPF.SAK.MBBLD 0.65063
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 0.85344
## WCRIMUS2 0.94412
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 0.60184
## WCSSCUS2 NA
## WCESCUS2 0.22429
## WCRAUUS2 0.85380
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD 0.85040
## W.EPL0.YPG.NUS.MBBLD 0.82830
## W.EPOOXR.YPT.NUS.MBBLD 0.82111
## W.EPOOXE.YOP.NUS.MBBLD 0.88256
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 0.85468
## WRPIMUS2 0.87636
## WRPEXUS2 NA
## WPESCUS2 0.85410
## W.EPP0.VUA.NUS.MBBLD 0.87747
## WRPUPUS2 0.84487
## WGFUPUS2 0.86178
## WKJUPUS2 0.86095
## WDIUPUS2 0.86028
## WREUPUS2 0.86015
## WPRUP.NUS.2 0.86132
## WWOUP.NUS.2 0.86180
## WTTNTUS2 NA
## WCRFPUS2.1 0.79329
## W.EPC0.FPF.SAK.MBBLD.1 0.80325
## W.EPC0.FPF.R48.MBBLD.1 0.79778
## WCRNTUS2.1 0.81932
## WCRIMUS2.1 0.83386
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 0.81151
## W.EPC0.SCG.NUS.MBBLD.1 0.02413
## WCSSCUS2.1 NA
## WCESCUS2.1 0.00934
## WCRAUUS2.1 0.91653
## WCRRIUS2.1 0.91966
## W.EPP1.YPT.NUS.MBBLD.1 0.95954
## W.EPL0.YPG.NUS.MBBLD.1 0.98172
## W.EPOOXR.YPT.NUS.MBBLD.1 0.98419
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 NA
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. 0.00183
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0.21025
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA 0.01876
##
## (Intercept)
## Date *
## WCRSTUS1
## WCESTUS1
## WCSSTUS1
## WGTSTUS1
## WGRSTUS1
## WG4ST.NUS.1
## WBCSTUS1
## W.EPOOXE.SAE.NUS.MBBL
## WKJSTUS1
## WDISTUS1
## WD0ST.NUS.1
## WD1ST.NUS.1
## WDGSTUS1
## WRESTUS1
## WPRSTUS1 .
## W.EPPO6.SAE.NUS.MBBL
## WUOSTUS1
## WTTSTUS1
## WTESTUS1
## WCRFPUS2
## W.EPC0.FPF.SAK.MBBLD
## W.EPC0.FPF.R48.MBBLD
## WCRNTUS2
## WCRIMUS2
## WCEIMUS2
## WCSIMUS2
## WCREXUS2
## W.EPC0.SCG.NUS.MBBLD
## WCSSCUS2
## WCESCUS2
## WCRAUUS2
## WCRRIUS2
## W.EPP1.YPT.NUS.MBBLD
## W.EPL0.YPG.NUS.MBBLD
## W.EPOOXR.YPT.NUS.MBBLD
## W.EPOOXE.YOP.NUS.MBBLD
## W.EPPO5.YPT.NUS.MBBLD
## WPGNPUS2
## WRPNTUS2
## WRPIMUS2
## WRPEXUS2
## WPESCUS2
## W.EPP0.VUA.NUS.MBBLD
## WRPUPUS2
## WGFUPUS2
## WKJUPUS2
## WDIUPUS2
## WREUPUS2
## WPRUP.NUS.2
## WWOUP.NUS.2
## WTTNTUS2
## WCRFPUS2.1
## W.EPC0.FPF.SAK.MBBLD.1
## W.EPC0.FPF.R48.MBBLD.1
## WCRNTUS2.1
## WCRIMUS2.1
## WCEIMUS2.1
## WCSIMUS2.1
## WCREXUS2.1
## W.EPC0.SCG.NUS.MBBLD.1 *
## WCSSCUS2.1
## WCESCUS2.1 **
## WCRAUUS2.1
## WCRRIUS2.1
## W.EPP1.YPT.NUS.MBBLD.1
## W.EPL0.YPG.NUS.MBBLD.1
## W.EPOOXR.YPT.NUS.MBBLD.1
## W.EPOOXE.YOP.NUS.MBBLD.1
## W.EPPO5.YPT.NUS.MBBLD.1
## WPGNPUS2.1
## WRPNTUS2.1
## WRPIMUS2.1
## WRPEXUS2.1
## WPESCUS2.1
## W.EPP0.VUA.NUS.MBBLD.1
## WRPUPUS2.1
## WGFUPUS2.1
## WKJUPUS2.1
## WDIUPUS2.1
## WREUPUS2.1
## WPRUP.NUS.2.1
## WWOUP.NUS.2.1
## WTTNTUS2.1
## WTI.Spot.Price...Dollars.per.Barrel. **
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4656 on 196 degrees of freedom
## Multiple R-squared: 0.325, Adjusted R-squared: 0.1356
## F-statistic: 1.716 on 55 and 196 DF, p-value: 0.003948
How effective it is to explain the direction will all of the data available in the dataset.
Logistic Model
C=0
f=0
logisticmodel = glm(Y~., family = binomial(link = "logit"), data=train)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logisticmodel)
##
## Call:
## glm(formula = Y ~ ., family = binomial(link = "logit"), data = train)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -8.49 0.00 0.00 0.00 8.49
##
## Coefficients: (32 not defined because of singularities)
## Estimate
## (Intercept) 4.612e+28
## Date 2.873e+14
## WCRSTUS1 -6.635e+22
## WCESTUS1 6.633e+22
## WCSSTUS1 NA
## WGTSTUS1 4.575e+21
## WGRSTUS1 -1.903e+22
## WG4ST.NUS.1 -4.632e+21
## WBCSTUS1 -4.563e+21
## W.EPOOXE.SAE.NUS.MBBL 4.201e+19
## WKJSTUS1 4.303e+19
## WDISTUS1 6.628e+22
## WD0ST.NUS.1 -6.626e+22
## WD1ST.NUS.1 -6.645e+22
## WDGSTUS1 -6.632e+22
## WRESTUS1 1.470e+20
## WPRSTUS1 -4.101e+18
## W.EPPO6.SAE.NUS.MBBL 1.420e+19
## WUOSTUS1 2.365e+19
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 -8.043e+22
## W.EPC0.FPF.SAK.MBBLD -3.679e+21
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 -8.214e+22
## WCRIMUS2 -1.031e+20
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 1.493e+23
## WCSSCUS2 NA
## WCESCUS2 -6.713e+22
## WCRAUUS2 -8.195e+22
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD -1.197e+23
## W.EPL0.YPG.NUS.MBBLD 3.434e+22
## W.EPOOXR.YPT.NUS.MBBLD 3.773e+22
## W.EPOOXE.YOP.NUS.MBBLD -6.585e+20
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 -8.422e+22
## WRPIMUS2 -3.243e+19
## WRPEXUS2 NA
## WPESCUS2 8.437e+22
## W.EPP0.VUA.NUS.MBBLD -7.171e+22
## WRPUPUS2 3.584e+22
## WGFUPUS2 4.872e+22
## WKJUPUS2 4.836e+22
## WDIUPUS2 4.861e+22
## WREUPUS2 4.857e+22
## WPRUP.NUS.2 4.877e+22
## WWOUP.NUS.2 4.843e+22
## WTTNTUS2 NA
## WCRFPUS2.1 2.997e+22
## W.EPC0.FPF.SAK.MBBLD.1 -2.066e+22
## W.EPC0.FPF.R48.MBBLD.1 -3.258e+22
## WCRNTUS2.1 -9.182e+22
## WCRIMUS2.1 9.285e+22
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 -9.167e+22
## W.EPC0.SCG.NUS.MBBLD.1 6.720e+21
## WCSSCUS2.1 NA
## WCESCUS2.1 -7.123e+21
## WCRAUUS2.1 -2.258e+20
## WCRRIUS2.1 -2.253e+21
## W.EPP1.YPT.NUS.MBBLD.1 2.892e+22
## W.EPL0.YPG.NUS.MBBLD.1 -2.920e+22
## W.EPOOXR.YPT.NUS.MBBLD.1 -3.406e+22
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 1.448e+22
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. -5.613e+14
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 4.980e+14
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA -1.112e+15
## Std. Error
## (Intercept) 6.916e+21
## Date 2.629e+06
## WCRSTUS1 9.950e+15
## WCESTUS1 9.948e+15
## WCSSTUS1 NA
## WGTSTUS1 6.862e+14
## WGRSTUS1 2.855e+15
## WG4ST.NUS.1 6.947e+14
## WBCSTUS1 6.843e+14
## W.EPOOXE.SAE.NUS.MBBL 6.300e+12
## WKJSTUS1 6.454e+12
## WDISTUS1 9.940e+15
## WD0ST.NUS.1 9.937e+15
## WD1ST.NUS.1 9.966e+15
## WDGSTUS1 9.947e+15
## WRESTUS1 2.204e+13
## WPRSTUS1 6.151e+11
## W.EPPO6.SAE.NUS.MBBL 2.129e+12
## WUOSTUS1 3.547e+12
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 1.206e+16
## W.EPC0.FPF.SAK.MBBLD 5.517e+14
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 1.232e+16
## WCRIMUS2 1.546e+13
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 2.238e+16
## WCSSCUS2 NA
## WCESCUS2 1.007e+16
## WCRAUUS2 1.229e+16
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD 1.796e+16
## W.EPL0.YPG.NUS.MBBLD 5.150e+15
## W.EPOOXR.YPT.NUS.MBBLD 5.658e+15
## W.EPOOXE.YOP.NUS.MBBLD 9.875e+13
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 1.263e+16
## WRPIMUS2 4.864e+12
## WRPEXUS2 NA
## WPESCUS2 1.265e+16
## W.EPP0.VUA.NUS.MBBLD 1.075e+16
## WRPUPUS2 5.374e+15
## WGFUPUS2 7.306e+15
## WKJUPUS2 7.253e+15
## WDIUPUS2 7.290e+15
## WREUPUS2 7.284e+15
## WPRUP.NUS.2 7.315e+15
## WWOUP.NUS.2 7.263e+15
## WTTNTUS2 NA
## WCRFPUS2.1 4.495e+15
## W.EPC0.FPF.SAK.MBBLD.1 3.099e+15
## W.EPC0.FPF.R48.MBBLD.1 4.886e+15
## WCRNTUS2.1 1.377e+16
## WCRIMUS2.1 1.393e+16
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 1.375e+16
## W.EPC0.SCG.NUS.MBBLD.1 1.008e+15
## WCSSCUS2.1 NA
## WCESCUS2.1 1.068e+15
## WCRAUUS2.1 3.386e+13
## WCRRIUS2.1 3.380e+14
## W.EPP1.YPT.NUS.MBBLD.1 4.337e+15
## W.EPL0.YPG.NUS.MBBLD.1 4.379e+15
## W.EPOOXR.YPT.NUS.MBBLD.1 5.109e+15
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 2.171e+15
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. 4.638e+06
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 1.932e+08
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA 9.096e+06
## z value
## (Intercept) 6667861
## Date 109284502
## WCRSTUS1 -6667861
## WCESTUS1 6667861
## WCSSTUS1 NA
## WGTSTUS1 6667838
## WGRSTUS1 -6667856
## WG4ST.NUS.1 -6667838
## WBCSTUS1 -6667838
## W.EPOOXE.SAE.NUS.MBBL 6667868
## WKJSTUS1 6667859
## WDISTUS1 6667860
## WD0ST.NUS.1 -6667860
## WD1ST.NUS.1 -6667860
## WDGSTUS1 -6667860
## WRESTUS1 6667861
## WPRSTUS1 -6667868
## W.EPPO6.SAE.NUS.MBBL 6667860
## WUOSTUS1 6667863
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 -6667862
## W.EPC0.FPF.SAK.MBBLD -6667861
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 -6667862
## WCRIMUS2 -6667862
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD 6667862
## WCSSCUS2 NA
## WCESCUS2 -6667862
## WCRAUUS2 -6667862
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD -6667861
## W.EPL0.YPG.NUS.MBBLD 6667861
## W.EPOOXR.YPT.NUS.MBBLD 6667861
## W.EPOOXE.YOP.NUS.MBBLD -6667864
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 -6667862
## WRPIMUS2 -6667857
## WRPEXUS2 NA
## WPESCUS2 6667862
## W.EPP0.VUA.NUS.MBBLD -6667862
## WRPUPUS2 6667861
## WGFUPUS2 6667862
## WKJUPUS2 6667862
## WDIUPUS2 6667862
## WREUPUS2 6667862
## WPRUP.NUS.2 6667862
## WWOUP.NUS.2 6667862
## WTTNTUS2 NA
## WCRFPUS2.1 6667861
## W.EPC0.FPF.SAK.MBBLD.1 -6667862
## W.EPC0.FPF.R48.MBBLD.1 -6667861
## WCRNTUS2.1 -6667860
## WCRIMUS2.1 6667860
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 -6667860
## W.EPC0.SCG.NUS.MBBLD.1 6667858
## WCSSCUS2.1 NA
## WCESCUS2.1 -6667858
## WCRAUUS2.1 -6667860
## WCRRIUS2.1 -6667861
## W.EPP1.YPT.NUS.MBBLD.1 6667860
## W.EPL0.YPG.NUS.MBBLD.1 -6667860
## W.EPOOXR.YPT.NUS.MBBLD.1 -6667860
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 6667859
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. -121020302
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 2577382
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA -122235667
## Pr(>|z|)
## (Intercept) <2e-16
## Date <2e-16
## WCRSTUS1 <2e-16
## WCESTUS1 <2e-16
## WCSSTUS1 NA
## WGTSTUS1 <2e-16
## WGRSTUS1 <2e-16
## WG4ST.NUS.1 <2e-16
## WBCSTUS1 <2e-16
## W.EPOOXE.SAE.NUS.MBBL <2e-16
## WKJSTUS1 <2e-16
## WDISTUS1 <2e-16
## WD0ST.NUS.1 <2e-16
## WD1ST.NUS.1 <2e-16
## WDGSTUS1 <2e-16
## WRESTUS1 <2e-16
## WPRSTUS1 <2e-16
## W.EPPO6.SAE.NUS.MBBL <2e-16
## WUOSTUS1 <2e-16
## WTTSTUS1 NA
## WTESTUS1 NA
## WCRFPUS2 <2e-16
## W.EPC0.FPF.SAK.MBBLD <2e-16
## W.EPC0.FPF.R48.MBBLD NA
## WCRNTUS2 <2e-16
## WCRIMUS2 <2e-16
## WCEIMUS2 NA
## WCSIMUS2 NA
## WCREXUS2 NA
## W.EPC0.SCG.NUS.MBBLD <2e-16
## WCSSCUS2 NA
## WCESCUS2 <2e-16
## WCRAUUS2 <2e-16
## WCRRIUS2 NA
## W.EPP1.YPT.NUS.MBBLD <2e-16
## W.EPL0.YPG.NUS.MBBLD <2e-16
## W.EPOOXR.YPT.NUS.MBBLD <2e-16
## W.EPOOXE.YOP.NUS.MBBLD <2e-16
## W.EPPO5.YPT.NUS.MBBLD NA
## WPGNPUS2 NA
## WRPNTUS2 <2e-16
## WRPIMUS2 <2e-16
## WRPEXUS2 NA
## WPESCUS2 <2e-16
## W.EPP0.VUA.NUS.MBBLD <2e-16
## WRPUPUS2 <2e-16
## WGFUPUS2 <2e-16
## WKJUPUS2 <2e-16
## WDIUPUS2 <2e-16
## WREUPUS2 <2e-16
## WPRUP.NUS.2 <2e-16
## WWOUP.NUS.2 <2e-16
## WTTNTUS2 NA
## WCRFPUS2.1 <2e-16
## W.EPC0.FPF.SAK.MBBLD.1 <2e-16
## W.EPC0.FPF.R48.MBBLD.1 <2e-16
## WCRNTUS2.1 <2e-16
## WCRIMUS2.1 <2e-16
## WCEIMUS2.1 NA
## WCSIMUS2.1 NA
## WCREXUS2.1 <2e-16
## W.EPC0.SCG.NUS.MBBLD.1 <2e-16
## WCSSCUS2.1 NA
## WCESCUS2.1 <2e-16
## WCRAUUS2.1 <2e-16
## WCRRIUS2.1 <2e-16
## W.EPP1.YPT.NUS.MBBLD.1 <2e-16
## W.EPL0.YPG.NUS.MBBLD.1 <2e-16
## W.EPOOXR.YPT.NUS.MBBLD.1 <2e-16
## W.EPOOXE.YOP.NUS.MBBLD.1 NA
## W.EPPO5.YPT.NUS.MBBLD.1 <2e-16
## WPGNPUS2.1 NA
## WRPNTUS2.1 NA
## WRPIMUS2.1 NA
## WRPEXUS2.1 NA
## WPESCUS2.1 NA
## W.EPP0.VUA.NUS.MBBLD.1 NA
## WRPUPUS2.1 NA
## WGFUPUS2.1 NA
## WKJUPUS2.1 NA
## WDIUPUS2.1 NA
## WREUPUS2.1 NA
## WPRUP.NUS.2.1 NA
## WWOUP.NUS.2.1 NA
## WTTNTUS2.1 NA
## WTI.Spot.Price...Dollars.per.Barrel. <2e-16
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. <2e-16
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. NA
## WTI3MA <2e-16
##
## (Intercept) ***
## Date ***
## WCRSTUS1 ***
## WCESTUS1 ***
## WCSSTUS1
## WGTSTUS1 ***
## WGRSTUS1 ***
## WG4ST.NUS.1 ***
## WBCSTUS1 ***
## W.EPOOXE.SAE.NUS.MBBL ***
## WKJSTUS1 ***
## WDISTUS1 ***
## WD0ST.NUS.1 ***
## WD1ST.NUS.1 ***
## WDGSTUS1 ***
## WRESTUS1 ***
## WPRSTUS1 ***
## W.EPPO6.SAE.NUS.MBBL ***
## WUOSTUS1 ***
## WTTSTUS1
## WTESTUS1
## WCRFPUS2 ***
## W.EPC0.FPF.SAK.MBBLD ***
## W.EPC0.FPF.R48.MBBLD
## WCRNTUS2 ***
## WCRIMUS2 ***
## WCEIMUS2
## WCSIMUS2
## WCREXUS2
## W.EPC0.SCG.NUS.MBBLD ***
## WCSSCUS2
## WCESCUS2 ***
## WCRAUUS2 ***
## WCRRIUS2
## W.EPP1.YPT.NUS.MBBLD ***
## W.EPL0.YPG.NUS.MBBLD ***
## W.EPOOXR.YPT.NUS.MBBLD ***
## W.EPOOXE.YOP.NUS.MBBLD ***
## W.EPPO5.YPT.NUS.MBBLD
## WPGNPUS2
## WRPNTUS2 ***
## WRPIMUS2 ***
## WRPEXUS2
## WPESCUS2 ***
## W.EPP0.VUA.NUS.MBBLD ***
## WRPUPUS2 ***
## WGFUPUS2 ***
## WKJUPUS2 ***
## WDIUPUS2 ***
## WREUPUS2 ***
## WPRUP.NUS.2 ***
## WWOUP.NUS.2 ***
## WTTNTUS2
## WCRFPUS2.1 ***
## W.EPC0.FPF.SAK.MBBLD.1 ***
## W.EPC0.FPF.R48.MBBLD.1 ***
## WCRNTUS2.1 ***
## WCRIMUS2.1 ***
## WCEIMUS2.1
## WCSIMUS2.1
## WCREXUS2.1 ***
## W.EPC0.SCG.NUS.MBBLD.1 ***
## WCSSCUS2.1
## WCESCUS2.1 ***
## WCRAUUS2.1 ***
## WCRRIUS2.1 ***
## W.EPP1.YPT.NUS.MBBLD.1 ***
## W.EPL0.YPG.NUS.MBBLD.1 ***
## W.EPOOXR.YPT.NUS.MBBLD.1 ***
## W.EPOOXE.YOP.NUS.MBBLD.1
## W.EPPO5.YPT.NUS.MBBLD.1 ***
## WPGNPUS2.1
## WRPNTUS2.1
## WRPIMUS2.1
## WRPEXUS2.1
## WPESCUS2.1
## W.EPP0.VUA.NUS.MBBLD.1
## WRPUPUS2.1
## WGFUPUS2.1
## WKJUPUS2.1
## WDIUPUS2.1
## WREUPUS2.1
## WPRUP.NUS.2.1
## WWOUP.NUS.2.1
## WTTNTUS2.1
## WTI.Spot.Price...Dollars.per.Barrel. ***
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. ***
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 261.88 on 188 degrees of freedom
## Residual deviance: 3243.93 on 132 degrees of freedom
## AIC: 3357.9
##
## Number of Fisher Scoring iterations: 6
anova(logisticmodel, test = "Chisq")
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: Y
##
## Terms added sequentially (first to last)
##
##
## Df
## NULL
## Date 1
## WCRSTUS1 1
## WCESTUS1 1
## WCSSTUS1 0
## WGTSTUS1 1
## WGRSTUS1 1
## WG4ST.NUS.1 1
## WBCSTUS1 1
## W.EPOOXE.SAE.NUS.MBBL 1
## WKJSTUS1 1
## WDISTUS1 1
## WD0ST.NUS.1 1
## WD1ST.NUS.1 1
## WDGSTUS1 1
## WRESTUS1 1
## WPRSTUS1 1
## W.EPPO6.SAE.NUS.MBBL 1
## WUOSTUS1 1
## WTTSTUS1 0
## WTESTUS1 0
## WCRFPUS2 1
## W.EPC0.FPF.SAK.MBBLD 1
## W.EPC0.FPF.R48.MBBLD 0
## WCRNTUS2 1
## WCRIMUS2 1
## WCEIMUS2 0
## WCSIMUS2 0
## WCREXUS2 0
## W.EPC0.SCG.NUS.MBBLD 1
## WCSSCUS2 0
## WCESCUS2 1
## WCRAUUS2 1
## WCRRIUS2 0
## W.EPP1.YPT.NUS.MBBLD 1
## W.EPL0.YPG.NUS.MBBLD 1
## W.EPOOXR.YPT.NUS.MBBLD 1
## W.EPOOXE.YOP.NUS.MBBLD 1
## W.EPPO5.YPT.NUS.MBBLD 0
## WPGNPUS2 0
## WRPNTUS2 1
## WRPIMUS2 1
## WRPEXUS2 0
## WPESCUS2 1
## W.EPP0.VUA.NUS.MBBLD 1
## WRPUPUS2 1
## WGFUPUS2 1
## WKJUPUS2 1
## WDIUPUS2 1
## WREUPUS2 1
## WPRUP.NUS.2 1
## WWOUP.NUS.2 1
## WTTNTUS2 0
## WCRFPUS2.1 1
## W.EPC0.FPF.SAK.MBBLD.1 1
## W.EPC0.FPF.R48.MBBLD.1 1
## WCRNTUS2.1 1
## WCRIMUS2.1 1
## WCEIMUS2.1 0
## WCSIMUS2.1 0
## WCREXUS2.1 1
## W.EPC0.SCG.NUS.MBBLD.1 1
## WCSSCUS2.1 0
## WCESCUS2.1 1
## WCRAUUS2.1 1
## WCRRIUS2.1 1
## W.EPP1.YPT.NUS.MBBLD.1 1
## W.EPL0.YPG.NUS.MBBLD.1 1
## W.EPOOXR.YPT.NUS.MBBLD.1 1
## W.EPOOXE.YOP.NUS.MBBLD.1 0
## W.EPPO5.YPT.NUS.MBBLD.1 0
## WPGNPUS2.1 1
## WRPNTUS2.1 0
## WRPIMUS2.1 0
## WRPEXUS2.1 0
## WPESCUS2.1 0
## W.EPP0.VUA.NUS.MBBLD.1 0
## WRPUPUS2.1 0
## WGFUPUS2.1 0
## WKJUPUS2.1 0
## WDIUPUS2.1 0
## WREUPUS2.1 0
## WPRUP.NUS.2.1 0
## WWOUP.NUS.2.1 0
## WTTNTUS2.1 0
## WTI.Spot.Price...Dollars.per.Barrel. 1
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 1
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0
## WTI3MA 1
## Deviance
## NULL
## Date 0.00
## WCRSTUS1 0.06
## WCESTUS1 0.13
## WCSSTUS1 0.00
## WGTSTUS1 0.01
## WGRSTUS1 0.01
## WG4ST.NUS.1 0.07
## WBCSTUS1 0.14
## W.EPOOXE.SAE.NUS.MBBL 0.69
## WKJSTUS1 0.44
## WDISTUS1 0.67
## WD0ST.NUS.1 0.15
## WD1ST.NUS.1 0.39
## WDGSTUS1 0.00
## WRESTUS1 0.00
## WPRSTUS1 0.24
## W.EPPO6.SAE.NUS.MBBL 1.79
## WUOSTUS1 2.05
## WTTSTUS1 0.00
## WTESTUS1 0.00
## WCRFPUS2 0.01
## W.EPC0.FPF.SAK.MBBLD 0.96
## W.EPC0.FPF.R48.MBBLD 0.00
## WCRNTUS2 1.79
## WCRIMUS2 0.88
## WCEIMUS2 0.00
## WCSIMUS2 0.00
## WCREXUS2 0.00
## W.EPC0.SCG.NUS.MBBLD 2.41
## WCSSCUS2 0.00
## WCESCUS2 0.10
## WCRAUUS2 1.20
## WCRRIUS2 0.00
## W.EPP1.YPT.NUS.MBBLD 0.11
## W.EPL0.YPG.NUS.MBBLD 1.03
## W.EPOOXR.YPT.NUS.MBBLD 0.00
## W.EPOOXE.YOP.NUS.MBBLD 0.26
## W.EPPO5.YPT.NUS.MBBLD 0.00
## WPGNPUS2 0.00
## WRPNTUS2 0.01
## WRPIMUS2 0.10
## WRPEXUS2 0.00
## WPESCUS2 3.62
## W.EPP0.VUA.NUS.MBBLD 0.28
## WRPUPUS2 0.00
## WGFUPUS2 1.03
## WKJUPUS2 0.12
## WDIUPUS2 0.01
## WREUPUS2 1.52
## WPRUP.NUS.2 1.13
## WWOUP.NUS.2 1.87
## WTTNTUS2 0.00
## WCRFPUS2.1 0.06
## W.EPC0.FPF.SAK.MBBLD.1 0.20
## W.EPC0.FPF.R48.MBBLD.1 0.13
## WCRNTUS2.1 0.00
## WCRIMUS2.1 1.14
## WCEIMUS2.1 0.00
## WCSIMUS2.1 0.00
## WCREXUS2.1 1.13
## W.EPC0.SCG.NUS.MBBLD.1 1.06
## WCSSCUS2.1 0.00
## WCESCUS2.1 0.02
## WCRAUUS2.1 0.85
## WCRRIUS2.1 1.23
## W.EPP1.YPT.NUS.MBBLD.1 1.81
## W.EPL0.YPG.NUS.MBBLD.1 1.30
## W.EPOOXR.YPT.NUS.MBBLD.1 0.00
## W.EPOOXE.YOP.NUS.MBBLD.1 0.00
## W.EPPO5.YPT.NUS.MBBLD.1 0.00
## WPGNPUS2.1 0.00
## WRPNTUS2.1 0.00
## WRPIMUS2.1 0.00
## WRPEXUS2.1 0.00
## WPESCUS2.1 0.00
## W.EPP0.VUA.NUS.MBBLD.1 0.00
## WRPUPUS2.1 288.35
## WGFUPUS2.1 0.00
## WKJUPUS2.1 432.52
## WDIUPUS2.1 0.00
## WREUPUS2.1 72.09
## WPRUP.NUS.2.1 360.44
## WWOUP.NUS.2.1 0.00
## WTTNTUS2.1 0.00
## WTI.Spot.Price...Dollars.per.Barrel. 1730.10
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 432.52
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0.00
## WTI3MA 865.05
## Resid. Df
## NULL 188
## Date 187
## WCRSTUS1 186
## WCESTUS1 185
## WCSSTUS1 185
## WGTSTUS1 184
## WGRSTUS1 183
## WG4ST.NUS.1 182
## WBCSTUS1 181
## W.EPOOXE.SAE.NUS.MBBL 180
## WKJSTUS1 179
## WDISTUS1 178
## WD0ST.NUS.1 177
## WD1ST.NUS.1 176
## WDGSTUS1 175
## WRESTUS1 174
## WPRSTUS1 173
## W.EPPO6.SAE.NUS.MBBL 172
## WUOSTUS1 171
## WTTSTUS1 171
## WTESTUS1 171
## WCRFPUS2 170
## W.EPC0.FPF.SAK.MBBLD 169
## W.EPC0.FPF.R48.MBBLD 169
## WCRNTUS2 168
## WCRIMUS2 167
## WCEIMUS2 167
## WCSIMUS2 167
## WCREXUS2 167
## W.EPC0.SCG.NUS.MBBLD 166
## WCSSCUS2 166
## WCESCUS2 165
## WCRAUUS2 164
## WCRRIUS2 164
## W.EPP1.YPT.NUS.MBBLD 163
## W.EPL0.YPG.NUS.MBBLD 162
## W.EPOOXR.YPT.NUS.MBBLD 161
## W.EPOOXE.YOP.NUS.MBBLD 160
## W.EPPO5.YPT.NUS.MBBLD 160
## WPGNPUS2 160
## WRPNTUS2 159
## WRPIMUS2 158
## WRPEXUS2 158
## WPESCUS2 157
## W.EPP0.VUA.NUS.MBBLD 156
## WRPUPUS2 155
## WGFUPUS2 154
## WKJUPUS2 153
## WDIUPUS2 152
## WREUPUS2 151
## WPRUP.NUS.2 150
## WWOUP.NUS.2 149
## WTTNTUS2 149
## WCRFPUS2.1 148
## W.EPC0.FPF.SAK.MBBLD.1 147
## W.EPC0.FPF.R48.MBBLD.1 146
## WCRNTUS2.1 145
## WCRIMUS2.1 144
## WCEIMUS2.1 144
## WCSIMUS2.1 144
## WCREXUS2.1 143
## W.EPC0.SCG.NUS.MBBLD.1 142
## WCSSCUS2.1 142
## WCESCUS2.1 141
## WCRAUUS2.1 140
## WCRRIUS2.1 139
## W.EPP1.YPT.NUS.MBBLD.1 138
## W.EPL0.YPG.NUS.MBBLD.1 137
## W.EPOOXR.YPT.NUS.MBBLD.1 136
## W.EPOOXE.YOP.NUS.MBBLD.1 136
## W.EPPO5.YPT.NUS.MBBLD.1 136
## WPGNPUS2.1 135
## WRPNTUS2.1 135
## WRPIMUS2.1 135
## WRPEXUS2.1 135
## WPESCUS2.1 135
## W.EPP0.VUA.NUS.MBBLD.1 135
## WRPUPUS2.1 135
## WGFUPUS2.1 135
## WKJUPUS2.1 135
## WDIUPUS2.1 135
## WREUPUS2.1 135
## WPRUP.NUS.2.1 135
## WWOUP.NUS.2.1 135
## WTTNTUS2.1 135
## WTI.Spot.Price...Dollars.per.Barrel. 134
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 133
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 133
## WTI3MA 132
## Resid. Dev
## NULL 261.9
## Date 261.9
## WCRSTUS1 261.8
## WCESTUS1 261.7
## WCSSTUS1 261.7
## WGTSTUS1 261.7
## WGRSTUS1 261.7
## WG4ST.NUS.1 261.6
## WBCSTUS1 261.5
## W.EPOOXE.SAE.NUS.MBBL 260.8
## WKJSTUS1 260.3
## WDISTUS1 259.7
## WD0ST.NUS.1 259.5
## WD1ST.NUS.1 259.1
## WDGSTUS1 259.1
## WRESTUS1 259.1
## WPRSTUS1 258.9
## W.EPPO6.SAE.NUS.MBBL 257.1
## WUOSTUS1 255.1
## WTTSTUS1 255.1
## WTESTUS1 255.1
## WCRFPUS2 255.0
## W.EPC0.FPF.SAK.MBBLD 254.1
## W.EPC0.FPF.R48.MBBLD 254.1
## WCRNTUS2 252.3
## WCRIMUS2 251.4
## WCEIMUS2 251.4
## WCSIMUS2 251.4
## WCREXUS2 251.4
## W.EPC0.SCG.NUS.MBBLD 249.0
## WCSSCUS2 249.0
## WCESCUS2 248.9
## WCRAUUS2 247.7
## WCRRIUS2 247.7
## W.EPP1.YPT.NUS.MBBLD 247.6
## W.EPL0.YPG.NUS.MBBLD 246.6
## W.EPOOXR.YPT.NUS.MBBLD 246.6
## W.EPOOXE.YOP.NUS.MBBLD 246.3
## W.EPPO5.YPT.NUS.MBBLD 246.3
## WPGNPUS2 246.3
## WRPNTUS2 246.3
## WRPIMUS2 246.2
## WRPEXUS2 246.2
## WPESCUS2 242.6
## W.EPP0.VUA.NUS.MBBLD 242.3
## WRPUPUS2 242.3
## WGFUPUS2 241.3
## WKJUPUS2 241.2
## WDIUPUS2 241.1
## WREUPUS2 239.6
## WPRUP.NUS.2 238.5
## WWOUP.NUS.2 236.6
## WTTNTUS2 236.6
## WCRFPUS2.1 236.6
## W.EPC0.FPF.SAK.MBBLD.1 236.4
## W.EPC0.FPF.R48.MBBLD.1 236.2
## WCRNTUS2.1 236.2
## WCRIMUS2.1 235.1
## WCEIMUS2.1 235.1
## WCSIMUS2.1 235.1
## WCREXUS2.1 234.0
## W.EPC0.SCG.NUS.MBBLD.1 232.9
## WCSSCUS2.1 232.9
## WCESCUS2.1 232.9
## WCRAUUS2.1 232.0
## WCRRIUS2.1 230.8
## W.EPP1.YPT.NUS.MBBLD.1 229.0
## W.EPL0.YPG.NUS.MBBLD.1 227.7
## W.EPOOXR.YPT.NUS.MBBLD.1 227.7
## W.EPOOXE.YOP.NUS.MBBLD.1 227.7
## W.EPPO5.YPT.NUS.MBBLD.1 299.8
## WPGNPUS2.1 5334.5
## WRPNTUS2.1 5334.5
## WRPIMUS2.1 5334.5
## WRPEXUS2.1 5334.5
## WPESCUS2.1 5839.1
## W.EPP0.VUA.NUS.MBBLD.1 6127.4
## WRPUPUS2.1 5839.1
## WGFUPUS2.1 6127.4
## WKJUPUS2.1 5694.9
## WDIUPUS2.1 5694.9
## WREUPUS2.1 5622.8
## WPRUP.NUS.2.1 5262.4
## WWOUP.NUS.2.1 5262.4
## WTTNTUS2.1 6271.6
## WTI.Spot.Price...Dollars.per.Barrel. 4541.5
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 4109.0
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 4109.0
## WTI3MA 3243.9
## Pr(>Chi)
## NULL
## Date 0.94515
## WCRSTUS1 0.81386
## WCESTUS1 0.72121
## WCSSTUS1
## WGTSTUS1 0.94091
## WGRSTUS1 0.92130
## WG4ST.NUS.1 0.79338
## WBCSTUS1 0.71051
## W.EPOOXE.SAE.NUS.MBBL 0.40735
## WKJSTUS1 0.50838
## WDISTUS1 0.41161
## WD0ST.NUS.1 0.70138
## WD1ST.NUS.1 0.53229
## WDGSTUS1 0.98330
## WRESTUS1 0.99074
## WPRSTUS1 0.62087
## W.EPPO6.SAE.NUS.MBBL 0.18151
## WUOSTUS1 0.15236
## WTTSTUS1
## WTESTUS1
## WCRFPUS2 0.92394
## W.EPC0.FPF.SAK.MBBLD 0.32839
## W.EPC0.FPF.R48.MBBLD
## WCRNTUS2 0.18105
## WCRIMUS2 0.34779
## WCEIMUS2
## WCSIMUS2
## WCREXUS2
## W.EPC0.SCG.NUS.MBBLD 0.12088
## WCSSCUS2
## WCESCUS2 0.74628
## WCRAUUS2 0.27362
## WCRRIUS2
## W.EPP1.YPT.NUS.MBBLD 0.74154
## W.EPL0.YPG.NUS.MBBLD 0.30990
## W.EPOOXR.YPT.NUS.MBBLD 0.98118
## W.EPOOXE.YOP.NUS.MBBLD 0.61318
## W.EPPO5.YPT.NUS.MBBLD
## WPGNPUS2
## WRPNTUS2 0.93072
## WRPIMUS2 0.75118
## WRPEXUS2
## WPESCUS2 0.05711
## W.EPP0.VUA.NUS.MBBLD 0.59555
## WRPUPUS2 0.97176
## WGFUPUS2 0.30999
## WKJUPUS2 0.72573
## WDIUPUS2 0.94092
## WREUPUS2 0.21749
## WPRUP.NUS.2 0.28824
## WWOUP.NUS.2 0.17199
## WTTNTUS2
## WCRFPUS2.1 0.80741
## W.EPC0.FPF.SAK.MBBLD.1 0.65171
## W.EPC0.FPF.R48.MBBLD.1 0.71989
## WCRNTUS2.1 0.97182
## WCRIMUS2.1 0.28537
## WCEIMUS2.1
## WCSIMUS2.1
## WCREXUS2.1 0.28815
## W.EPC0.SCG.NUS.MBBLD.1 0.30350
## WCSSCUS2.1
## WCESCUS2.1 0.87975
## WCRAUUS2.1 0.35522
## WCRRIUS2.1 0.26693
## W.EPP1.YPT.NUS.MBBLD.1 0.17896
## W.EPL0.YPG.NUS.MBBLD.1 0.25423
## W.EPOOXR.YPT.NUS.MBBLD.1 1.00000
## W.EPOOXE.YOP.NUS.MBBLD.1
## W.EPPO5.YPT.NUS.MBBLD.1
## WPGNPUS2.1 1.00000
## WRPNTUS2.1
## WRPIMUS2.1
## WRPEXUS2.1
## WPESCUS2.1
## W.EPP0.VUA.NUS.MBBLD.1
## WRPUPUS2.1
## WGFUPUS2.1
## WKJUPUS2.1
## WDIUPUS2.1
## WREUPUS2.1
## WPRUP.NUS.2.1
## WWOUP.NUS.2.1
## WTTNTUS2.1
## WTI.Spot.Price...Dollars.per.Barrel. < 2e-16
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. < 2e-16
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA < 2e-16
##
## NULL
## Date
## WCRSTUS1
## WCESTUS1
## WCSSTUS1
## WGTSTUS1
## WGRSTUS1
## WG4ST.NUS.1
## WBCSTUS1
## W.EPOOXE.SAE.NUS.MBBL
## WKJSTUS1
## WDISTUS1
## WD0ST.NUS.1
## WD1ST.NUS.1
## WDGSTUS1
## WRESTUS1
## WPRSTUS1
## W.EPPO6.SAE.NUS.MBBL
## WUOSTUS1
## WTTSTUS1
## WTESTUS1
## WCRFPUS2
## W.EPC0.FPF.SAK.MBBLD
## W.EPC0.FPF.R48.MBBLD
## WCRNTUS2
## WCRIMUS2
## WCEIMUS2
## WCSIMUS2
## WCREXUS2
## W.EPC0.SCG.NUS.MBBLD
## WCSSCUS2
## WCESCUS2
## WCRAUUS2
## WCRRIUS2
## W.EPP1.YPT.NUS.MBBLD
## W.EPL0.YPG.NUS.MBBLD
## W.EPOOXR.YPT.NUS.MBBLD
## W.EPOOXE.YOP.NUS.MBBLD
## W.EPPO5.YPT.NUS.MBBLD
## WPGNPUS2
## WRPNTUS2
## WRPIMUS2
## WRPEXUS2
## WPESCUS2 .
## W.EPP0.VUA.NUS.MBBLD
## WRPUPUS2
## WGFUPUS2
## WKJUPUS2
## WDIUPUS2
## WREUPUS2
## WPRUP.NUS.2
## WWOUP.NUS.2
## WTTNTUS2
## WCRFPUS2.1
## W.EPC0.FPF.SAK.MBBLD.1
## W.EPC0.FPF.R48.MBBLD.1
## WCRNTUS2.1
## WCRIMUS2.1
## WCEIMUS2.1
## WCSIMUS2.1
## WCREXUS2.1
## W.EPC0.SCG.NUS.MBBLD.1
## WCSSCUS2.1
## WCESCUS2.1
## WCRAUUS2.1
## WCRRIUS2.1
## W.EPP1.YPT.NUS.MBBLD.1
## W.EPL0.YPG.NUS.MBBLD.1
## W.EPOOXR.YPT.NUS.MBBLD.1
## W.EPOOXE.YOP.NUS.MBBLD.1
## W.EPPO5.YPT.NUS.MBBLD.1
## WPGNPUS2.1
## WRPNTUS2.1
## WRPIMUS2.1
## WRPEXUS2.1
## WPESCUS2.1
## W.EPP0.VUA.NUS.MBBLD.1
## WRPUPUS2.1
## WGFUPUS2.1
## WKJUPUS2.1
## WDIUPUS2.1
## WREUPUS2.1
## WPRUP.NUS.2.1
## WWOUP.NUS.2.1
## WTTNTUS2.1
## WTI.Spot.Price...Dollars.per.Barrel. ***
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. ***
## U.S..Gulf.Coast.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pR2(logisticmodel)
## llh llhNull G2 McFadden r2ML
## -1.621964e+03 -1.309387e+02 -2.982051e+03 -1.138721e+01 -7.117378e+06
## r2CU
## -9.492052e+06
fitted.results <- predict(logisticmodel, newdata = test, type = 'response')
## Warning in predict.lm(object, newdata, se.fit, scale = 1, type =
## ifelse(type == : prediction from a rank-deficient fit may be misleading
for(i in 1:63){
if(abs(test$Y[i]-fitted.results[i])<.5001){
C=C+1
}
else{
f=f+1
}
}
accuracy = C/(C+f)
print(accuracy)
## [1] 0.6349206
Logistic Model for Variables with smallest chi-squared
C=0
f=0
logisticmodel2 = glm(Y~ W.EPPO6.SAE.NUS.MBBL + WUOSTUS1 + WCRIMUS2 + WCSSCUS2 + WPESCUS2 + WWOUP.NUS.2 + W.EPP1.YPT.NUS.MBBLD.1 + WTI.Spot.Price...Dollars.per.Barrel. + New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. + WTI3MA, family = binomial(link = "logit"), data=train)
summary(logisticmodel2)
##
## Call:
## glm(formula = Y ~ W.EPPO6.SAE.NUS.MBBL + WUOSTUS1 + WCRIMUS2 +
## WCSSCUS2 + WPESCUS2 + WWOUP.NUS.2 + W.EPP1.YPT.NUS.MBBLD.1 +
## WTI.Spot.Price...Dollars.per.Barrel. + New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. +
## WTI3MA, family = binomial(link = "logit"), data = train)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.4246 -1.1550 -0.8441 1.1565 1.4840
##
## Coefficients: (1 not defined because of singularities)
## Estimate
## (Intercept) 1.661e+01
## W.EPPO6.SAE.NUS.MBBL 3.248e-07
## WUOSTUS1 -5.381e-05
## WCRIMUS2 -2.984e-04
## WCSSCUS2 NA
## WPESCUS2 -8.361e-05
## WWOUP.NUS.2 3.013e-04
## W.EPP1.YPT.NUS.MBBLD.1 -1.702e-03
## WTI.Spot.Price...Dollars.per.Barrel. -2.633e-01
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. -9.345e-01
## WTI3MA 2.651e-01
## Std. Error
## (Intercept) 1.777e+01
## W.EPPO6.SAE.NUS.MBBL 1.271e-05
## WUOSTUS1 8.531e-05
## WCRIMUS2 2.954e-04
## WCSSCUS2 NA
## WPESCUS2 1.885e-04
## WWOUP.NUS.2 4.256e-04
## W.EPP1.YPT.NUS.MBBLD.1 2.178e-03
## WTI.Spot.Price...Dollars.per.Barrel. 1.443e-01
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 2.471e+00
## WTI3MA 1.488e-01
## z value
## (Intercept) 0.935
## W.EPPO6.SAE.NUS.MBBL 0.026
## WUOSTUS1 -0.631
## WCRIMUS2 -1.010
## WCSSCUS2 NA
## WPESCUS2 -0.444
## WWOUP.NUS.2 0.708
## W.EPP1.YPT.NUS.MBBLD.1 -0.781
## WTI.Spot.Price...Dollars.per.Barrel. -1.825
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. -0.378
## WTI3MA 1.782
## Pr(>|z|)
## (Intercept) 0.3499
## W.EPPO6.SAE.NUS.MBBL 0.9796
## WUOSTUS1 0.5282
## WCRIMUS2 0.3124
## WCSSCUS2 NA
## WPESCUS2 0.6574
## WWOUP.NUS.2 0.4790
## W.EPP1.YPT.NUS.MBBLD.1 0.4346
## WTI.Spot.Price...Dollars.per.Barrel. 0.0681
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0.7053
## WTI3MA 0.0748
##
## (Intercept)
## W.EPPO6.SAE.NUS.MBBL
## WUOSTUS1
## WCRIMUS2
## WCSSCUS2
## WPESCUS2
## WWOUP.NUS.2
## W.EPP1.YPT.NUS.MBBLD.1
## WTI.Spot.Price...Dollars.per.Barrel. .
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 261.88 on 188 degrees of freedom
## Residual deviance: 255.35 on 179 degrees of freedom
## AIC: 275.35
##
## Number of Fisher Scoring iterations: 4
anova(logisticmodel2, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: Y
##
## Terms added sequentially (first to last)
##
##
## Df
## NULL
## W.EPPO6.SAE.NUS.MBBL 1
## WUOSTUS1 1
## WCRIMUS2 1
## WCSSCUS2 0
## WPESCUS2 1
## WWOUP.NUS.2 1
## W.EPP1.YPT.NUS.MBBLD.1 1
## WTI.Spot.Price...Dollars.per.Barrel. 1
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 1
## WTI3MA 1
## Deviance
## NULL
## W.EPPO6.SAE.NUS.MBBL 0.0179
## WUOSTUS1 0.0485
## WCRIMUS2 1.1253
## WCSSCUS2 0.0000
## WPESCUS2 0.1935
## WWOUP.NUS.2 0.3159
## W.EPP1.YPT.NUS.MBBLD.1 0.2469
## WTI.Spot.Price...Dollars.per.Barrel. 1.0835
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0.0030
## WTI3MA 3.4964
## Resid. Df
## NULL 188
## W.EPPO6.SAE.NUS.MBBL 187
## WUOSTUS1 186
## WCRIMUS2 185
## WCSSCUS2 185
## WPESCUS2 184
## WWOUP.NUS.2 183
## W.EPP1.YPT.NUS.MBBLD.1 182
## WTI.Spot.Price...Dollars.per.Barrel. 181
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 180
## WTI3MA 179
## Resid. Dev
## NULL 261.88
## W.EPPO6.SAE.NUS.MBBL 261.86
## WUOSTUS1 261.81
## WCRIMUS2 260.69
## WCSSCUS2 260.69
## WPESCUS2 260.49
## WWOUP.NUS.2 260.18
## W.EPP1.YPT.NUS.MBBLD.1 259.93
## WTI.Spot.Price...Dollars.per.Barrel. 258.85
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 258.84
## WTI3MA 255.35
## Pr(>Chi)
## NULL
## W.EPPO6.SAE.NUS.MBBL 0.8935
## WUOSTUS1 0.8256
## WCRIMUS2 0.2888
## WCSSCUS2
## WPESCUS2 0.6600
## WWOUP.NUS.2 0.5741
## W.EPP1.YPT.NUS.MBBLD.1 0.6192
## WTI.Spot.Price...Dollars.per.Barrel. 0.2979
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon. 0.9561
## WTI3MA 0.0615
##
## NULL
## W.EPPO6.SAE.NUS.MBBL
## WUOSTUS1
## WCRIMUS2
## WCSSCUS2
## WPESCUS2
## WWOUP.NUS.2
## W.EPP1.YPT.NUS.MBBLD.1
## WTI.Spot.Price...Dollars.per.Barrel.
## New.York.Harbor.Conventional.Gasoline.Regular.Spot.Price.FOB..Dollars.per.Gallon.
## WTI3MA .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pR2(logisticmodel2)
## llh llhNull G2 McFadden r2ML
## -127.67313712 -130.93867184 6.53106945 0.02493942 0.03396569
## r2CU
## 0.04529815
fitted.results2 <- predict(logisticmodel2, newdata = test, type = 'response')
## Warning in predict.lm(object, newdata, se.fit, scale = 1, type =
## ifelse(type == : prediction from a rank-deficient fit may be misleading
for(i in 1:63){
if(abs(test$Y[i]-fitted.results2[i])<.5001){
C=C+1
}
else{
f=f+1
}
}
accuracy = C/(C+f)
print(accuracy)
## [1] 0.4444444
Logistic Model for the two smallest chi-squared features
C=0
f=0
logisticmodel3 = glm(Y~ WTI3MA + WTI.Spot.Price...Dollars.per.Barrel. , family = binomial(link = "logit"), data=train)
summary(logisticmodel3)
##
## Call:
## glm(formula = Y ~ WTI3MA + WTI.Spot.Price...Dollars.per.Barrel.,
## family = binomial(link = "logit"), data = train)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.3443 -1.1447 -0.9544 1.1947 1.4812
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.6983 1.4774 0.473 0.6365
## WTI3MA 0.2328 0.1405 1.656 0.0977
## WTI.Spot.Price...Dollars.per.Barrel. -0.2485 0.1372 -1.811 0.0701
##
## (Intercept)
## WTI3MA .
## WTI.Spot.Price...Dollars.per.Barrel. .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 261.88 on 188 degrees of freedom
## Residual deviance: 257.99 on 186 degrees of freedom
## AIC: 263.99
##
## Number of Fisher Scoring iterations: 4
anova(logisticmodel3, test = "Chisq")
## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: Y
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev
## NULL 188 261.88
## WTI3MA 1 0.2237 187 261.65
## WTI.Spot.Price...Dollars.per.Barrel. 1 3.6679 186 257.99
## Pr(>Chi)
## NULL
## WTI3MA 0.63620
## WTI.Spot.Price...Dollars.per.Barrel. 0.05547 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pR2(logisticmodel3)
## llh llhNull G2 McFadden r2ML
## -128.99285489 -130.93867184 3.89163390 0.01486052 0.02038012
## r2CU
## 0.02717983
fitted.results3 <- predict(logisticmodel3, newdata = test, type = 'response')
for(i in 1:63){
if(abs(test$Y[i]-fitted.results3[i])<.5001){
C=C+1
}
else{
f=f+1
}
}
accuracy = C/(C+f)
print(accuracy)
## [1] 0.4920635