Docsity
Top Seller

Econometrics (L. Stanca), Appunti di Econometria

Toggle sidebar
bg1
1
Econometrics
Lecture notes, 1st year, AY 2019-20, INTECO, Sara Cucaro
Prof. Luca Stanca
The nature of econometrics and economic data (Chapter 1 Woolridge)
What is Econometrics? Econometrics is used to:
• Estimate parameters of economic relationships;
• Test economic hypotheses and theories;
• Evaluate government and business policy (what happens to my dependent variable if I change all the
explanatory variables by this much?);
• Predict and forecast out of sample (what does my model predict for an individual in a specific
situation?).
For example, consider education and wage: if I plot them, probabily I will find out that there’s a positive
correlation between the two, ceteris paribus. To define this positive influence they have on each other, I can
formulate an explicit relationship that describes how education affects wage. It could be the case that wage
depends linearly on education: this is captured by 𝛽0 (the intercept) and 𝛽1 (the slope). The last term n is an
error term, capturing the fact that the linear relationship is not perfect, but there are additional factors that
matter for wage (genter, height, etc). Therefore, if captures everything not explicitly captured and taken into
account in this model.
The next step is trying to estimate the parameters in this model: I want to quantify the two values of 𝛽0 and
𝛽1. This is what econometrics is about, since once I estimated them, I can test hypotheses. For example,
suppose I want to test the following:
𝐻0: 𝛽1= 0
𝐻1: 𝛽1> 0
I want to know whether this finding is due to chance (therefore, not due to random factors), and therefore the
effect of education on wages can be considered as different from 0.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Anteprima parziale del testo

Scarica Econometrics (L. Stanca) e più Appunti in PDF di Econometria solo su Docsity!

Econometrics

Lecture notes, 1st year, AY 2019-20, INTECO, Sara Cucaro

Prof. Luca Stanca

The nature of econometrics and economic data (Chapter 1 Woolridge)

What is Econometrics? Econometrics is used to:

  • Estimate parameters of economic relationships;
  • Test economic hypotheses and theories;
  • Evaluate government and business policy (what happens to my dependent variable if I change all the

explanatory variables by this much?);

  • Predict and forecast out of sample (what does my model predict for an individual in a specific

situation?).

For example, consider education and wage: if I plot them, probabily I will find out that there’s a positive

correlation between the two, ceteris paribus. To define this positive influence they have on each other, I can

formulate an explicit relationship that describes how education affects wage. It could be the case that wage

depends linearly on education: this is captured by 𝛽 0

(the intercept) and 𝛽

1

(the slope). The last term n is an

error term, capturing the fact that the linear relationship is not perfect, but there are additional factors that

matter for wage (genter, height, etc). Therefore, if captures everything not explicitly captured and taken into

account in this model.

The next step is trying to estimate the parameters in this model: I want to quantify the two values of 𝛽 0

and

1

. This is what econometrics is about, since once I estimated them, I can test hypotheses. For example,

suppose I want to test the following:

0

1

1

1

I want to know whether this finding is due to chance (therefore, not due to random factors), and therefore the

effect of education on wages can be considered as different from 0.

Stata confirms my initial guess (using dataset WAGE1):

How to estimate a relationship? We can ask Stata to run a regression of wage and education. From this

regression I get estimated parameters for education and for the constant:

Therefore, - .90 is my estimate for 𝛽 0

. More importantly, my estimate for 𝛽

1

, what I’m really interested in, is

.54. Can I test the hypotheses that this parameter is 0? Yes, it’s such standard that Stata automatically provides

this information. In fact, it estimates not only the estimated coefficient but also its standard error, that is a

measure of the variability of our estimate, then also the p statistic (p-value) and the confidence interval. From

all this information I can conclude that the parameter that describes the relationship between education and

wage is significantly different from 0.

Steps in Empirical Economic Analysis. An empirical analysis uses data to test a theory or to estimate a

relationship. Always start from a theory.

  1. Theory
  2. Data
  3. Analysis

Econometrics differs from Statistics in the fact that starts from a theory, from a model that tries to capture the

key feature of the phenomena you are investigating. Then you collect data to investigate this phenomenon and

then use the theory to guide your data collection. Very often in statistics you ask the data to inform you on

particular conditions that can tell you something about what generates those data.

Causality :

  • Simply establishing a relationship between variables (correlation) is not sufficient
  • Can we conclude that there is a causal effect?
  • If we’ve truly controlled for enough other variables, then the estimated ceteris paribus effect can

often be considered to be causal

  • Generally, it is difficult to establish causality

Example: Returns to Education. A model of human capital investment: more education should lead to

higher earnings.

Earnings = β0 + β1education + u (3)

The estimate of β1 provides one measure of the return to education. Can it be considered causal?

The simple regression model (Chapter 2 Woolridge)

Let’s start from an example. Consider income-happiness correlation. I’m supposing that happiness depends

linearly on income in accordance with the following relation:

0

1

𝑖

Need to find parameters 𝛽

0

1

. I can do this with the simple regression model.

In general, we denote our simple regression model as follows:

0

1

e.g.

0

1

Y, the dependent variable, depends linearly on x. 𝛽 0

is going to be the intercept, while 𝛽

1

is the slope, and u

represents the error term. For example, we have already discussed the question “does wage depend on

education?”.

y referred to as:

  • Dependent variable
  • Left-hand side variable
  • Explained variable
  • Regressand

x referred to as:

  • Independent variable
  • Right-hand side variable
  • Explanatory variable
  • Regressor
  • Covariate
  • Control Variable

u (error term, or disturbance):

unobserved factors other than x

that affect y.

𝟎

(intercept, or constant)

expected value of y for x = 0

𝟏

(slope): expected change in y

when x changes by one unit. For

example, by how much I expect

wage to change when education

increases by one year ($ per year)

Let’s see some examples:

Derivation of OLS (Ordinary List Squares)

Basic idea: estimate population parameters from a sample. Let

𝑖

𝑖

: ⅈ = 1 , … , 𝑛 denote a random sample of

size n from the population. For each observation, the simple regression model will hold given:

𝑖

0

1

𝑖

𝑖

An example is the following one,

considering savings and income:

The first way of deriving the OLS estimator is the following. Note that 𝐸(𝑢

𝑥) = 𝐸(𝑢) = 0 implies

= 0. Since

it follows also that 𝑬

This is true because, according to its definition, the covariance of x and u is equal to the expected value of the

cross-product of x and u minus the cross-product of the expected values. Since the expected value of u is equal

to 0, the second term is 0. Why is this useful? Because I can then define these two moment restrictions:

Moment restrictions :

0

1

𝐸(𝑥𝑢) = 𝐸[𝑥(𝑦 − 𝛽

0

1

𝑥)] = 0

We know that in the population these two zero-conditions hold. We will then choose other values for the other

elements so that these conditions hold in our sample.

Method of moments: choose parameter values so that sample versions of moment restrictions hold:

𝑖

0

1

𝑖

𝑛

𝑖= 1

𝑖

𝑖

0

1

𝑖

𝑛

𝑖= 1

We have the mean of the error term (first equation) and the mean of the cross-product between x and the error

term (second equation). So the idea is that I will choose 𝛽

0

and 𝛽

1

in such a way that these two conditions

hold.

From the first restriction , i.e. if I solve this equation

1

𝑛

𝑖

0

1

𝑖

𝑛

𝑖= 1

= 0 , I obtain that:

0

1

i.e. 𝛽

0

1

What about the estimate for 𝛽

1

? I can obtain it from the second restriction :

𝑖

[𝑦

𝑖

1

1

𝑖

]

𝑛

𝑖= 1

𝑖

𝑖

𝑛

𝑖= 1

1

𝑖

𝑖

𝑛

𝑖= 1

𝑖

𝑖

𝑛

𝑖= 1

1

𝑖

2

𝑛

𝑖= 1

Therefore, from this restriction I can derive (as we observe in the last passage) the sum of the cross-product

between x and y expressed as deviation from the mean equals to 𝛽

1

times the sum of the squared deviations of

x from the mean. If I solve that, I obtain the OLS slope estimator.

OLS slope estimator:

1

𝑖= 1

𝑛

𝑖

𝑖

𝑖= 1

𝑛

𝑖

2

i.e. sample covariance between x and y divided by the sample variance of x.

If x and y are positively correlated the slope will be positive , then if they’re negatively correlated the slope

will be negative. Another implication: the larger the variance of x for a given covariance between x and y,

the smaller the slope coefficient.

Once I have estimated my model and obtained estimates for intercept and slope, I also obtain fitted values, that

is predictions from my model.

Fitted values : 𝑦̂

𝑖

0

1

𝑖

(predicted, explained)

This 𝑦̂ 𝑖

can be interpreted as the expected value of y. Moreover, I also obtain residuals, which are deviations

from actual values (difference between actual values and fitted values). This is the unpredicted part of y.

Residuals : 𝑢̂

𝑖

𝑖

𝑖

𝑖

0

1

𝑖

(unpredicted, unexplained)

Therefore, I can decompose y in two parts: the predicted part 𝑦̂ 𝑖

and the unpredicted part 𝑢̂

𝑖

. In particular,

graphically, my model predicts 𝑦̂ 𝑖

and the distance from the actual value y is the residual 𝑢̂

𝑖

To study the relationship between this measure of firm performance and CEO compensation, we postulate the

simple model

0

1

The slope parameter 𝛽 1

measures the change in annual salary, in thousands of dollars, when return on equity

increases by one percentage point. Because a higher roe is good for the company, we think 𝛽 1

The data set CEOSAL1.RAW contains information on 209 CEOs for the year 1990; these data were obtained

from Business Week (5/6/ 19 ). In this sample, the average annual salary is $1,281,120, with the smallest and

largest being $223,000 and $14,822,000, respectively. The average return on equity for the years 1988, 1989,

and 1990 is 17.18%, with the smallest and largest values being 0.5 and 56.3%, respectively.

Using the data in CEOSAL1.RAW, the OLS regression line relating salary to roe is

n = 209

where the intercept and slope estimates have been rounded to three decimal places; we use “salary hat” to

indicate that this is an estimated equation. How do we interpret the equation? First, if the return on equity is

zero, roe = 0, then the predicted salary is the intercept, 963.191, which equals $963,191 since salary is

measured in thousands. Next, we can write the predicted change in salary as a function of the change in roe:

This means that if the return on equity increases by one percentage point, ∆𝑟𝑜𝑒 = 1 , then salary is predicted

to change by about 18.5, or $18,500. Because ∆𝑠𝑎𝑙𝑎𝑟𝑦

= 18. 501 (∆𝑟𝑜𝑒) is a linear equation, this is the

estimated change regardless of the initial salary.

We can easily use ∆𝑠𝑎𝑙𝑎𝑟𝑦

= 18. 501 (∆𝑟𝑜𝑒) to compare predicted salaries at different values of roe.

Suppose roe = 30. Then 𝑠𝑎𝑙𝑎𝑟𝑦

= 963. 191 + 18. 501 ( 30 ) = 1. 518. 221 , which is just over $1.5 million.

However, this does not mean that a particular CEO whose firm had a roe = 30 earns $1,518,221. Many other

factors affect salary. This is just our prediction from the OLS regression line (∆𝑠𝑎𝑙𝑎𝑟𝑦

The estimated line is graphed in

Figure 2.5, along with the

population regression function

E(salary|roe). We will never

know the PRF, so we cannot tell

how close the SRF is to the PRF.

Another sample of data will give

a different regression line, which

may or may not be closer to the

population regression line.

USING STATA:

After uploading the CEOSAL1 dataset, I can summarize my data as follows:

So I can estimate this equation using the command “regress (reg) salary roe” and this is my regression

output:

I obtained a positive coefficient

(18.50119, estimate for 𝛽 1

, while

963.19 is the estimate for 𝛽 0

), which

I can visualize with a scatterplot: we

can detect a positive correlation

between roe and salary. I impose a

linear fit.

The interpretation here is: as roe

increases by one unit, the salary of

the CEO is expected to increase by

18.50 thousand dollars.

PROPERTIES of the OLS estimator

1. Sum of OLS residuals is zero:

𝒊

𝒏

𝒊=𝟏

(sample average of OLS residuals is also zero:

∑ 𝒖̂

𝒊

𝒏

𝒊=𝟏

𝒏

When we estimate a simple regression model we are fitting a straight line through a scatterplot of points. It

means that we decompose each observation in two parts: fitted value and the residual. By construction, if we

estimate the parameters by OLS the sum is equal to zero, as we should know from the discussion about methods

of moments interpretation: in fact, we estimate 𝛽 0

and 𝛽

1

by imposing this condition. In the moments

interpretation we say that the sum of the error terms is equal to zero , so this is a logical consequence.

We can check this property by using

stata, considering the dataset

WAGE1, from which I obtain this

linearly fitted scatterplot.

I obtain n residuals, if I sum them up I get 0. I can prove this using the function “predict” on STATA, which

gives me fitted values and residuals. Before doing this, for the function “predict” to work, I need to estimate

my model with the function “regress”.

“reg wage educ”

Then I use “predict wage_hat”, which creates a variable wage_hat which I can see by browsing my three

variables (“bro wage educ wage_hat”). Wage_hat values will represent my fitted values. I can obtain the

residuals using the same function predict, but adding an option (res, which indicates residuals) through a

command: “predict u_hat, res”. Browsing some values:

At this point, if I sum u_hat:

As a mean I get 4.43e- 09 , not exactly zero because STATA approximates the values, but really close to zero.

We just checked that the sample average of OLS residuals is also zero:

∑ 𝑢

̂

𝑖

𝑛

𝑖= 1

𝑛

2. Sample covariance between regressors and OLS residuals is zero:

𝒊

𝒊

𝒏

𝒊=𝟏

Again, this is not a surprise if we remember the method of

moments estimation. This is the second condition we impose,

therefore it’s true by construction. Checking on STATA, we get

a correlation of 0 (educ is the x variable).

3. OLS regression line always goes through the mean of the sample:

𝟎

𝟏

We can guess that this is true by doing an exercise. Consider the sample mean of education, which is 12.

(sum educ, mean). Now we open our dataset and using the edit command we create a new observation

(additional individual) who has an education of 12.56274). Now I can use my model to predict the expected

wage of an individual with this level of education. For doing this, first of all I drop my old variable wage_hat

(which did not include the new observation) and predict another wage_hat. Browsing, I see that for this

corresponding level of education my model has predicted an expected wage of 5.896104. This is exactly the

sample mean of variable wage:

This confirms that the regression line always goes through the means of the explanatory and dependent

variables.

Notice that 0 < 𝑅

2

< 1 , where it is equal to 0 when the model has no explanatory power and equal to 1

when the model has perfect explanatory power (without any errors).

Let’s have a look to this example:

We are interested in the value Adj R-squared. This is saying that the model is able to explain only about 1%

of the overall variability in salary. Therefore, the answer is not much. The bottom line is that roe explains very

little of salary variability and we need more informative explanatory variables (CEO and firm characteristics,

info on sector, etc.).

Units of measurement and functional form

Effects of changing units of measurement

If I multiply my variable y by 10, everything will be multiplied by 10.

Why? Because the definition of the estimated (by OLS) slope coefficient is the covariance between x and y

divided by the variance of x. This latter variance is obviously not affected when we multiply the dependent

variable by 10, but the covariance will be affected. Let’s observe the correlation:

What if I take the log transformation for both the dependent variable y and the explanatory variable x?

0

1

In that case, 𝛽 1

would be interpreted as an elasticity , that is: 𝜷

𝟏

is the percentage change in y for a 1-percent

change in x (e.g. if 𝛽 1

= 2 it means that if x changes by 1%, then y is expected to change by 2%).

An application is given by the following example:

Using STATA, this is the reg analysis without any log:

Therefore, for one year of education, wage is expected to increase by .54.

If I instead use lwage :

The interpretation is: when education changes by 1 unit, wage is expected to increase by 8% (or 8 percentage

points). This is the semi-elasticity, the percentage change in y given the change of 1 unit of x.

I can also generate a variable being the logarithmic transformation of x-variable educ.

However, this is not the best thing to do, since (a) educ is a discrete variable and (b) takes also 0 values (since

its minimum is 0) and it’s not appropriate to take the log of a variable that is not always positive. For the sake

of the argument, doing the reg analysis with both logs:

This can be interpreted as an elasticity : when education increases by 1%, wage is expected to increase by

.82%. So, the elasticity is estimated to be less than 1.