Model Econometrics 计量经济学 Parameters of interest代写

  • 100%原创包过,高质代写&免费提供Turnitin报告--24小时客服QQ&微信:120591129
  •  Model Econometrics 计量经济学 Parameters of interest代写

    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    ECMT 1020: Introduction to Econometrics
    Lecture 8
    Instructor: Yi Sun
    Contact: yi.sun@sydney.edu.au
    School of Economics
    The University of Sydney
    Week 8
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Contact Information
    Ø Instructor W7-W13: Yi Sun
    o Email:yi.sun@sydney.edu.au
    o Office: Room 483, Merewether Building (H04)
    o Office Hours: Tuesday 15:30-17:30
    Friday 15:00-17:00 or by appointment
    • Some Rules:
    o You should contact me by email.
    o Use your USyd email - identify yourself with your name and SID
    o Any questions regarding the tutorial program including administrative matters
    regarding tutorial allocation should be directed to your tutor
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    In general, we are interested the following aspects of a model:
    Ø Model and parameters of interest
    o What is the model?
    o What are parameters we are interested in?
    Ø Estimation
    o If we have a data set, how do we estimate the parameters we want?
    Ø Properties of the estimator (depends on assumptions)
    o Are the estimated values of the parameters informative?
    Ø Inference (hypothesis testing, confidence interval and so on)
    o What can we say about the true value of the parameters?
    Ø Interpretation
    o What do our results mean in the specific problem we work on?
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Prediction
    o How to make predictions based on our model?
    Ø Evaluation and Comparison
    o Is this a good model that fits the data well?
    Ø Important special cases
    o Data Transformations
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    For Bivariate Regression
    Ø Model:
    ! = ! ! + ! ! ! + !
    Ø Parameters of interest:
    ! ! and ! !
    (Strictly speaking, for this to be a model, we also need “u is an error term”.)
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Estimation: Ordinary Least Squares (OLS)
    • Given the data: ! ! ,! ! ,! = 1,2,…,!, we look for values ! !  and  ! ! that
    minimizes:
      ! ! − ! ! − ! ! ! !
    !
    !
    !!!
    • The solutions are:
    ! ! = ! − ! ! !
    ! ! =
    (! ! − !)(! ! − !)
    !
    !!!
    (! ! − !) !
    !
    !!!
    = !
    !"
    ! !
    ! !
     
    • Based on the estimators, we define:
    o Fitted line, residual, TSS, ExpSS, RSS and so on.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Intuition of the regression line:
      
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Assumptions:
    • Population Assumptions:
    1- The population model is
    ! ! = ! ! + ! ! ! ! + ! ! for all i
    2- The error has zero mean conditional on the regressor
    ! ! ! ! ! = 0 for all i
    3- The error has constant variance conditional on regressor
    !"# ! ! ! ! = ! !
    ! for all i
    4- The errors for different observations are statistically independent
    ! ! is independent of ! ! for all ! ≠ !
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Extra assumptions we need on Data:
    There are some variations in the regressor (so that  (! !
    !
    !
    −!) !  ≠ 0). And we
    have at least 3 observations.
    Comments on assumptions
    • Assumptions on data are very mild. They just ensure that
    o ! ! can be computed from the data using our formula.
    • Population assumptions are restrictive, but can be relaxed
    o It’s an important topic in more advanced econometrics class. And it is
    fascinating!
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Intuition of the population assumptions:
    • Assumption 1 – The relationship is linear in parameters.
    • Assumption 2 – For any value of !, the error ! on average equals zero. This
    implies that error term is uncorrelated with the regressor.
    • Assumption 3 –Conditional on !, the variance of error term ! that does not vary
    with the value of ! – Homoskedastic errors.
    • Assumption 4 – The value taken by the error u for one observation is independent
    of the value of the error for other observations.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Assumptions 1 & 2 are the crucial assumptions that ensure that
    ! ! ! ! ! = ! ! + ! ! ! !
    • Assumptions 3& 4 are additional assumptions that are used in determining
    the precision and distribution of the estimates of ! ! !"#  ! ! .
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Properties:
    • ! ! !"#  ! ! are unbiased and consistent
    • We know how to compute !"(! ! ) and !"(! ! ) using our sample.
    o If Assumption 1-4 hold, we have formulas for them
    o In general, they are provided in the stata output.
    • (! ! −  ! ! )/!"(! ! ) has a distribution that we know how to approximate.
    This property make it possible to carry out inference on ! ! . Same for ! ! .
    • If Assumption 1-4 hold, OLS is BLUE. In additional, if the errors are normal,
    OLS is BUE.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Inference:
    What can we learn about ! ! and ! ! given the model and the data?
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Define
    ! = 
    ! ! −  ! !
    !" ! !
    • Under Assumptions 1-4
    o We approximate the distribution of T by a ! distributed with (! − 2) degrees
    of freedom.
    o This approximation is exact if errors are normal or ! → ∞.
    • We use this result for our statistical inference
    • Similar for ! !
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Interpretation
    • ! ! : intercept (predicted value of Y when X equals 0)
    • ! ! : slope, or marginal effect (predicted ∆! for a one unit increase in X)
    Ø Prediction
    • Conditional mean of ! at a given value of !:
    ! !" = ! ! + ! ! !
    • Point prediction of ! at a given value of !:
    ! ! = ! ! + ! ! !
    Values for these two predicted quantities at the same ! are the same, but standard
    error for these two predicted values are different.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Evaluation and Comparison
    o We can use ! ! to measure the fit of a model when an intercept is included in
    the model.
    o ! ! only captures linear association between the dependent variable and the
    regressor.
    o ! ! can be used to compare bivariate (an intercept and one regressor)
    regression models with same dependent variable.
    o Low ! ! does not mean the regression analysis is useless.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Ø Important special cases: Data Transformation
    o Indicator variable:
    § Interpretation: Difference in means across different groups in data.
    o Natural logarithms:
    § Interpretation: proportionate changes, elasticity and semi-elasticity.
    § Prediction: retransformation bias (if dependent variable is transformed).
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Multivariate Data
    • We have seen how to analyse univariate data and bivariate data
    • Now it is time to move on to working with more than two variables
    • Most of what we do in economics uses more than two variables, even if the
    question of interest is the relationship between X and Y
    • Why? Because we're never in a controlled environment, there are lots of things
    other than X and Y moving around, which may affect our analysis.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • For example, suppose we have the following true relation
    !"#$ℎ  !"#$  !"  !"#  !""#$%&'( = 1 + 4 ∗ !"##$ − 3 ∗ !"#$%&
    !"#$%& = 2 ∗ !"##$ + !"#$%&  !""#"
    • If we are interested in the relation between death rate in car accidents and speed,
    and we estimate their relation using a bivariate regression model, we will get:
    !"#$ℎ  !"#$  !"  !"#  !""#$%&'(
                    = 1 + 4 ∗ !"##$ − 3 ∗ 2 ∗ !"##$ + !"#$%&  !""#"
    = 1 − 2 ∗ !"##$ − 3 ∗ !"#$%&  !""#"
    • In this case, the coefficient on speed will be biased, and inconsistent.
    • Moreover, the coefficient even has the wrong sign! We will conclude that as
    speed goes up, death rate goes down. This is wrong!
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • How to avoid it? Include both speed and safety in our analysis!
    • In general, if a variable ! (safety) is correlated with both dependent variable
    (death rate) and regressor(s) (speed), then we should include it in our analysis.
    • If we omit a variable ! like this, OLS estimators will typically be biased and
    inconsistent.
    • This problem is called omitted variable bias.
    • It can happen in multiple regressions too.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    The general plan for studying multivariate data:
    • Data description
    • Model: Multivariate regression
    o Model and parameters of interest
    o Estimation
    o Assumptions and properties
    o Inference
    o Interpretation
    o Prediction
    o Evaluation and Comparison
    o Important Special Cases
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Graphing Multivariate Data
    • With three variables, you can do a three-way scatter-plot
    20
    15

     Model Econometrics 计量经济学 Parameters of interest代写
    educ
    10
    5
    0
    0
    10
    20
    exper
    30
    40
    50
    60
    25
    20
    10
    5
    0
    15
    wage
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • With additional variables, you have to start getting creative (3-D surface with
    color, animation to show a time dimension, etc.)
    • An alternative is to produce a scatterplot for every pairing of variables
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    wage
    educ
    exper
    0
    10
    20
    30
    0 10 20 30
    0
    10
    20
    0 10 20
    0
    20
    40
    60
    0 20 40 60
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Graphs aren't going to get us too far with multivariate data
    • Instead, the most common approach is to use a multivariate regression model
    • This approach assumes that we have one dependent variable of interest (y)
    • Now, we have several independent variables (x) and need some new notations
    • We now have k random variables:
    o Y : dependent variable, outcome, left-hand-side (LHS) variable
    o ! ! ,! ! …  ! ! : covariates, explanatory variables, independent variables, right-
    hand-side (RHS) variables, regressors
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Our model is now:
    ! = ! ! + ! ! ! ! + ! ! ! ! …+ ! ! ! ! + !
    • Parameters of interest: ! ! ,! ! ,…,! !
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Estimation: similar to the Bivariate Regression Model, we want to find a “line”
    that fit the data “best”.
    • In the multivariate case, a “line” is represented as:
    ! = ! ! + ! ! ! ! + ! ! ! ! + ⋯+ ! ! ! !
    • For individual i, we observe the realization of (! ! ,! ! ,…,! ! ), which is
    (! !! ,! !! ,…,! !" ).
    • And ! ! (the value of ! for individual i predicted by this line) is:
    ! ! = ! ! + ! ! ! !! + ! ! ! !! + ⋯+ ! !" ! !"
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • ! ! ,! ! ,…,! ! can take any values, so there are many lines.
    • Which line should we choose?  One that fits the data “best”.
    • What do we mean by “best” then?
    • The Ordinary Least Squares (OLS) estimator for ! ! ,! ! ,…,! ! is the values of
    ! ! ,! ! ,…,! ! that solves
    !"# ! ! ,! ! ,…,! !
    1
    !
    ! ! − ! !
    !
    !
    !!!
    or equivalently,
    !"# ! ! ,! ! ,…,! !
    !
    !
    ! ! − ! ! − ! ! ! !! − ⋯− ! ! ! !"
    ! !
    !!!
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • The main idea is the same as in the bivariate regression model.
    • The difference now is that we have more variables, and that the minimization is
    done by choosing the values of k different coefficients
    • To solve this, we would take the derivative with respect to each ! ! and set it equal
    to zero.
    • This would give us k different equations to solve for k different unknowns
    ∑ !!!
    !
    ! ! = 0
                        ∑ !!!
    !
    ! !" ! ! = 0,    ! = 2,…,!
    Intuition:
    o The residuals sum to 0.
    o Each regressor is orthogonal (uncorrelated) to the residual.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Under mild conditions on the data (we need sufficient variations in the data on all
    the !), this problem has a unique solution.
    • The solution gives us a way to calculate each ! ! as a function of our data
    • The coefficients aren't hard to derive if you know a little matrix algebra, but it’s
    hard to write it out without using matrix notation.
    • Interpretation for ! ! : the partial effect on the predicted value of y when ! !
    changes by one unit, holding ! ! ,…,! ! constant. This is also called the effect of ! !
    ceteris paribus.
    • In general, the value of ! ! is different from the slope in the bivariate regression of
    y on ! ! (and an intercept).
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • We'll just use STATA's regression option to calculate them.
    • The same STATA command for ! = ! ! + ! ! ! ! + ! ! ! ! + !
    reg y  x 2  x 3
    • The regression output will contain coefficients, standard errors, t-stats, p-values
    for all variables (Also ANOVA)
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Earnings Example :
    !"#$%$&' = ! ! + ! ! ! + ! ! !"#!$ + !
    S= years of Schooling ,
    EXP= years of labour market experience
    • Say we are primarily interested in the effect of S on earnings (! ! ):
    ð the model explicitly controls for the effect of experience
    ð we measure the effect of S on wages holding experience fixed
    ð still need to make assumptions about how u is related to the explanatory
    variables
    ð in the simple regression model, exper was in u so we needed to assume exper
    and S were independent, which is very unlikely
    • Note ! ! : measures the cet. par. effect of experience on earnings, which may also
    be of interest.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Earnings Example :
    !"#$%$&' = ! ! + ! ! ! + ! ! !"#!$ + !
    S= years of Schooling,
    EXP= years of labour market experience
    reg EARNINGS S EXP
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 2, 537) = 67.54
    Model | 22513.6473 2 11256.8237 Prob > F = 0.0000
    Residual | 89496.5838 537 166.660305 R-squared = 0.2010
    -------------+------------------------------ Adj R-squared = 0.1980
    Total | 112010.231 539 207.811189 Root MSE = 12.91
    ------------------------------------------------------------------------------
    EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | 2.678125 .2336497 11.46 0.000 2.219146 3.137105
    EXP | .5624326 .1285136 4.38 0.000 .3099816 .8148837
    _cons | -26.48501 4.27251 -6.20 0.000 -34.87789 -18.09213
    ------------------------------------------------------------------------------
    EXP S INGS N EAR 56 . 0 68 . 2 49 . 26
    ˆ
    + + + + − − = =
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    reg EARNINGS S EXP
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 2, 537) = 67.54
    Model | 22513.6473 2 11256.8237 Prob > F = 0.0000
    Residual | 89496.5838 537 166.660305 R-squared = 0.2010
    -------------+------------------------------ Adj R-squared = 0.1980
    Total | 112010.231 539 207.811189 Root MSE = 12.91
    ------------------------------------------------------------------------------
    EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | 2.678125 .2336497 11.46 0.000 2.219146 3.137105
    EXP | .5624326 .1285136 4.38 0.000 .3099816 .8148837
    _cons | -26.48501 4.27251 -6.20 0.000 -34.87789 -18.09213
    ------------------------------------------------------------------------------
    !"#!!"#$ =  −!".!" + !.!"! + !.!"!"#
    (4.27) (0.23) (0.13)
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    reg EARNINGS S EXP
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 2, 537) = 67.54
    Model | 22513.6473 2 11256.8237 Prob > F = 0.0000
    Residual | 89496.5838 537 166.660305 R-squared = 0.2010
    -------------+------------------------------ Adj R-squared = 0.1980
    Total | 112010.231 539 207.811189 Root MSE = 12.91
    ------------------------------------------------------------------------------
    EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | 2.678125 .2336497 11.46 0.000 2.219146 3.137105
    EXP | .5624326 .1285136 4.38 0.000 .3099816 .8148837
    _cons | -26.48501 4.27251 -6.20 0.000 -34.87789 -18.09213
    ------------------------------------------------------------------------------
    !"#!!"#$ =  −!".!" + !.!"! + !.!"!"#
    (4.27) (0.23) (0.13)
    èthe coefficient on S means that, holding experience fixed, an extra year of education
    is predicted to increase earnings by 2.68 $
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    reg EARNINGS S EXP
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 2, 537) = 67.54
    Model | 22513.6473 2 11256.8237 Prob > F = 0.0000
    Residual | 89496.5838 537 166.660305 R-squared = 0.2010
    -------------+------------------------------ Adj R-squared = 0.1980
    Total | 112010.231 539 207.811189 Root MSE = 12.91
    ------------------------------------------------------------------------------
    EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | 2.678125 .2336497 11.46 0.000 2.219146 3.137105
    EXP | .5624326 .1285136 4.38 0.000 .3099816 .8148837
    _cons | -26.48501 4.27251 -6.20 0.000 -34.87789 -18.09213
    ------------------------------------------------------------------------------
    èthe coefficient on S means that, holding experience fixed, an extra year of education
    is predicted to increase earnings by 2.68 $
    ð equivalently, if we have 2 people with the same experience, the coefficient on
    education reports the difference in their predicted earnings when their
    education differs by 1 year
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Let’s introduce more explanatory variables – also a slight change in the
    dependent variable.
     !"!(!"#$%!"#) = ! ! + ! ! ! + ! ! !"# + ! ! !"#$%" + !
    Where : S=years of Schooling ,EXP= years of labour market
    experience, TENURE= years with current employer
    . reg LogEARNINGS S EXP TENURE
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 3, 536) = 71.66
    Model | 53.4473557 3 17.8157852 Prob > F = 0.0000
    Residual | 133.260288 536 .248619939 R-squared = 0.2863
    -------------+------------------------------ Adj R-squared = 0.2823
    Total | 186.707643 539 .34639637 Root MSE = .49862
    ------------------------------------------------------------------------------
    LogEARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | .1215696 .0090472 13.44 0.000 .1037972 .1393419
    EXP | .0290606 .0053196 5.46 0.000 .0186108 .0395105
    TENURE | .0112728 .0035815 3.15 0.002 .0042374 .0183082
    _cons | .5594394 .1657859 3.37 0.001 .2337697 .8851092
    ------------------------------------------------------------------------------
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
     !"#(!"!"#!"#) = 0.559 + 0.122! + 0.029!"# + 0.011!"#$%"
    èthe coefficient on S means that, holding experience and tenure fixed, an extra year
    of education is predicted to increase log(earnings) by 0.122.
    èapproximately 12.2% increase in earnings
    ð Equivalently, if we have 2 people with the same experience and tenure, the
    coefficient on education reports the proportional difference in their predicted
    earnings when their education differs by 1 year.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Changing more than one independent variable simultaneously
    • Sometimes we are interested in the effect of changing more than one
    independent variable at the same time
    ð this is straightforward using fitted regression line
    ð for example, what is the estimated effect on earnings when an individual stays
    at the same firm for another year, and hence both experience and tenure
    increase by 1 year ?
    The aggregate effect is:
    ∆!!"(!"!"#!"#) =  0.029∆!"# + 0.011∆!"#$%"
    =  0.029 + 0.011 
    =  0.040 or approximately 4% in earnings
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Fitted Values and Residuals.
    • Once we have the OLS regression line, we can calculate the fitted or predicted
    value for each observation:
    ! ! = ! ! + ! ! ! !! + ! ! ! !! …+ ! ! ! !"
    • we just plug the values of the independent variables into the OLS regression
    line to get the predicted values
    • STATA after running OLS regression ( post estimation command)
    predict yhat, xb /* “,xb” specifies we want fitted values , and the new
    variable name is yhat    */
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    The residual for observation i is
    ! ! = ! ! − ! !
    The OLS fitted values and residuals have some important properties:
    1. the same average of the residuals is 0
    2. the sample covariance between each independent variable and the OLS residuals is
    0. As a result, the sample covariance between the OLS fitted values and the residuals
    is 0.
    3. The point ! ! ,! ! ,! ! ,! ! …  ! ! ,!  is always on the regression line.
    STATA command – post estimation command
    predict residual, resid /* “,resid” specifies we want residuals , and the new
    variable name is residual    */
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • What are the conditions we need on data to have a unique solution ! ! ,! ! ,…,! ! ?
    • First, we need at least k observations.
    • Second, we need to have adequate variation in the regressors
    • What do we mean by adequate variation?
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Perfectly Collinear Regressors: Example 1
    • We want to study how earnings vary with age, education and experience.
    • True relation:
    !"#$%$&' = 10 + !"# + !"ℎ!!" + 2 ∗ !"#$%&$'($
    • However, if everyone enters school at age 6 and starts working as soon as they
    leave school, then
    !"#$%&$'($ = !"# − !"ℎ!!" − 6
    • Then we can write
    !"#$%$&' = 10 + !"# + !"ℎ!!" + 2 ∗ !"# − !"ℎ!!" − 6
                  = −2 + 3 ∗ !"# − !"ℎ!!"
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • We can even write:
         !"#$%$&'
         = 10 + !"# + !"ℎ!!" + 2 − ! + ! ∗ !"#$%&$'($ 
    = 10 + !"# + !"ℎ!!" + 2 − ! ∗ !"#$%&$'($ + ! ∗ (!"# − !"ℎ!!" − 6)
    = 10 − 6! + 1 + ! ∗ !"# + 1 − ! ∗ !"ℎ!!" + 2 − ! ∗ !"#$%&$'($
    • If we regress earnings on age, school, experience with an intercept, there are
    infinite many ways to write down the best fitting line.
    • In this case, we don’t have a unique solution for OLS.
    • This happens when there is a linear relationship among the regressors. Notice
    !"#$%&$'($ = !"# − !"ℎ!!" − 6
    holds for each observation in our data set.
    • This is called perfectly collinear regressors.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Perfectly Collinear Regressors: Example 2
    • We want to study how earnings vary with age, gender.
    • True relation
    !"#$%$&' = 10 + !"# + !
    ! = 1   !"  !"#!$!#%&'  !  !"  !"#$
    ! = 0  !"  !"#!$!#%&'  !  !"  !"#$%" 
    • Suppose in our sample everyone is male, so ! = 1 for all i.
    • Then we can write
    !"#$%$&' = 11 + !"#
        = !"# + 11 ∗ !
        = ! + !"# + 11 − ! ∗ !
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • Again, if we regress earnings on age and indicator for male with an intercept,
    there are infinite many ways to write down the best fitting line.
    • Again, this happens when there is a linear relationship among the regressors.
    ! = 1  for every individual in our data set
    • When this happens, Stata will drop some of the trouble making variables
    automatically, and display regression output on the variables left.
    • However, we need to understand what is going on, and what Stata is doing.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • In general, we have a problem if one (or more) of the regressors can be expressed
    as an exact linear combination of the other regressors.
    • When this happens, we don’t have a unique solution for ! ! ,! ! ,…,! ! .
    • Stata will drop some of the trouble making variables automatically
    • A related problem is multicollinearity. This happens when one (or more) of the
    regressors is very close to equalling an exact linear combination of the other
    regressors.
    • When this happens, we still have a unique solution for ! ! ,! ! ,…,! ! , and Stata runs
    fine. But the estimated coefficdients on the trouble making variables are imprecise
    and unstable.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Multivariate Regression: Goodness of Fit
    • We can use the same methods as before to measure how good the fit of the
    regression line is:
    o The standard error of the regression
    o The R 2
    • We also have another measure called the adjusted R 2
    • All of these measures are reported in STATA regression output
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Multivariate Regression: Goodness of Fit
    • The standard error of the regression:
    ! ! =
    1
    ! − !
    ! ! − ! !
    !
    !
    !!!
    • This measures the average squared deviation of each ! !  from its predicted value
    • It will be smaller the better our fit is but its magnitude depends on the units in
    which we measure y.
    • Another name for ! ! is the root mean squared error (RMSE) of the residual.
    • As regressors are added to a model ! ! may decrease or may increase.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Multivariate Regression: Goodness of Fit
    • The ! ! :
    (a) Total Sum of Squares è TSS =  ! ! − !
    ! !
    !!!
    (b) Explained Sum of Squares è ExpSS =  ! ! − !
    ! !
    !!!
    (c) Residual Sum of Squares è RSS =  ! ! − ! !
    ! !
    !!!
    !"" = !"#$$ + !""
    ð Total variation in the ! ! is the sum of the variation in ! ! and ! !
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    • The R-square (! ! ) is defined as :
    ! ! =
    !"#$$
    !""
     = 1 −
    !""
    !""
    ð ! ! will be between 0 and 1 if we have an intercept
    ð ! ! will be between 0 and 1, the closer it is to 1 the better fit of the regression
    line is.
    ð The problem with ! ! is that it will automatically increase (or at least stay the
    same) whenever we add more regressors
    ð We would like a measure that takes into account the number of regressors we
    use
    ð For example, we might prefer a line that gives us an ! !  of .7 with only three
    regressors to a line that gives us an ! !  of .71 but uses forty regressors
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    ð The adjusted R-square (! ! ) is defined as :
    ! ! = 1 −
    ! − 1
    ! − !
    !""
    !""
    = 1 −
    ! !
    !
    ! !
    !
    • The adjusted R 2  (! ! ) will no greater than 1, and will be closer to 1 the better
    the fit is.
    • The adjusted R 2  is less than R 2  due to a modest penalty for the number of
    regressors in the model
    • Adding a regressor will raise the adjusted R 2  if it lowers the error sum of
    squares enough to offset the penalty for increasing k.
    • The adjusted R 2  can be less than 0 even if we include an intercept.
    • Be careful about using the adjusted R 2 to evaluate models.
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    (a)  (b)
    !"#$ = ! ! + ! ! ! + ! !"#$ = ! ! + ! ! ! + ! ! !"# + !
    Number of obs = 540
    F( 1, 538) = 112.15
    Prob > F = 0.0000

     Model Econometrics 计量经济学 Parameters of interest代写
    R-squared = 0.1725
    Adj R-squared = 0.1710
    Root MSE = 13.126
    Number of obs = 540
    F( 2, 537) = 67.54
    Prob > F = 0.0000
    R-squared = 0.2010
    Adj R-squared = 0.1980
    Root MSE = 12.91
    (c) 
    !"#$ = ! ! + ! ! ! + ! ! !"# + ! ! !"# + !
    Number of obs = 540
    F( 3, 537) = 46.27
    Prob > F = 0.0000
    R-squared = 0.2057
    Adj R-squared = 0.2012
    Root MSE = 12.88
    Week  8-­‐  Chapter  13  –  Recap  Bivariate  Regression  &  Multiple  Regression  
    (c) !"#$ = ! ! + ! ! ! + ! ! !"# + ! ! !"# + !
    Number of obs = 540
    F( 3, 537) = 46.27
    Prob > F = 0.0000
    R-squared = 0.2057
    Adj R-squared = 0.2012
    Root MSE = 12.88
    (d)!"#$ = ! ! + ! ! ! + ! ! !"# + ! ! !"# + ! ! !"#$% + ! 
    Source | SS df MS Number of obs = 540
    -------------+------------------------------ F( 4, 535) = 34.68
    Model | 23064.3736 4 5766.0934 Prob > F = 0.0000
    Residual | 88945.8575 535 166.253939 R-squared = 0.2059
    -------------+------------------------------ Adj R-squared = 0.2000
    Total | 112010.231 539 207.811189 Root MSE = 12.894
    ------------------------------------------------------------------------------
    EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    S | 2.646137 .234041 11.31 0.000 2.186385 3.105889
    EXP | .4735452 .1375807 3.44 0.001 .2032804 .7438099
    TENURE | .1697577 .0935248 1.82 0.070 -.0139631 .3534785
    URBAN | .4475683 1.161625 0.39 0.700 -1.834338 2.729475
    _cons | -26.06358 4.362455 -5.97 0.000 -34.63322 -17.49394
    ------------------------------------------------------------------------------
     Model Econometrics 计量经济学 Parameters of interest代写