JestonBlu / Unemployment

Masters Project: Forecasting Unemployment
0 stars 4 forks source link

Modeling #3

Closed JestonBlu closed 8 years ago

JestonBlu commented 8 years ago

Use this thread to discuss modeling and forecasting

JestonBlu commented 8 years ago

If you want to post your talking points or have anything clarified before your presentation we can give you some feedback.

sheltonmath commented 8 years ago

The appendix is a good idea.

I have short titles in a footnote that needs to be adjusted, but an appendix would allow us to elaborate.

How do you think we should go about that. Should everyone write up their contribution and post it?

JestonBlu commented 8 years ago

Yeah I think that's fine. I can't imagine we each need to put more than a single bullet in.

On Jul 25, 2016 2:47 PM, "Alison" notifications@github.com wrote:

The appendix is a good idea.

I have short titles in a footnote that needs to be adjusted, but an appendix would allow us to elaborate.

How do you think we should go about that. Should everyone write up their contribution and post it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235063108, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL2he10pdlMALaEJeJKC0vGiYm8efAYks5qZRLVgaJpZM4Izj8R .

sheltonmath commented 8 years ago

Where I am at right now with the write up.

draft3.pdf

I want to include the mathematical representation of the final model. Has anyone done that yet for our VAR(1) model? If not I'll go back through the code.

The plots could benefit from having larger fonts so they fit well in the paper, if someone is willing to make those adjustments in the code that would be helpful. It would speed me along a bit.

Any ideas for further study? I was thinking maybe a spectral model like Skare and BUterin did for Croatia?

Definitely an indicator for election year, an indicator for the dominant party or party of president, ect...

JestonBlu commented 8 years ago

I'll take care of the plots. I posted the two model formulas a couple threads ago. Is that what you mean?

On Jul 25, 2016 3:02 PM, "Alison" notifications@github.com wrote:

Where I am at right now with the write up.

draft3.pdf https://github.com/JestonBlu/STAT626_PROJECT/files/382351/draft3.pdf

I want to include the mathematical representation of the final model. Has anyone done that yet for our VAR(1) model? If not I'll go back through the code.

The plots could benefit from having larger fonts so they fit well in the paper, if someone is willing to make those adjustments in the code that would be helpful. It would speed me along a bit.

Any ideas for further study? I was thinking maybe a spectral model like Skare and BUterin did for Croatia?

Definitely an indicator for election year, an indicator for the dominant party or party of president, ect...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235067316, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL2hbgyZzMUI5twmRkAqKWAneU-ZEPKks5qZRZrgaJpZM4Izj8R .

sheltonmath commented 8 years ago

Yes, thank you. I'll go back and find them.

trlilley12 commented 8 years ago

We should also include the SEs in parentheses. And we can note that all coefficients were significant at the alpha = 0.001 level.

Estimation results for equation unem:

unem = unem.l1 + constr.l1 + retail.l1 + recession.l1 + const + trend

Estimation results for equation unem: 
===================================== 
unem = unem.l1 + constr.l1 + retail.l1 + recession.l1 + const + trend 
          Estimate Std. Error t value Pr(>|t|)    
unem.l1       0.975191   0.009984  97.677  < 2e-16 ***
constr.l1     0.004262   0.001249   3.412 0.000744 ***
retail.l1    -0.005873   0.001121  -5.241 3.24e-07 ***
recession.l1  0.192394   0.031793   6.051 4.80e-09 ***
const         0.843825   0.201499   4.188 3.82e-05 ***
trend         0.004488   0.000943   4.759 3.17e-06 ***
trlilley12 commented 8 years ago

For the discussion, we can note that the coefficient for retail is negative, which makes sense, because if people are spending more, they are more likely to be employed. The positive coefficient for construction is a little harder to explain. The positive trend coefficient suggests that, overall, unemployment has increased over the last 23 years, and this seems to be supported from the original graph of the data. Also, the high positive coefficient for the recession indicator makes sense as well. The only one that is strange is maybe the construction coefficient, but we could argue that, while significant, it might not be practically significant, since it is so small.

trlilley12 commented 8 years ago

Model strengths: In the long run (past one year), the VAR(1) model seems to provide a much more accurate forecast than the ARIMA(1, 2, 1) model and with much narrower prediction intervals. The complex cyclical nature of unemployment necessitates the use of a more advanced model for long forecasts.

Model weaknesses: In the short term (the next six months to a year), VAR(1) is not dramatically more effective than ARIMA(1, 2, 1), suggesting that an VAR(1) model might be overfitting the data in this region, i. e., more parameters were estimated and more degrees of freedom were sacrificed than necessary.

Next steps: Maybe we could try to come up with a model that somehow combines the simplicity of the ARIMA models in the short term, while incorporating the more complex structure needed for the long term. Also, there are countless more economic predictors (e.g., construction spending, retail spending, etc.) than the ones we included, so further investigation might reveal even more useful predictors.

We were not able to analyze the effect that presidential transitions had on unemployment, but it seems that (just from the raw data) a new presidential term is accompanied by a sharp increase in unemployment, followed by a slower decline. This could offer a future avenue of research.

trlilley12 commented 8 years ago

Here are the CCFs of the residuals. The first graph is the CCF of the unemployment residuals with themselves, which is just the ACF. The y-axes are labelled "ACF" but are really the CCF.

ccf

JestonBlu commented 8 years ago

@sheltonmath use the model formula that @trlilley12 just posted, the one i posted before was before i cleaned up some of the code

trlilley12 commented 8 years ago

This is probably better than the graph I just posted. I followed what the book did in figure 5.13.

ccf

trlilley12 commented 8 years ago

The Portmanteau Test, whose null hypothesis is that the residuals are stationary (basically the multivariate Q-test) , returned a p-value < 0.001. This small p-value, along with the graphs above, suggests there is still some dependence still left in our residuals. Clearly, our model is not perfect, and we would need to explore how to better account for the correlation between unemployment and other predictors in future models.

JestonBlu commented 8 years ago

Im creating a folder Plots/Preso_Plots for the finalized plots that can be dropped into the writeup. Travis can you point me to the code you just used for that plot so I can tweak the labels?

trlilley12 commented 8 years ago

Sure, I just put it in the RScripts folder and titled it "CCF".

sheltonmath commented 8 years ago

Thank you.

I put in some images into the Beamer presentation as a starting point. Here is the link. I will fix the model code.

https://www.overleaf.com/5748439mwhjrx

JestonBlu commented 8 years ago

@sheltonmath im creating an Rscript Preso_Plots.R to generate all the plots in one place in case you need to tweak something to make it fit. Ill let you know once I have all of the plots from the current writeup ready and we can tweak from there.

sheltonmath commented 8 years ago

Thank you Joseph.

JestonBlu commented 8 years ago

@sheltonmath would you prefer me to leave the title off so you can put in a caption? What do you think would look better?

sheltonmath commented 8 years ago

I am planning on typing in captions so no title would be better. If you have an idea for the caption then you could put it in as a comment if you'd like.

JestonBlu commented 8 years ago

im giving each image a long title which will give you an idea for the caption

sheltonmath commented 8 years ago

@JestonBlu thank you. That will be very helpful.

@trlilley12 Can you double check my interpretation of the coefficients in the model. I didn't look it up and just typed in from the output above. It is on the second to last slide of the beamer presentation

bopangpsy commented 8 years ago

Page 1 right: “The unemployment data being examined was obtained from the seasonaly adjusted, monthly, Civilian Unemployment Rate Series (UNRATE).” “seasonaly” might be “seasonally”. Also, we may cite the Forecasting the U.S. Unemployment Rate (Montgomery et al., 2014) paper to give a reference support why we used the seasonally adjusted data.

Page 2 left bottom: “seasonlly” might be “seasonally” Just a typo.

Page 4 right bottom. we need to give a fuller diagnostic plot for the model 3. The textbook works through an example and gives a plot like this. image

It seems that Travis already posted the first row of this plot. As Travis mentioned, the Portmanteau Test rejected the null hypothesis (Chi-squared = 529.42, df = 176, p-value < 2.2e-16). From looking at the plot above, it appears that the ACF for the unemployment rate and the CCF between the unemployment rate and the three predictors do not indicate much evidence of dependency in the residuals. However, the ACFs for Construction Spend and Retail Sales indicate a great deal of dependence left in the residuals which might the main cause of the significance of the Portmanteau Test. Future work might resolve these issues to see whether a better forecasting could be achieved. Nevertheless, it might be a serious issue in the current since the focus is to predict unemployment rate instead of Construction Spend and Retail Sales. (A paragraph similar to this might be put into the last section as a discussion of the limitation the current work.)

bopangpsy commented 8 years ago

Just a few comments to current version of write up.

bopangpsy commented 8 years ago

In the presentation of the VAR model. We may not need to keep so many decimals for coefficients. Do you want me to change it to be shorter like three or four decimals?

bopangpsy commented 8 years ago

I was looking at this model. Just check it by the way. @sheltonmath The coefficients look right to me.

JestonBlu commented 8 years ago

If we are going to dump the model output to a latex table then yes I would cap it at 4... same for the written equation because some of the coefficients are rather small

bopangpsy commented 8 years ago

4 looks good to me. Just want it looks nicer.

On Mon, Jul 25, 2016 at 5:34 PM, Joseph Blubaugh notifications@github.com wrote:

If we are going to dump the model output to a latex table then yes I would cap it at 4... same for the written equation because some of the coefficients are rather small

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235107065, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL-eq4NCjoU5IfU9_77tivXJlI6Ys09ks5qZTnxgaJpZM4Izj8R .

JestonBlu commented 8 years ago

I remember the professor commenting on one of the old papers he showed where he pointed out that we should not plot and state the obvious... im thinking for the plots that show how we get a stationary series for unemployment, that we should only show up to the 2nd difference since thats where we determined as a group that we had a stationary series.. it feels a little redundant to show the 3rd difference or print the adf.test for the 3rd difference... i do think we should maybe show the adf test in that same table for no difference so you can see the starting point

If you want to put either of them in there here is the output... k = 0 is the standard adf test apparently

> adf.test(econ.sa$unem_rate_sa, k = 0)

    Augmented Dickey-Fuller Test

data:  econ.sa$unem_rate_sa
Dickey-Fuller = -1.2646, Lag order = 0, p-value = 0.8859
alternative hypothesis: stationary

> adf.test(econ.sa$unem_rate_sa, k = 6)

    Augmented Dickey-Fuller Test

data:  econ.sa$unem_rate_sa
Dickey-Fuller = -2.1377, Lag order = 6, p-value = 0.518
alternative hypothesis: stationary
sheltonmath commented 8 years ago

@JestonBlu sounds good.

I am taking my son to swim lessons and then dinner so I will be gone for a few hours.

I am on the West Coast, so it is earlier out here for me. I will double check the discussions here before I make any more changes tonight.

Per the presentation. I put a lot of things in there, we may not need them all. I just figured it is easier to cut back then add more. Please feel free to either make changes or make comments on necessary changes.

@SZRoberson what would be most helpful for you?

SZRoberson commented 8 years ago

I think we can do without the page with the code on it, but I may be wrong. I want to focus on plots, estimates, forecasts, and model comparisons.

On Jul 25, 2016 5:59 PM, "Alison" notifications@github.com wrote:

@JestonBlu https://github.com/JestonBlu sounds good.

I am taking my son to swim lessons and then dinner so I will be gone for a few hours.

I am on the West Coast, so it is earlier out here for me. I will double check the discussions here before I make any more changes tonight.

Per the presentation. I put a lot of things in there, we may not need them all. I just figured it is easier to cut back then add more. Please feel free to either make changes or make comments on necessary changes.

@SZRoberson https://github.com/SZRoberson what would be most helpful for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235112209, or mute the thread https://github.com/notifications/unsubscribe-auth/AS8he5ShXwtfuFbiKj_Gvd4VYf32WRL5ks5qZT_ugaJpZM4Izj8R .

JestonBlu commented 8 years ago

Okay, i have gone through all of the plots that were in the current draft and cleaned up them to get them ready for the final writeup. They are all in Plots/Preso_Plots. The code is in RScripts/Preso_Plots.r

trlilley12 commented 8 years ago

@sheltonmath I did see any interpretations in the slides.

Also, I think the book tends to put standard deviations in parentheses right after the coefficients.

For example, from the book

image

trlilley12 commented 8 years ago

I think we should put a lot of our code in the appendix.

SZRoberson commented 8 years ago

I second that. That way we can provide details about how these models were created.

On Jul 25, 2016 6:54 PM, "trlilley12" notifications@github.com wrote:

I think we should put a lot of our code in the appendix.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235121917, or mute the thread https://github.com/notifications/unsubscribe-auth/AS8he3MQdtNjYZazjM0AMNReRXqZZX3Oks5qZUy0gaJpZM4Izj8R .

trlilley12 commented 8 years ago

@bopangpsy I only put the first row of the CCF plots because we are only using the first of the VAR models.

VAR output four models. We are only using the first one. We don't really care about the other three, so I don't think those three rows are necessary. Anyone else have thoughts?

JestonBlu commented 8 years ago

I would put very little or none at all. We can clean up the git repository and put a link to the project in the appendix and make an outline on the readme doc. You don't really see much code in journal articles unless it introducing software or new techniques.

On Jul 25, 2016 6:55 PM, "Sean Roberson" notifications@github.com wrote:

I second that. That way we can provide details about how these models were created.

On Jul 25, 2016 6:54 PM, "trlilley12" notifications@github.com wrote:

I think we should put a lot of our code in the appendix.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235121917 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AS8he3MQdtNjYZazjM0AMNReRXqZZX3Oks5qZUy0gaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235122066, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL2hXSm2mDVJkDn79uRb_nViWx4dD64ks5qZUzogaJpZM4Izj8R .

trlilley12 commented 8 years ago

You don't see it in journal articles, but this isn't really a journal article. I think the more work we show that we did, the better. And we should put a link to the project as well.

JestonBlu commented 8 years ago

I thought the syllabus said we are supposed to model our paper in the style of a journal. Could be wrong.

On Jul 25, 2016 7:02 PM, "trlilley12" notifications@github.com wrote:

You don't see it in journal articles, but this isn't really a journal article. I think the more work we show that we did, the better. And we should put a link to the project as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235123347, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL2hZXJDp_QHRMSZNv2w_tawQakGxGyks5qZU6sgaJpZM4Izj8R .

trlilley12 commented 8 years ago

What does everyone else want to do?

pakarshan commented 8 years ago

Hey guys,

I was busy with a couple of interviews. I guess the code doesnt have to go with the report. We could provide a github link for the code.

-AP

On Jul 25, 2016 19:21, "trlilley12" notifications@github.com wrote:

What does everyone else want to do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235126306, or mute the thread https://github.com/notifications/unsubscribe-auth/AS9ZZ_6NwINEEhKDwtQ2jiepbUy7if58ks5qZVLtgaJpZM4Izj8R .

bopangpsy commented 8 years ago

I would put the code (the key parts) in the appendix. Although the main text should be like a journal article as much as possible, putting the code in the appendix would be good for a class project which shows we have done a lot. If we put a github link there, I think our reader, probably the professor only, would not look at it. Having a longer appendix doesn't hurt anything to the main text. Just my thought.

On Mon, Jul 25, 2016 at 7:27 PM, pakarshan notifications@github.com wrote:

Hey guys,

I was busy with a couple of interviews. I guess the code doesnt have to go with the report. We could provide a github link for the code.

-AP

On Jul 25, 2016 19:21, "trlilley12" notifications@github.com wrote:

What does everyone else want to do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235126306 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AS9ZZ_6NwINEEhKDwtQ2jiepbUy7if58ks5qZVLtgaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235127313, or mute the thread https://github.com/notifications/unsubscribe-auth/AKL-etov1fNUB2WUMxJHB-hBXUL9Neaoks5qZVRygaJpZM4Izj8R .

SZRoberson commented 8 years ago

Here's what I want to talk about:

•Reintroduce the data and our objective •Our previous models - what worked, what didn't •The new models - why VAR worked •Forecasts - are they realistic? •Champion model - which is best for us •Refinements and improvements - election indicator, political indicators, ...

I'm aiming for about 15 minutes of material. Suggestions are appreciated.

On Jul 25, 2016 9:19 PM, "bopangpsy" notifications@github.com wrote:

I would put the code (the key parts) in the appendix. Although the main text should be like a journal article as much as possible, putting the code in the appendix would be good for a class project which shows we have done a lot. If we put a github link there, I think our reader, probably the professor only, would not look at it. Having a longer appendix doesn't hurt anything to the main text. Just my thought.

On Mon, Jul 25, 2016 at 7:27 PM, pakarshan notifications@github.com wrote:

Hey guys,

I was busy with a couple of interviews. I guess the code doesnt have to go with the report. We could provide a github link for the code.

-AP

On Jul 25, 2016 19:21, "trlilley12" notifications@github.com wrote:

What does everyone else want to do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235126306

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AS9ZZ_6NwINEEhKDwtQ2jiepbUy7if58ks5qZVLtgaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235127313 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AKL-etov1fNUB2WUMxJHB-hBXUL9Neaoks5qZVRygaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235143862, or mute the thread https://github.com/notifications/unsubscribe-auth/AS8he2mzXKb6PQQDJBOXM0rWehv4OWcXks5qZW6dgaJpZM4Izj8R .

sheltonmath commented 8 years ago

That sounds very good.

On Mon, Jul 25, 2016 at 7:31 PM, Sean Roberson notifications@github.com wrote:

Here's what I want to talk about:

•Reintroduce the data and our objective •Our previous models - what worked, what didn't •The new models - why VAR worked •Forecasts - are they realistic? •Champion model - which is best for us •Refinements and improvements - election indicator, political indicators, ...

I'm aiming for about 15 minutes of material. Suggestions are appreciated.

On Jul 25, 2016 9:19 PM, "bopangpsy" notifications@github.com wrote:

I would put the code (the key parts) in the appendix. Although the main text should be like a journal article as much as possible, putting the code in the appendix would be good for a class project which shows we have done a lot. If we put a github link there, I think our reader, probably the professor only, would not look at it. Having a longer appendix doesn't hurt anything to the main text. Just my thought.

On Mon, Jul 25, 2016 at 7:27 PM, pakarshan notifications@github.com wrote:

Hey guys,

I was busy with a couple of interviews. I guess the code doesnt have to go with the report. We could provide a github link for the code.

-AP

On Jul 25, 2016 19:21, "trlilley12" notifications@github.com wrote:

What does everyone else want to do?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235126306

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AS9ZZ_6NwINEEhKDwtQ2jiepbUy7if58ks5qZVLtgaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235127313

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AKL-etov1fNUB2WUMxJHB-hBXUL9Neaoks5qZVRygaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/JestonBlu/STAT626_PROJECT/issues/3#issuecomment-235143862 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AS8he2mzXKb6PQQDJBOXM0rWehv4OWcXks5qZW6dgaJpZM4Izj8R

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JestonBlu_STAT626-5FPROJECT_issues_3-23issuecomment-2D235145616&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=dBombbLWrTfMsnz-PMDDwPElw1Pkbz0FWwrCqmhbgJA&m=GmYULH27108pM_2baQeiJXV41cZQcNhxcTDitAIGXCk&s=FG2vo3_XOtpamlaJG_Xmuz-3gmxENNP2CuZTjF2fPKE&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOQK08ixYY8TS0SzoLjuXn7KpTr7VBxcks5qZXGPgaJpZM4Izj8R&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=dBombbLWrTfMsnz-PMDDwPElw1Pkbz0FWwrCqmhbgJA&m=GmYULH27108pM_2baQeiJXV41cZQcNhxcTDitAIGXCk&s=wcaJ5cvNYOe-w1HN-7qL-14u683eL2LeK26SBp7Nf4s&e= .

trlilley12 commented 8 years ago

I agree with @bopangpsy about the code.

@SZRoberson that sounds like a good outline. I think you covered everything.

sheltonmath commented 8 years ago

Does anyone know if the appendix counts against our page number maximum?

trlilley12 commented 8 years ago

I didn't know there was a page max.

bopangpsy commented 8 years ago

@SZRoberson The outline looks very clear. I checked the syllabus, and it doesn't mention about a page max.

sheltonmath commented 8 years ago

I thought it was about 11 pages, per the professor's email. I'll look it up.

sheltonmath commented 8 years ago

Projects: Written reports of Round II are posted, there is a 5-page limit. For Round III, the page limit is ten.