Presentation is loading. Please wait.

Presentation is loading. Please wait.

November 24, 2011 - Transformations MGTSC 312: Lab 9.

Similar presentations


Presentation on theme: "November 24, 2011 - Transformations MGTSC 312: Lab 9."— Presentation transcript:

1 November 24, 2011 - Transformations MGTSC 312: Lab 9

2 Announcements Hw 7 is due this Friday at 11:59 p.m. DO NOT SUBMIT LATE! Hw 8 is due on December 6 at 11:59 p.m. DO NOT SUBMIT LATE! Lab Exam 3 is next Thursday December 1 -For coverage please see the Exam 3 materials link under “Exams and Quizzes” 2MGTSC 312: Lab 9 - Loglinear Model

3 Agenda Evaluation Survey Today’s lab relates to Topic 10 ‒GDP data ‒Linear Model ‒Loglinear Model Memo Formatting 3MGTSC 312: Lab 9 - Loglinear Model

4 Look at the Data Canadian Gross Domestic Product (GDP) ‒Quarterly from 1961Q1 to 1989Q4 Use the graph wizard to create a scattergraph Does the graph look like a straight line? Is there any repeating pattern? Add a linear trendline and an exponential trendline ‒The exponential looks like a much better fit ‒The exponential corresponds to regressing the natural logarithm of GDP on Time, which is what we’re about to do 4MGTSC 312: Lab 9 - Loglinear Model

5 Transform the Data Let’s create a new dependent variable for a regression, the natural log of GDP Use Excel’s =LN() function Create a line graph for LnGDP vs. year/quarter Does it look like a straight line? Change the y-axis scale to use all of the available space! We also need to change the time to just numbers, starting at 1 and counting by 1 to 116 (which is just Obs #) 5MGTSC 312: Lab 9 - Loglinear Model

6 Regress GDP and lnGDP on Time Insert a new ‘Regress’ worksheet for the output Regress lnGDP the same way and put the output beside the first ‒R 2 and F test are even larger, but the scale is different so R 2 is not comparable 6MGTSC 312: Lab 9 - Loglinear Model

7 Find the Growth Factor and Rate The quarterly growth factor is EXP(b 1 ) = 1.0268 The annual growth factor is the quarterly growth factor to the power of 4 = 1.1116 The quarterly growth rate as a percent ‒100*(quarterly growth factor - 1) = 2.68% The annual growth rate as a percent ‒100*(annual growth factor - 1) = 11.16% On average GDP increased by about 11.16% per year from 1961 through 1989 – looks pretty large compared to the last year! 7MGTSC 312: Lab 9 - Loglinear Model

8 Predicted GDP from Loglinear Copy the Predicted lnGDP from the loglinear regression and paste to another sheet Calculate the predicted GDP as =EXP(predicted lnGDP) Beside that column, copy and paste the predicted GDP from the linear model (Note the negative values!) Beside that column, copy and paste the actual GDP 8MGTSC 312: Lab 9 - Loglinear Model

9 Predicted GDP and Actual 9MGTSC 312: Lab 9 - Loglinear Model

10 Plot Both Predicted versus Actual Loglinear is a much better fit for the data 10MGTSC 312: Lab 9 - Loglinear Model

11 Does Quarter Add Anything? If there’s time, let’s see whether the quarter of the year makes a difference Add Quarter with =VALUE(RIGHT(B2,1)) Add quarter dummies with =IF() as we’ve done previously Regress lnGDP on Time and three quarter dummies ‒Two of the quarter dummies have p-values < 0.01 Perform a Partial F test ‒p-value = 1.1E-7 ‒The quarter dummies improve the fit, so use all 3 11MGTSC 312: Lab 9 - Loglinear Model

12 Does Quarter Add Anything? 12MGTSC 312: Lab 9 - Loglinear Model ReduceddfSS Regression191.013 Regression StatisticsTime & Quarter Multiple R0.997 R Square0.994 Adjusted R Square0.994 Standard Error0.071 Observations116 ANOVA dfSSMSF Regression491.22222.8054501.506 Residual1110.5620.005 Total11591.784 CoeffStd Errort StatP-value Intercept9.1030.018512.8123.8E-189 Time0.0260.000133.8161.6E-124 Q1-0.0570.019-3.0440.002913 Q2-0.0210.019-1.0990.274192 Q30.0600.0193.2230.001668 Partial F SSR-SSR0.2092 dfR - dfR3 Fnum0.0697 Fden0.0051 Ftest13.7659 dfDen111 p-value1.072E-07

13 Memo Formatting

14 The first part of the file tells you how to format the HW 8 file, but doesn’t follow its own instructions Let’s make the file follow the rules There are often several ways to accomplish the same task in Word; use your favourite If the rulers are not visible go to View > Show/Hide > Ruler and drag the margin markers ‒Or go to Page Layout > Margins Home > Select > Select All ‒Font Times New Roman 11 pt ‒Paragraph > Spacing: Single, Before (or After) 6 pts, or 3 pts before and 3 pts after. Ensure the “Don’t Add Space…” box remains unchecked Grammar and Spell checking ‒Office button > Word Options > Proofing Office button > Save As > Word ‘97 – 2003 document 14MGTSC 312: Lab 9 – Loglinear Model


Download ppt "November 24, 2011 - Transformations MGTSC 312: Lab 9."

Similar presentations


Ads by Google