Econ2206 - Lecture notes All PDF

Title Econ2206 - Lecture notes All
Course Introductory Econometrics
Institution University of New South Wales
Pages 88
File Size 6.9 MB
File Type PDF
Total Downloads 72
Total Views 160

Summary

WEEK 1 LECTURE 1Diferent types of economic data:  Cross-secional o Sample of diferent units of interest at a given point of ime or in a given period o Observaions more or less independent e. random sampling from populaion  Time series o Serially correlated observaions collected over ime where orde...


Description

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

WEEK 1 LECTURE 1 Different types of economic data:  Cross-sectional o Sample of different units of interest at a given point of time or in a given period o Observations more or less independent e.g. random sampling from population  Time series o Serially correlated observations collected over time where ordering is important e.g. stock prices, exchange rates, CPI, GDP… o Typical features: trends, cycles and seasonality (data frequency is important)  Pooled cross sections o 2+ cross sections combined in 1 set with each drawn independently of each other o Used to evaluate policy changes e.g. compare before reform (1993) to after reform (1995)



o Panel/Longitudinal data o Same cross-sectional units followed over time where panel data has cross-sectional and time series dimensions o Can account for time-invariant unobservables, can model lagged responses  E.g. city crime stats: each city observed in 2 years, effect of policy on crime rates might have a time lag

o Difference between Random Variable and Sample  X is a random variable that represents possible events before tossing the coin o o Random variable- function describing possible outcomes of a random event.

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

WEEK 1 LECTURE 2 Population regression:  Includes: o Outcome: Wage (Y) o Regressor: variables in dataset related to outcome (X) o Unobservables (error term): variables related to outcome with no dataset (U) o Parameters (Population): numbers used to describe relationship between regressors and outcome o

is the intercept and

OLS Estimation- Used to find real value of the parameters- use observed data to guess the real values of betas - written with an arrow on top: Best guess for relationship between X and Y regression is: Ordinary Least Squares  OLS assumes E(U) = 0 (error terms have expected value of 0) o Regression residuals- difference between guess of income and actual income (yhat with y)  OLS chooses Betahat that minimises square difference between fitted and actual outcome

 Choosing Beta’s is like choosing a line Red line:

Best fitting line through data is the Ordinary Least Squares estimate of population regression line OLS Estimates    Estimated coefficients: the coefficients are random variables up until you observe a sample which is when they become specific numbers

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Real values of beta’s are population parameters which are unknown in a sample Tutorial 1

4 equations above are incorrect as they are the fitted value equations which don’t have ‘u’ terms Confounding Factors: Affect both dependent and independent variables. Use multiple regression analysis to control for these factors Woolridge 2.2

0 conditional mean states unobservables that affect outcome shouldn’t be related to regressor

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

WEEK 2 LECTURE 1 Reminder:  Objective of OLS is to minimise squared residuals (one way to guess the parameters) o OLS is EX-ANTE and thought as a random variable- value of estimates depends on randomness of the data o Unbiasedness in an estimator has little mistakes:

Unbiased OLS  Even though we don’t know the real value of B1, we know if multiple people used OLS formula using different data, the estimate will in average, be equal to B1 Gauss-Markov Conditions  Conditions that we can say our estimator is unbiased (if satisfied, estimator is unbiased)

o Gauss-Markov Assumptions  Assumption SLR1- Linear in Parameters o Population regression line is linear in parameters (parameters are just multiplying regressor (X) or they are alone so they can’t be exponents of X) o Y = B0 + B1X + U  Assumption SLR2- Random Sampling o Random sampling of data drawn from a population  Assumption SLR3 – Sample Variation in explanatory variable o Sum of differences between xi and xbar squared is greater than 0





 Assumption SLR4- Zero conditional mean (ZCM): o Explanatory variable must not contain information about mean of unobservables E(U) = 0 o No correlation between error term and independent variable Assumption SLR5- Homoskedasticity o If violated, estimates are still unbiased but no longer BLUE

Example:  Wage = B0 + B1Educ + U with Data on wages and years education  Assumption 1 is satisfied  Assumption 2 Population regression with all data 

Assumption 3- Variation is



Assumption 4-

- U is anything that affects wages that isn’t education

Example of when Assumption 4 isn’t satisfied:  Choosing students who havn’t finished high school E(Ability | Educ) < 0  Choosing students with uni degree E(Ability | Educ) > 0

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Goodness of Fit  SST Total Variation- how much variation there is on the outcome side: o Spread of observations- total sum of squares- total sample variation in yi 

SSE Explained Variation- variation in the guesses: o Spread of predictions- explained sum of squares- total sample variation in the yhati



SSR Unexplained Variation- variation left unexplained: o Spread of residuals- Residual sum of squares Sample variation in uhati Total Variation in y= sum of explained variation SSE and unexplained variation SSR o Coefficient of Determination







 Ratio of explained variation to total variation- fraction of sample variation in y explained by x

Define coefficient of determination of R^2  Ratio between explained variation and total variation: R^2 = SSE/SST = 1 – (SSR/SST)  Rsquared between 0 and 1  Very high R^2 not uncommon with time series data while often low with cross-sectional Unbias means on average, B1hat = real B1 R^2 is how much of variation is explained with y estimate- higher R^2 means model has a better goodness of fit If your objective is to get unbiased, use 4 Markov Assumptions Example of biased estimate with high R^2

   

Red line is real population regression line when education is placed at 0 Green line is estimated line R^2 would be very high- can see this as the green line is never too far away from blue dots Line is very biased as we say that there is positive relationship between education and wages when red line says otherwise

If SLR.1 – SLR.4 is valid, there’s a casual interpretation “cause”. If at least ones invalid, there’s correlation “is associated with”

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

WEEK 2 LECTURE 2 Interpreting Parameters

 o Red line is the estimated regression- The linear prediction is the estimation using OLS of the best fit line across the dots of a sample o Interpreting the Betas:  B hat 1 = 0.54 = extra year of education is associated with $0.54 increase in hourly wage  Use “caused” when there is an unbiased estimate (if no bias, increase in education causes the wage increase)- only if assumptions SLR1 to 4 hold and therefore E(B1hat)=B1  B hat 0 = -$0.90- B0 tells you the prediction of the outcome when the regressor = 0 Semi-logarithmic specification   

Linear for B parameters but non-linear relationship between wages and education B1: increasing education by 1 year implies (100*B1)% change in wages o Semi-elasticity of wages with respect to education

Log-log specification   B0: predicted wage if education = 1  B1: doubling in education implies (100*B1)% change in wages o Elasticity of wages with respect to education Gauss-Markov Assumption SLR.5  Homoskedasticity o  Conditional variance of X = Unconditional variance of U  Variability of unobservables doesn’t change with regressor x  Heteroskedasticity o where U = ability (unobserved) o Pretend E(Ability | Education) = 0 but Var(Ability | Educ = HS) < Var(Ability | Educ=UNI)

o

Red lines point to distributions of ability

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

 Variance of unobserved determinants of wages increases with education Variance of OLS Estimators

 

B1 variance increases on sigma squared (variance in unobservables) and decreases with the bottom formula (variation in x)- small variance if x’s are far away from each other

Estimating the error variance: Important statistic by STATA is standard errors for regression coefficients

Multiple Regression OLS   Hold other factors fixed if you’re interested in B1

o Multiple Regression Example:  We control for ability as it’s not in u  Educations effect on wages is not linear o Change in Wage / Change in education = B1 + 2B2educ (differentiated) OLS in Multiple Regression  Fitted values are the best prediction of why the beta values are given  Minimising errors

o

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Tutorial 2 Zero Conditional Mean (ZCM) and Zero Expected Value 



If we have 0 conditional mean assumption

(mean of error terms at given value

of independent variable X is 0), it means 0 expected value is satisfied as well (mean of all error terms is 0) o If 0 expected value is violated (expected is not = 0), we can’t find residual and intercept o If 0 conditional mean is violated, error term is correlated with independent and dependent variables so the estimated coefficient is biased ZERO CONDITIONAL MEAN- AVERAGE VALUE OF U DOESN’T DEPEND ON VALUE OF X (SAME ACROSS POPULATION) AND U AND X ARE UNCORRELATED

R^2=60 means 60% of variation in outcome is explained by independent variables/regressors  Higher R^2 means it’s a better fit  R^2 is variation in outcome that is explained by the regressors 4 Variations

Functional Form with Logs

Log-Level/Log-linear- known as the semi-elasticity of y with respect to x Log-log- known as the elasticity of y with respect to x St r ongcor r el at i onc oeffic i enti sus ual l yabov e0. 5 Bi tbel ow,i ss t i l l qui t es t r ong Cor r el at i oncoeffic i entnor mal l ybet ween1and1

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Week 3 Lecture Omitted Variable Bias Suppose we try estimate  We think about assumption 1-4 (mainly but the below one is correct If we let the true model be omitted variable which means

) and if we assume this isn’t correct

assuming 1-4 holds, we call X2 an (the unobservable in OG equation) so:

 OLS estimates are bias if there is a relationship between the unobservable (U) and X1 which holds if X2 and X1 are related so:

and that B2 is not equal to 0 so X2 has an effect on Y

If there is an omitted variable (something inside U is related to X1 or Y): X2 is related to X1 & X2 has an effect on Y We normally say we B1 is higher or lower than it actually is and we can estimate which way it goes and by how much:   

Substitute true model and rewrite regression into: Delta 1 is the relationship between X1 and X2 When estimating OLS with no X2, the expected value of theta 1 is = real parameter (B1- the



effect x1 has on Y) + Beta2*Delta1 (bias)Bias is average mistake made between OLS estimator of wrong direction and the parameters

Example

Positive bias means you are overestimating What if we include an irrelevant variable?  Not a problem as the other variable is just useless 

There is no bias:

Multiple Linear Regression

and X3 is irrelevant:

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

  



MLR.1- Linear in Parameters (same as simple regression model) MLR.2- Random Sampling (same as simple regression model) MLR.3- No Perfect Collinearity (slightly different)- at least one variable is superfluous and can be omitted o Example:  If you have Age and Tenure, you can calculate Agestart anyways so you have perfect collinearity so it doesn’t satisfy assumption 3 and can’t use OLS  Can drop a variable MLR.4- Zero Conditional Mean o  

What’s left in error terms shouldn’t be related to the regressors More regressors means there’s less things in the error term so it’s less likely the error term is related and less likely to not satisfy the 0-conditional mean

Exogenous and Endogenous  

U contains observables We suspect (assumption 4) as education and ability are correlated o Endogenous- The suspected correlated variables o Exogenous- the rest

Variance of OLS Estimators  To find variance, we have the assumption MLR.5- Homoskedasticity:  If MLR.1 to MLR.5 are correct, OLS is unbiased and: o  

variance of unobservable 2 variation∈regressor J ()∗(1−R j ) R2j is the r-squared from regression with outcome xj on other regressors including intercept: it is R2 of: - xj on left

R^2 is how much variation is explained by regressors so how much regressors explain xj A high R^2 means the regressors explain the variable (Xj) well (called MULTICOLLINEARITY) OLS IS THE BEST LINEAR UNBIASED ESTIMATOR (BLUEs) - best means estimator is unbiased and between all estimators possible, it has the lowest variance. Estimating Variances  Prefer unbiased estimate of error variance

o o

o Standard errors for regression coefficients-

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Partialling Out  When you have multiple regressors, you can simplify it to only one regressor  Frisch-Waugh theorem: o If we have a multiple regression model = we’re only interested in Bj (the relationship between Xj and Y)  One way: do OLS and get B hatj  Another way: 2 steps:  Regress Xj on all other regressors and get the residual (V)  

and

o Do the regression that has the residual as the regressor o The Frisch-Waugh Theorem says that delta1 is equal to Beta j in o

Normality  Assumption MLR.6- Normality of error terms o Error Term (everything else that affects Y) that isn’t in the regressors is distributed in a normal distribution

o o Population error term is independent of explanatory variable and normally distributed with mean zero and variance conditional mean

implying homoskedasticity and 0

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

TUTORIAL 3 MLR. 1-5 is Gauss-Markov Assumptions MLR. 1-6 is Classical Linear Model (CLM) assumptions MLR.6 Normality of error terms: error term has normal distribution between 0 and sigma squared  Multicollinearity is not the same as perfect collinearity  Multicollinearity is where 2 or more independent variables are highly correlated  Not a violation of MLR.3 whereas perfect collinearity is 

Example.

For OLS to be unbiased, only need MLR.1-4 Omitted Variable Bias  2 conditions (1 is not enough): When independent variable is correlated with omitted variable and when the omitted variable has an effect on Y o Show independents correlation doesn’t equal 0 



o Show omitted beta in regression doesn’t equal 0 Overestimate if bias is positive and underestimate if otherwise

Endogenous Explanatory Variable  Variable correlated with the error term  Regression: but drop ability (goes back into error term), education is endogenous explanatory variable (related to ability in error term) Exogenous Explanatory Variable  Explanatory variable uncorrelated with error term  If we included Age after dropping ability, it is the exogenous explanatory variable as age is not related to ability Writing results in equation form:  o Don’t include u Residual = actual value – predicted How to generate a new variable: if you need but don’t have log wage:  Use generate command o generate ln_wage=log(wage) Statistical significance- when result is unlikely to have occurred given the null hypothesis

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

Generating residual Frisch-Waugh Theorem – Partialling Out  

Partialling Out: o Step 1: o Step 2: - residual from step 1 (this has partialled out education from IQ so the residual is the part of IQ uncorrelated with education. o Step 3:  Delta1 captures effect IQ has on log(wage) after partially out effects of education on log(wage) o Frisch-Waugh Theorem: as in OG equation, B2 is the effect IQ has on log(wage) while keeping education constant

Gauss-Markov Theorem: Under MLR.1-5, OLS estimators are Best Linear Unbiased Estimators (BLUES) of regression coefficients  Best: OLS estimator has smallest variance and smallest standard errors compared to other estimators (e.g. weighted least squares or generalised least squares)  

Unbiased: expected value of the estimated coefficient is equal to the true value Under normality, OLS estimators are the best (even nonlinear in parameters) unbiased estimators o

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

WEEK 4 LECTURE A



We don’t know variance Bj (only if they give it to us)- can find it in stata



The left side is equal to the t-distribution

Hypothesis Testing Using OLS

How to build a rejection rule?



Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

5. Reject or accept depending on realization of and the rejection rule Example: If you double your sales you double your salary. Is this true? Assuming null is true:



B1 rejected at the 5% level o If B1 = 1 was true, we should observe a more extreme test statistic than the one observed less than 5% of the times

Testing for Bj=0 in stata- 4th column t value  If you reject Bj=0, xj is said to be statistically significant at the specified significance level (xj has an effect on the y)

 Type I and Type II Errors  Type I error- Rejecting null when H0 is true (a)  Type II error- Not rejecting when H0 is false (B)  Increasing ‘a’ will reduce B and vice versa  Solution is to fix a to some reasonable value  1 – B is called power of the test

Homoskedastic- residual is constant (doesn’t vary much) Heteroskedastic- variance of residual varies a lot

P-Value  Smallest a where H0 is rejected- probability of obtaining test statistic more extreme than observed  People reject nulls for only significantly small significance levels and large p-values are in favour of H0

Example 1. Regression and estimated standard error and N is # observations

where SE is the

a. 1st step: Define the test: b. 2nd step: Construct the test statistic if null is true: c. 3rd step: Decide specific significance level (5%) d. 4th step: construct rejection rule: theres 43 observation – 2 regressors – 1 = 40 so degrees of freedom is 40 and then look on the table of significance levels i. e. 5th step: equate statistic...


Similar Free PDFs