· ** Linear Regression (three independent variables) **: The following demand function has three regressors

*Qt = a + bPt + cMt + dQt-1*

where: *Q* is the Quantity (dependent variable)

*P* is the Price

*M* is the Income

*t* is the time period

· Input or copy the data on an EXCEL sheet, clearly specifying the **dependent Y **variable to be the quantity (

· To enter values for the lagged *Qt-1*, you may **copy **the whole data under *Qt* and **paste **it in a new column added to the given sheet under the lagged *Qt-1*. Pasting should start such that the first observation under *Qt* will be the first observation under the lagged *Qt-1* starting with the second row.

· Click on Excel icon on top left, Excel Options at the bottom of pop up menu, Add-ins in the left hand column, then Analysis Toolpak, then hit ok.

·

· if it does not come up, then hit go and make sure that Analysis Toolpak is checked.

·

· then under Data, Data analysis, Regression, ok.

·

· **If you have Analysis Toopak in your computer, then the road to regression is shorter. Click on Excel icon, Data, Data Analysis in the up far right then Regression.**

· Go to **TOOLS** menu and click **DATA ANALYSIS**. Pick up **REGRESSION **from the ANALYSIS TOOLS presented in the pop up menu and click **OK.**

· First highlight the **dependent variable **(*Qt*) **cell range** from the spreadsheet starting from the second row (skip the row with the empty cell), and click **OK** on the REGRESSION pop up menu to insert the selected data range in the Input *Y* range box. Similarly select the relevant data **range for all the independent variables**

· Click on “LABEL” to include the symbols or names of variables in the regression output.

· In the **OUTPUT OPTIONS**, click **New Worksheet** Ply and say **OK**. The Regression output will be available to you on a newly created worksheet.

How to add **DATA ANALYSIS** to your **TOOLS **menu?

· If the **TOOLS **menu in your computer does not have **DATA ANALYSIS**, you can add it by doing the following.

· Open **TOOLS**

· Click on **ADD-INS**

· Include **ANALYSIS TOOLPACK** from the pop up menu dialog box and click **OK**.

· Go back to TOOLS and you will find DATA ANALYSIS at the bottom of the menu.

__The Questions required for the homework assignment are listed__

__Below: Homework assignment: Questions__

__QUESTION 1:__

Copy the database below into an excel sheet.

**Run QX on the four regressors: PX, M, PY and lagged Qx.**

**Write down the estimated linear demand equation with t-statistics under the estimated coefficients as done above. In addition, write down the R-square and explain what it means. Explain the statistical significance of the t-statistics for each regressor. Significance of T-statistics is usually given by the P-values in the regression output. We will not use it in here because we have a small sample which will bias the P-values. There are three levels of significance: 1%, 5% and 10% represented by ***, ** and *, respectively. Do not use the computed P-values of this small sample regression. Instead, use the following conventional t-statistics significance ranges used for large data:1.63 <t < 1.96 (10%); 1.96 < t < 2.54 (5%); and t > 2.54 (1%). This means in your regression output, look at the t-statistics column for each regressor. Then place the value of that computed t-statistic in one of the above ranges. The P-values given in the regression output are sensitive to sample size and are not accurate.**

__QUESTION 2__

**Check the signs of the estimated coefficients. Do the signs follow the theory as expected? Examine the sign for each regressor and point out what they mean.**

__QUESTION 3:__

**Calculate the short-run and long-run price and income elasticities of demand for good X using the averages for the quantity, price and income? Based on the income elasticity, what type is good X?**

*Short Run P elasticity for a linear Eq. = [slope of price]*(Average Price/Average quantity)*

Long Run P elasticity for a linear Eq. = (SR P elasticity) /(1- slope of lagged Q)

or = [slope of price / (1- slope of the lagged variable)]*(Average Price/Average quantity).

They are the same.

Average = sum/n, skipping first row.

The short-run and long run __income__ elasticities are calculated the same way. Here the slope is for income and the average for income (see page 31 or the solved regression on pp 32-33). What type of good is *X *with respect to income elasticities?

*Short Run Income elasticity for a linear Eq. = [slope of Income]*(Average Income/Average quantity)*

*Long Run Income elasticity for a linear Eq*. = (*SR Income elasticity)*/(1- slope of lagged Q)

__QUESTION 4:__

**Calculate the short-run and long-run cross price elasticities with respect to Py (see p. 28 and p. 30 in the notes). What type of goods are X and Y with respect to these elasticities?**

__QUESTION 5__

**Can you think of another independent variable that you may add to the above equation? What will the sign of this variable be? Specify the name of this variable. Do not include Weather in this equation**.

__QUESTION 6__

Is this a supply or demand equation? Why? Forget about signs. Look for other clues in the equation.

**SEE DATA BELOW:**

**Copy the data from Word to excel.**

**After transferring the data set from Word to excel, make sure you follow these steps;**

**Highlight all the cells in excel.**

**Right click on any cell in the data sheet in excel.**

**Click on FORMAT CELLS.**

**Under CATEGORY, click on NUMBER.**

**Then click OK.**

**Spring 2010: Regression Assignment Data Shee**t (linear case only))

When you copy in Excel 2007: COPY, PASTE SPECIAL then TEXT.

Year |
Qx |
Px |
M |
Py |
Lagged QX |

1984 | 9 | 29 | 14 | 11 | |

1985 | 10 | 28 | 15 | 12 | 9 |

1986 | 12 | 25 | 18 | 14 | 10 |

1987 | 14 | 23 | 20 | 15 | 12 |

1988 | 16 | 20 | 23 | 17 | 14 |

1989 | 17 | 19 | 26 | 19.5 | 16 |

1990 | 18 | 17 | 29 | 21 | 17 |

1991 | 21 | 16 | 34 | 22 | 18 |

1992 | 26 | 14 | 37 | 23 | 21 |

1993 | 28 | 12.5 | 35 | 23.5 | 26 |

1994 | 29 | 12 | 38 | 25 | 28 |

1995 | 30 | 10 | 41 | 23 | 29 |

1996 | 33 | 14 | 44 | 20 | 30 |

1997 | 35 | 15 | 47 | 19 | 33 |

1998 | 38 | 18 | 51 | 20 | 35 |

1999 | 39 | 19 | 55 | 21 | 38 |

2000 | 40 | 21 | 58 | 22 | 39 |

2001 | 42 | 18 | 61 | 23 | 40 |

2002 | 45 | 18 | 63 | 25 | 42 |

2003 | 46 | 17 | 65 | 26 | 45 |

2004 | 50 | 15 | 66 | 21 | 46 |

2005 | 55 | 14 | 68 | 25 | 50 |

2006 | 57 | 12 | 70 | 27 | 55 |

2007 | 58 | 10 | 73 | 28 | 57 |

2008 | 61 | 9 | 74 | 28.5 | 58 |

2009 | 65 | 8.5 | 79 | 30 | 61 |

2010 | 66 | 7 | 80 | 31 | 65 |