Tutorial Single Equation Regression Model

Embed Size (px)

Citation preview

  • 7/27/2019 Tutorial Single Equation Regression Model

    1/32

    Tutorial 1

    Econometrics

    Two-Variable

    Regression Analysis

    MEP-DD Muhammad Edhie Purnawan, MA, Ph.D

    Prepared by Rafiazka Millanida H.

    [email protected]

  • 7/27/2019 Tutorial Single Equation Regression Model

    2/32

  • 7/27/2019 Tutorial Single Equation Regression Model

    3/32

    Reviewing Methodology of Econometrics

    Classical econometric methodology proceeds along thefollowing lines:

    1. Statement of theory or hypothesis.

    2. Specification of the mathematical model of the theory

    3. Specification of the statistical, or econometric, model

    4. Obtaining the data

    5. Estimation of the parameters of the econometric model

    6. Hypothesis testing

    7. Forecasting or prediction

    8. Using the model for control or policy purposes.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    4/32

    Differing Economic Data

    Cross sectionaldata

    Consists of a

    sample ofvariety of unitstaken at a givenpoint in time

    Ex: census of

    populatioconducted bythe CensusBureau every 10

    years

    Time series data

    Consists of

    observations ona variable orseveralvariables overtime.

    Ex: stock prices

    Panel Data

    Data are

    elements ofboth time seriesand cross-section data.

    Ex: Consumer

    Price Index (CPI)for severalcountries for19731997

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    5/32

    Interpreting Regression

    Regression analysis is concerned with the study

    of the dependence of one variable, the

    dependent variable, on one or more other

    variables, the explanatory variables, with aview to estimating and/or predicting the

    (population) mean or average value of the

    former in terms of the known or fixed (inrepeated sampling) values of the latter.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    6/32

    Contd

    Case:

    The rate of change of money wages in relation to theunemployment rate. The historical data is an exampleof the celebrated Phillips curve relating changes in the

    money wages to the unemployment rate.

    Why scattergram?- It may enable the labor economist to

    predict the average change in money

    wages given a certain unemploymentrate.

    - It may be helpful in stating something

    about the inflationary

    process in an economy, for increases in

    money wages are likely to be

    reflected in increased prices.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    7/32

    Determining Regression Statistical Versus Deterministic Relationships

    - statistical not functional or deterministic

    - random or stochastic (have probability distribution)

    - eg: The dependence of crop yield on temperature,rainfall, sunshine, and fertilizer, for example, isstatistical in nature in the sense that the explanatoryvariables, although certainly important, will not enablethe agronomist to predict crop yield exactly because of

    errors involved in measuring these variables as well asa host of other factors (variables) that collectivelyaffect the yield but may be difficult to identifyindividually.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    8/32

    Contd Regression Versus Causation

    -A statistical relationship can never establish causalconnection (Kendall and Stuart).

    - To ascribe causality, one must appeal to a priori or

    theoretical considerations.- eg: There is no statistical reason to assume thatrainfall does not depend on crop yield. The fact that wetreat crop yield as dependent on rainfall (among other

    things) is due to non-statistical considerations:Common sense suggests that the relationship cannotbe reversed, for we cannot control rainfall by varyingcrop yield.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    9/32

    Contd

    Regression Versus Correlation

    Correlation analysis aims to measure the strength

    or degree of linear association between two

    variables.

    Regression analysis try to estimate or predict the

    average value of one variable on the basis of the

    fixed values of other variables.

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    10/32

    Selecting Methods of Estimation The three generally used methods of estimation:

    1. ordinary least squares (OLS)

    2. maximum likelihood (ML)

    3. method of moment (MM)

    By and large, it is the method of OLS that is usedextensively in regression analysis primarily

    because it is intuitively appealing andmathematically much simpler than the ML andMM

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    11/32

    EVIEWS Window

    Main Menu

    Command Window

    Work Area

    Status Line

    Title Bar

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    12/32

    Workfile1. Creating Workfile

    File NewWorkfile

    Workfile Structure Type:

    - Unstructured/Undated- Dated/Regular Frequency

    Annual : 1991 2011Semi-annual : 1995:01 1995:02Quarterly : 1997:03 2007:04Monthly : 2003:05 2011:12Daily : 2005:31 2011:250

    - Balanced Panel

    2. Saving WorkfileFile Save As ....

    3. Opening WorkfileFile Open Workfile

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    13/32

    Data

    1. Entering Data:Manual

    a. By Command- Make series/variable

    series series_nameshow series_name

    edit +/-- Enter DataType or paste data from microsoftexcel

    b. By option- Make series/variable

    ObjectNew ObjectType ofObject: Series Name for Object:series_name

    orQuickEmpty Group Series

    - Enter dataDouble click to the series/variableedit +/-Type or paste data from microsoftexcel

    2. Entering Data:Import Option

    a. From Microsoft Excel

    File ImportReadFile Type:

    ExcelFile Name: file_nameNote: Variables in Excel start at B2.

    Excel must be closed before

    importing process.

    b. From Text

    File ImportReadFile Type:

    Text-ASCII File Name: file_name

    Overview Introduction to EVIEWS

    Application Exercise

  • 7/27/2019 Tutorial Single Equation Regression Model

    14/32

    Contd

    3. Opening Data Group

    a. By Command

    show series1_name series2_name

    b. By optionblock series right clickopenas group

    or

    quickshowobjects:

    series1_name series2_name

    4. Plotting Data

    a. By Commandsingle graph:plot series1_nameseries2_name

    multiple graphs:plot(m)series1_name series2_nameb. By optionsingle graph: block series

    right clickopen as groupview graphmultiple

    series: single graphmultiple graphs: block series right clickopen as groupview graphmultipleseries: multiple graph

    Overview Introduction to EVIEWS

    Application Exercise

    O i I d i EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    15/32

    Descriptive Statistics

    1. Statistical Value

    a. By Command

    stats series1_name series2_name

    b. By optionblock series right clickopenas group

    viewdescriptive stats individual sample

    2. Correlation Matrix

    a. By Command

    cor series1_name series2_name

    b. By optionblock series right clickopen

    as group

    viewcovariance analysis

    statistics: correlation

    Overview Introduction to EVIEWS

    Application Exercise

    O i I t d ti t EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    16/32

    Equationquick estimates equation specification: series1_name c

    series 2_name

    Overview Introduction to EVIEWS

    Application Exercise

    block series1_name c series 2_name right clickopen asequation proc series1_name c series 2_name

    ls series1_name c series 2_nameObject name name: eq01

    equation eq01.ls series1_name c series 2_name

    or

    or

    or

    O i I t d ti t EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    17/32

    Step of Regression

    1.Hypothesis Testing

    If null hypothesis isnt rejected hence independent

    variable isnt significant to dependent variable

    2.Interpreting Regression Coefficient3.R (R-squared)

    4.Residual, Fitted, and Actual Value

    5.Test for normality of Residual

    Overview Introduction to EVIEWS

    Application Exercise

    O i I t d ti t EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    18/32

    1. Open EVIEWSProgram

    2. Open NewWorkfile

    3. Quick EmptyGroup (editseries), copy the

    data from excel.

    Running EVIEWS

    Overview Introduction to EVIEWS

    Application Exercise

    Exchange Rate

    Gujarati (2003), p.33

    O i I t d ti t EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    19/32

    equation eq1.ls france c germany

    Compare to value of t-stat table2

    Overview Introduction to EVIEWS

    Application Exercise

    Compare to given =5%

    O er ie Introd ction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    20/32

    Overview Introduction to EVIEWS

    Application Exercise

    Hypothesis Testing

    The model:France = o + 1_Germany + u

    Ho: 1 = 0

    Ha: 1 0

    1

    Prob. < 0.05: Ho (Null Hypothesis) is notrejected independent variable is

    significant to dependent variable.

    Prob. > 0.05: Ho (Null Hypothesis) isrejected independent variable is notsignificant to dependent variable.

    Prob.

    0.0001 < 0.05Ho (Null Hypothesis) is not

    rejected.

    Independent variable is

    significant to dependent

    variable.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    21/32

    Overview Introduction to EVIEWS

    Application Exercise

    t-stat

    4,997 > 2.845 or 2.086 or

    1.725

    4,997 > 2

    Ho (Null Hypothesis) is not

    rejected.

    Independent variable is

    significant to dependentvariable.

    t-stat > t-table: Ho (Null Hypothesis) is notrejectedindependent variable is

    significant to dependent variable.

    t-stat < t-table: Ho (Null Hypothesis) isrejectedindependent variable is notsignificant to dependent variable.

    t-table

    n = 22k = 2df = n-k = 20

    = 10% t-table = 1.725= 5% t-table = 2.086

    = 1% t-table = 2.845 Note:Since Eviews applies level of significanceis 5% or = 5%, the rule of thumbregarding to t-stats will be for anyregressions with more than n>20 and 0.05level of significant, the critical value is 2.

    t-stats > 2: Ho (Null Hypothesis) is

    rejected. Independent variable is significant

    to dependent variable.

    t-stat < 2: Ho (Null Hypothesis) is not

    rejected independent variable is not

    significant to the dependent variable.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    22/32

    t-table

    Degree of freedom:

    n-k

    One tail

    Two tail

    n = number of data

    k = number of parameter

    Or number of variable

    Overview Introduction to EVIEWS

    Application Exercise

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    23/32

    Overview Introduction to EVIEWS

    Application Exercise

    Interpreting Regression Coefficient

    France = 1.618887+ 2.185832Germany

    2

    If exchange rate of Germany increases by an

    average of 1 USD, exchange rate of france

    will increase by average of 1.618887 USD,

    ceteris paribus.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    24/32

    Overview Introduction to EVIEWS

    Application Exercise

    R (R-squared) 3

    The variance of independent variable (exchange

    rate of Germany) can explain 55.53% variance of

    the dependent variable (exchange rate of France).

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    25/32

    Overview Introduction to EVIEWS

    Application Exercise

    Residual, Fitted, and Actual Value 4

    -2.0

    -1.5

    -1.0

    -0.5

    0.0

    0.5

    1.0

    4

    5

    6

    7

    8

    9

    10

    78 80 82 84 86 88 90 92 94 96 98

    Residual Actual Fitted

    Viewactual, fitted, residual

    actual, fitted, residual graph

    Graph shows the goodness

    of fit of the model. Actual

    value is close to estimatedvalue or fitted value. The

    more closer the two are,

    residual is around zero.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    26/32

    Overview Introduction to EVIEWS

    Application Exercise

    Normality Test 5

    JB Test is designed to track departures

    from the normal distribution of the OLS

    residuals.

    viewresidual diagnostics

    histogram-normality test

    Ho: Disturbance terms are normallydistributed.

    Ha: Ho is not true.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    27/32

    Overview Introduction to EVIEWS

    Application Exercise

    Contd

    Prob. > 0.05: Ho (Null Hypothesis) is notrejected Disturbance terms are normallydistributed.

    Prob. < 0.05: Ho (Null Hypothesis) isrejected Disturbance terms are notnormally distributed.

    JB-stat < c2 table , the model is normallydistributed.

    JB-stat > c2 table , the model is notnormally distributed.

    JB-stat

    4.363461 < 10.8508 ( =

    5%; df=22-2=20)

    Ho (Null Hypothesis) is not

    rejected.

    Disturbance terms arenormally distributed.

    Prob

    0.112846 > 0.05 ( = 5%)

    Ho (Null Hypothesis) is notrejected.

    Disturbance terms are

    normally distributed.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    28/32

    c2 -tableDegree of freedom:

    n-k

    n = number of data

    k = number of parameter

    Or number of variable

    Overview Introduction to EVIEWS

    Application Exercise

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    29/32

    Overview Introduction to EVIEWS

    Application Exercise

    Regress data sales.xls using eviews

    as the previous.

    Overview Introduction to EVIEWS

  • 7/27/2019 Tutorial Single Equation Regression Model

    30/32

    Overview Introduction to EVIEWS

    Application Exercise

    Assignment 1

    Journal draft on two-variable regression

    analysis

    (Abstract, Introduction, Theoretical

    Framework, Data&Methodology, Model,

    Result, Conclusion, Bibliography)

    Due date: 3rd tutorial meeting

  • 7/27/2019 Tutorial Single Equation Regression Model

    31/32

    Further Readings

    Gujarati, D (2003). Basic Econometrics 4th

    edition. New York: Mc Graw-Hill.

    Kennedy, P (2003). A Guide to Econometrics

    5th edition. Oxford: Blackwell.

    Seddighi, Lawler, and Katos (2000).

    Econometrics: A Practical Approach. New York:

    Routledge.

  • 7/27/2019 Tutorial Single Equation Regression Model

    32/32

    For any inquiry regarding to the topics please

    text or email me.

    Thanks.