Docsity

Regression Analysis, Testing Hypothesis - Econometrics - Lecture Slides, Slides of Econometrics and Mathematical Economics

Partial preview of the text

Download Regression Analysis, Testing Hypothesis - Econometrics - Lecture Slides and more Slides Econometrics and Mathematical Economics in PDF only on Docsity!

Regression Analysis & Testing

Hypothesis

OBJECTIVES

The main objectives are: ™In depth analysis of line graph ™In depth analysis of scatter graph ™Working

with

labels,

legend

and

other

graphing options.

Regression Analysis

The regress command is used to run ‘Simple as well asMultiple regression’. regress depvar [indepvars] [if] [in] [weight] [, options] The mostly used options are given below:

noconstantvcerobusthc2hc3level(#)beta^

(gives standardized beta.)

Simple Linear Regression AnalysisLoad the data file named ‘auto.dta’.Lets run a Simple Regression of ‘price’ on ‘mpg’.Go to Statistics Menu

Æ^

Linear models and related

Æ

Linear regression.

Simple Linear Regression AnalysisThe regression result is shown: (Interpret the results).

Try other options in the dialogue as well.

Simple Linear Regression AnalysisTo^ get

the

‘ predicted/estimated’

values

,^ simply

use

the

‘predict command’.

predict newvar

Here ‘newvar’ is the name of new variable which storespredicted/estimate/Y-hat values.Suppose we want to save the ‘predicted values’ in variable‘estprice’.Then the command is:

predict estprice

10

Simple Linear Regression AnalysisTo get the plot of actual price vs the estimated price, simplydraw a line graph b/w these two.For this you have to specify a time variable ‘sno’. line price estprice sno

15,000 10,000 5,000 0 0

20

40

60

80

sno Price Fitted values

Docsity.com

11

Simple Linear Regression AnalysisTo store the residuals in a variable named “resids,” type:

predict resids, residuals This will generate a new variable with the name resids whichcontains residuals.Use the list command to list residuals.

13

Multiple Linear Regression AnalysisA dialogue box appear:Select

‘price’

as

the

Dependent variable.Select ‘mpg’ & ‘weight’ asthe independent variables.Click submit.

14

Multiple Linear Regression AnalysisThe regression result is shown: (Interpret the results).^ Find ‘predicted values and the residuals. Make a line plot ofactual vs the estimated values.

16

Testing Hypothesis

With the regression output in the Results window,We would like to test several hypotheses.To test whether a

weight

contributes as much as

foreign

to the

price,Type:

test weight = foreign

17

Testing Hypothesis

To test whether the variables “weight” and “foreign” are jointlysignificant in our model,Type:

test weight foreign

19

Testing Hypothesis

The result is given below:

20

Testing Hypothesis

Try the command.

ttest mpg = weight