0 Up votes0 Down votes

3 views30 pagesEconometría

Jul 29, 2017

© © All Rights Reserved

PDF, TXT or read online from Scribd

Econometría

© All Rights Reserved

3 views

Econometría

© All Rights Reserved

- Autocorrelation
- Cochrane J. H. Asset Pricing Solution 2010
- EIV Regression - Final - May 2007
- Econ M2 Thesis
- The Impact of Toys Recall Announcements on Market Returns
- Probability Random Process R08 MayJune 12
- Syllabus
- Uncertainty
- Institutional Investors Heterogeneity And Earnings Management: The R&D Investment Strategy
- 107507322_20041117185522
- Taesuk Lee (2011) Rate-optimal Test for Jumps in Diffusion Processes.pdf
- Emet2007 Notes
- Delta R Studio Output 22062014
- 11.11.07_wp438
- Brazilia Var
- New Microeconomics
- Ozkan-2001PANEL DATA.pdf
- CONDITIONAL VARIANCE AND THE RISK PREMIUM IN THE FOREIGN EXCHANGE MARKET
- 9783642036460-c1 (3)
- H16056 Assignment3 AEC

You are on page 1of 30

Dean Fantazzini

University of Pavia

Overview of the Lecture

Econometrics I: OLS

Dean Fantazzini 2

Overview of the Lecture

Econometrics I: OLS

Dean Fantazzini 2-a

Overview of the Lecture

Econometrics I: OLS

Dean Fantazzini 2-b

EViews Session I: Convergence in the Solow Model

object. Objects are held in workfiles. Thus open the workfile GROWTH.WMF.

Remember that the variables are defined as follows:

Variable Definition

gdp60 GDP per capita in real terms in 1960

gdp85 GDP per capita in real terms in 1985

pop60 Population in millions in 1960

pop85 Population in millions in 1985

inv Average from 1960 to 1985 of the ratio of

real domestic investment to real GDP

geetot Average from 1970 to 1985 of the ratio of

nominal government expenditure on education to nominal GDP

oecd Dummy for OECD member

Econometrics I: OLS

Dean Fantazzini 3

EViews Session I: Convergence in the Solow Model

Countries

Collected in 1985

Germany, Finland, France, Great Britain, Greece, Iceland, Ireland,

Italy, Japan, Luxembourg, Netherlands, New Zealand, Norway,

Portugal, Spain, Sweden, Switzerland, Turkey, USA

Econometrics I: OLS

Dean Fantazzini 4

EViews Session I: Convergence in the Solow Model

b) Sample

The sample is the set of observations to be included in the analysis

115-117

Econometrics I: OLS

Dean Fantazzini 5

EViews Session I: Convergence in the Solow Model

analysis. Generate the series l gdp60, l gdp85, l pop60 and l pop85 which

contain the logarithm of the original series . You can follow two ways : u

Use the GENR button and type l gdp60=log(gdp60), and do the same

for the other series.

series l gdp60 = log(gdp60)

Furthermore we need the growth rates of the GDP and the population

(GENR - gr gdp=(l gdp85-l gdp60)/25, GENR -

gr pop=(l pop85-l pop60)/25).

Econometrics I: OLS

Dean Fantazzini 6

EViews Session I: Convergence in the Solow Model

Theory (Solow Model): All countries converge against a steady- state for

the per capita earnings Poor countries grow faster as rich countries (see

also Barro, Sala-i-Matin, Economic growth)

Plot l gdp60 against gr gdp in a scatter plot. What does the plot tells you

about absolute convergence?

.08

.06

.04

GR_GDP

.02

.00

-.02

-.04

-2 -1 0 1 2 3

L_GDP60

Econometrics I: OLS

Dean Fantazzini 7

EViews Session I: Convergence in the Solow Model

Regress gr gdp on l gdp60 and a constant (click on gr gdp - press

STRG and click on l gdp60 - click on one of the series - OPEN

EQUATION - OK). Using the online help become acquainted with the

regression output (HELP - SEARCH - regression output). What does the

regression output tells you about absolute convergence?

LS GR GDP c L GDP60

Econometrics I: OLS

Dean Fantazzini 8

EViews Session I: Convergence in the Solow Model

geetot and a constant. Interpret the regression output.

sample of observations. The sample is the set of observations to be

included in the analysis. Set the sample to OECD countries.

smpl if OECD=1

Econometrics I: OLS

Dean Fantazzini 9

EViews Session I: Convergence in the Solow Model

Repeat d), e) and f) with the new sample.

Econometrics I: OLS

Dean Fantazzini 10

EViews Session II: Estimating a money demand equation

Some Premises...

Detection of Heteroscedasticity:

Residual Plot;

White Test;

Breusch - Pagan test;

Detection of Autocorrelation:

Residual Plot;

Durbin-Watson test (... remember that X have to be deterministic);

d=2 no autoc., d<2 positive autoc., d>2 negative

autocor.

Breusch - Godfrey test

1. OLS to get the residuals et

2. et = 1 et1 + . . . + p etp + xt + t

3. H0 = n R2 2p

Econometrics I: OLS

Dean Fantazzini 11

EViews Session II: Estimating a money demand equation

Econometrics I: OLS

Dean Fantazzini 12

EViews Session II: Estimating a money demand equation

Variable Description

bondr bondrate

gdp GDP (real, seasonally adjusted)

m3 M3 (seasonally adjusted)

monrat money market interest rate

Econometrics I: OLS

Dean Fantazzini 13

EViews Session II: Estimating a money demand equation

c) ... and estimate the following equation (you take into account the

transaction demand):

l_m3 = 0 + 1 l_gdp + .

Save it as eq1.

d) Has 1 the sign you expected? Interpret.

Econometrics I: OLS

Dean Fantazzini 14

EViews Session II: Estimating a money demand equation

e) Now you consider the speculation demand as well and estimate the

following equation:

Save it as eq2.

f) Have the coefficients the signs you expected? How do you interpret 1 ,

2 and 3 ?

g) Now look at the residual plot. (View -> Actual, Fitted, Residual

-> Residual Graph). Do you find evidence of the presence of

heteroscedasticity and/or autocorrelation?

Econometrics I: OLS

Dean Fantazzini 15

EViews Session II: Estimating a money demand equation

correlation?

require?

-> Serial Correlation LM Test - 4.

Econometrics I: OLS

Dean Fantazzini 16

EViews Session II: Estimating a money demand equation

(click on Options -> Heteroscedasticity -> Newey-West in the

specification window). Save the result as eq3. How do the t-values change

compared to equation 2?

k) Based on equation 3, test the following hypothesis on a 5% significance

level: i) 2 = 0, ii) 1 = 2 and iii) 3 < 0. Address the following points:

Econometrics I: OLS

Dean Fantazzini 17

EViews Session II: Estimating a money demand equation

jointly significant.

Calculate the appropriate F statistic using two different ways:

Econometrics I: OLS

Dean Fantazzini 18

EViews Session III: Monte Carlo Simulation

data.

2. Simulate a draw from the data and estimate the model using the

simulated data.

3. Repeat step 2 many times, each time storing the results of interest.

4. The end result is a series of estimation results, one for each repetition

of step 2. We can then characterize the empirical distribution of these

results by tabulating the sample moments or by plotting the

histogram or kernel density estimate.

Econometrics I: OLS

Dean Fantazzini 19

EViews Session III: Monte Carlo Simulation

distribution. EViews provides built-in pseudo-random number

generating functions for a wide range of commonly used distributions;

The step that requires a little thinking is how to store the results from

each repetition (step 3). There are two methods that you can use in

EViews:

1. Storing results in a series;

2. Storing results in a matrix.

Econometrics I: OLS

Dean Fantazzini 20

EViews Session III: Monte Carlo Simulation

this approach is that series elements are most easily indexed by a sample in

EViews. To store the result from each replication as a different observation

in a series, you must shift the sample every time you store a new result.

Moreover, the length of the series will be constrained by the size of your

workfile sample: for example, if you wish to perform 1000 replications on a

workfile with 100 observations, you will not be able to store all 1000 results

in a series since the latter only has 100 observations.

Econometrics I: OLS

Dean Fantazzini 21

EViews Session III: Monte Carlo Simulation

The matrix is indexed by its row-column position and its size is

independent of the workfile sample. For example, you can declare a matrix

with 1000 rows and 10 columns in a workfile with only 1 observation.

The disadvantage of the matrix method is that the matrix object does

not have as much built-in functions as a series object. For example, there

is no kernel density estimate view out of a matrix (which is available for a

series object).

recommendation is a mixed approach. Store all the results in a matrix. If

you need to do further processing, convert the matrix into a group of

series.)

Econometrics I: OLS

Dean Fantazzini 22

EViews Session III: Monte Carlo Simulation

Damodar Gujarati Basic Econometrics, 3rd edition:

Refer to the 10 X values of Table 3.2 (which are: 80, 100, 120, 140, 160,

180, 200, 220, 240, 260). Let Beta(1) = 2.5 and Beta(2) = 0.5. Assume

that the errors are distributed N(0, 9), that is, the errors are normally

distributed with mean 0 and variance 9. Generate 100 samples using these

values, obtaining 100 estimates of Beta(1) and Beta(2). Graph these

estimates. What conclusions can you draw from the Monte Carlo study?

Econometrics I: OLS

Dean Fantazzini 23

EViews Session III: Monte Carlo Simulation

set workfile range to number of monte carlo replications

wfcreate mcarlo u 1 100

create data series for x

NOTE: x is fixed in repeated samples

only first 10 observations are used (remaining 90 obs missing)

series x

x.fill 80, 100, 120, 140, 160, 180, 200, 220, 240, 260

set true parameter values

!beta1 = 2.5

!beta2 = 0.5

set seed for random number generator

rndseed 123456

assign number of replications to a control variable

!reps = 100

Econometrics I: OLS

Dean Fantazzini 24

EViews Session III: Monte Carlo Simulation

begin loop

for !i = 1 to !reps

set sample to estimation sample

smpl 1 10

simulate y data (only for 10 obs)

series y = !beta1 + !beta2*x + 3*nrnd

regress y on a constant and x

equation eq1.ls y c x

set sample to one observation

smpl !i !i

and store each coefficient estimate in a series

series b1 = eq1.@coefs(1)

series b2 = eq1.@coefs(2)

next

end of loop

Econometrics I: OLS

Dean Fantazzini 25

EViews Session III: Monte Carlo Simulation

smpl 1 100

show kernel density estimate for each coef

freeze(gra1) b1.kdensity

draw vertical dashline at true parameter value

gra1.draw(dashline, bottom, rgb(156,156,156)) !beta1

show gra1

freeze(gra2) b2.kdensity

draw vertical dashline at true parameter value

gra2.draw(dashline, bottom, rgb(156,156,156)) !beta2

show gra2

Econometrics I: OLS

Dean Fantazzini 26

EViews Session III: Monte Carlo Simulation

set workfile range to number of obs

wfcreate mcarlo u 1 10

create data series for x

NOTE: x is fixed in repeated samples

series x

x.fill 80, 100,120, 140, 160, 180, 200, 220, 240, 260

set seed for random number generator

rndseed 123456

assign number of replications to a control variable

!reps = 100

declare storage matrix

matrix(!reps,2) beta

Econometrics I: OLS

Dean Fantazzini 27

EViews Session III: Monte Carlo Simulation

begin loop

for !i = 1 to !reps

simulate y data

series y = 2.5 + 0.5*x + 3*nrnd

regress y on a constant and x

equation eq1.ls y c x

store each coefficient estimate in matrix

beta(!i,1) = eq1.@coefs(1) column 1 is intercept

beta(!i,2) = eq1.@coefs(2) column 2 is slope

next

end of loop

show descriptive stats of coef distribution

beta.stats

Econometrics I: OLS

Dean Fantazzini 28

- AutocorrelationUploaded byBabar Adeeb
- Cochrane J. H. Asset Pricing Solution 2010Uploaded byire04
- EIV Regression - Final - May 2007Uploaded byrpcovert
- Econ M2 ThesisUploaded byqphysics
- The Impact of Toys Recall Announcements on Market ReturnsUploaded byGaows Mohammad
- Probability Random Process R08 MayJune 12Uploaded byRomeobenet
- SyllabusUploaded byAashik Rao
- UncertaintyUploaded bykboad
- Institutional Investors Heterogeneity And Earnings Management: The R&D Investment StrategyUploaded byAI Coordinator - CSC Journals
- 107507322_20041117185522Uploaded byharshal49
- Taesuk Lee (2011) Rate-optimal Test for Jumps in Diffusion Processes.pdfUploaded byJoshue Sandoval
- Emet2007 NotesUploaded bykowlet
- Delta R Studio Output 22062014Uploaded bypython_lion_926
- 11.11.07_wp438Uploaded byThanhtam Nhi
- Brazilia VarUploaded byRebecca Stuparu
- New MicroeconomicsUploaded bycaport
- Ozkan-2001PANEL DATA.pdfUploaded byCorina Mardar
- CONDITIONAL VARIANCE AND THE RISK PREMIUM IN THE FOREIGN EXCHANGE MARKETUploaded bymintajvshokolade
- 9783642036460-c1 (3)Uploaded bymichael17ph2003
- H16056 Assignment3 AECUploaded byRakesh Santhapur
- Meaning of DemandUploaded byAnonymous NSNpGa3T93
- AnovaUploaded byhellomiketest_365886
- Eviews_Notes.pdfUploaded byRavshonbek Otojanov
- HASIL EVIEWS 10Uploaded byRachmad Hardian
- Hasil Uji Data PanelUploaded byAryono RH
- CoefficientUploaded byfrancinegabrielle_
- demnd frecastngUploaded bypuneeta chugh
- Machine LearningUploaded byAnbu Saravanan
- PAPER Improving the Prediction of Material Properties of Concrete Using Kaizen Programming With Simulated AnnealingUploaded byJM4698
- There is a Lack of Relationship between Corporate Governance and Firm's Performance in The Cement Sector of PakistanUploaded byAeny Khalil

- R dataUploaded byamagoodfriend3058
- Lettau - Resurrecting the (C)CAPM a CrossSectional Test WhUploaded byRoberto Cisneros Mendoza
- power-cardio.pdfUploaded byRoberto Cisneros Mendoza
- Foreign ExchangeUploaded byRoberto Cisneros Mendoza
- Cf IntroUploaded byRoberto Cisneros Mendoza
- Catalog UbertiUploaded byRoberto Cisneros Mendoza
- Frm Study Guide Changes 2015Uploaded byk_ij9658
- Logit-ologitUploaded byRoberto Cisneros Mendoza

- Experiment 5: Swelling and solute transport properties of hydrogels.Uploaded byidownloadbooksforstu
- Accelerating Lamberts Problem on the GPU in MATLABUploaded byConexão Terra Plana
- Peer Group SupervisionUploaded byGandac Ionut Daniel
- VR.docxUploaded byRahul Joshi
- PNAAA595 - Ferrocement - Applications in Developing Countries - USAIDUploaded byMar Revant
- facebookUploaded byapi-294717466
- 2505538Uploaded byapi-235551477
- O'Callaghan P 2013 Macroinvertebrate Cusuco HondurasUploaded byJose Manuel Mora
- 1-s2.0-S0305750X16303709-main.pdfUploaded byTurnea Alexandru
- genreanalysisUploaded byapi-356390185
- EslUploaded byildbowie
- Noise Immune and Area Optimized Serial Interface for FPGA based Industrial InterfacesUploaded byIjsrnet Editorial
- Syllabus of IIT hydrabad.pdf.PsUploaded bySatish Patil
- Exegesis of Genesis 1:1, 2: A synthesis of several papers written for doctoral courses at William Carey International UniversityUploaded byWCFCurriculum
- Engineering Principles and Techniques in Room Acoustics PredictionUploaded byNorris Noyon
- An Introduction to the Supply Chain Council's SCOR MethodologyUploaded byLuis Andres Clavel Diaz
- Career Guidance and SHS OrientationUploaded byLubeth Ronquillo Cabatu
- Dump > SQL 1Z0-007 > SQL#3Uploaded byapi-3745527
- 12_1article2Uploaded bySholLy PakeHati
- Effects of High-Intensity Interval Training on Vo2max AndUploaded byjulio
- Fiitjee-For Class9 to 10Uploaded bySunderraj Prabakaran
- 9. Well Foundation-IOE QuestionsUploaded byRajesh Khadka
- MotionUploaded byPutri Nila Sudewi
- 10 Principles of Organization DesignUploaded bydoopark
- 02. Chapter 3 - Lexical AnalysisUploaded byAfrin Banu
- Lecture Ch 15 Professional DevelopmentUploaded byRoberto Pereira da Silva
- Research Proposal1Uploaded byXed Ahsan
- Scada & GISUploaded byroddydz
- Visual Leteracy PrintUploaded bySarojini Nitha
- Dynalite+System+ExplainedUploaded byflorin_mandric3466

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.