0% found this document useful (0 votes)
14 views33 pages

Econ 1-2

Uploaded by

l237345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views33 pages

Econ 1-2

Uploaded by

l237345
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Introduction to

Econometrics
Dr. Muhammad Sabeeh Iqbal
Imagine you're a government advisor, and a
small town in your country is facing a
serious problem: unemployment is
skyrocketing, and the local economy is in
freefall.
People are losing their jobs, businesses are
closing, and the community is in despair.
The government is desperate to find a
solution, and they've turned to you for help.
You have access to tons of data—
unemployment rates, business
revenues, education levels, even
weather patterns—but it’s all just
numbers on a page. The real challenge
is figuring out what’s causing the
problem and how to fix it. This is where
econometrics comes in.
You start by analyzing the data, searching for patterns and correlations. You notice
that unemployment spikes every time the local factory reduces production, but why
is production falling?
But that’s not the end of the story. You also find that the
town’s workforce lacks the skills needed for other
industries. People are too reliant on the factory, and when
it struggles, so does the entire town. Now, you have a
clearer picture: the root of the problem isn’t just the factory
—it’s the town’s lack of economic diversity.

Using econometrics, you propose a solution. The


government should invest in training programs to help
workers gain new skills, and offer incentives for businesses
in different sectors to set up in the town. By diversifying
the local economy, the town can become more resilient to
changes in global markets.
What is Econometrics?
What is
Econometrics?

Econometrics
involves using
mathematics and
statistical methods
to measure and
The Nobel Prize in Economic Sciences has
analyze recognized the contribution of the field
with numerous awards to econometricians,
relationships including the first which was given to (the
between variables same) Ragnar Frisch in 1969, Lawrence
Klein in 1980, Trygve Haavelmo in 1989,
based on a theory. James Heckman and Daniel McFadden in
2000, and Robert Engle and Clive Granger
in 2003.
What is Econometrics?
A useful distinction is made between microeconometrics and
macroeconometrics.

Microeconometrics is characterized by its focus on individual


consumers, firms, and micro-level decision makers.

Examples

• Do smaller class sizes bring real benefits in student performance?

• Does the presence of health insurance induce individuals to make


heavier use of the health care system?
What is Econometrics?
Macroeconometrics is involved in the analysis of variables at the macro
level, such as price levels, the money supply, exchange rates, output,
investment, economic growth and so on.

Another useful distinction is between theoretical econometrics and


applied econometrics.

Theorists develop new techniques for estimation and hypothesis


testing and analyze the consequences of applying particular methods
when the assumptions that justify those methods are not met.

Applied econometricians are the users of these techniques and the


analysts of data.
LO / Contents
Session
Session 1 Introduction & Course Outline Discussions
LO1 1. Simple Linear Regression
Session 2 - 6 2. Multiple Linear Regression
3. Factors, Interactions, and Weights
4. Linear Regression with Time Series Data
5. Linear Regression with Panel Data
LO2 1.Regression Diagnostics
Session 7-10 2.Diagnostic Tests
3.Robust Standard Errors and Tests
MID TERM – I
LO3 1.Categorical Dependent Variables
Session 11 - 15 2.Logit Model
3.Probit Model
4.Multinomial Model
LO3 1.Stationarity, Unit Roots, and Cointegration
Session 16-19 2.Time Series Regression and Structural Change
3.Forecasting using Regression
4.Forecasting using ARIMA models
MID TERM – II
LO4 1.Simultaneous equation model
Session 21-24 2.Panel data models
3.Fama and Macbeth Regressions
4.Modeling using Garch Family
5.Quantile Regression
LO4 1. Instrumental Variable Regression
Session 25-28 2. Latest econometric models in economic disciplines
An Introduction to R
R is a command line
driven program. The
user enters commands
and each command is
executed one at a
time.
 RStudio provides a
user interface that
works as a code editor.
An Introduction to R
 R is much more flexible than most software used by econometricians
because it is a modern mathematical programming language, not just a
program that does regressions and tests. This means our analysis need not
be restricted to the functions included in the default package.
 There is an extensive and constantly expanding collection of libraries online
for use in many disciplines.
 Vocabulary Alert!
 Packages are collections of R functions, data, and compiled code in a well-defined format,
created to add specific functionality.
 The directories in R where the packages are stored are called the libraries.
 As researchers develop new algorithms and processes, the corresponding
libraries get posted on the R website. In this sense R is always at the
forefront of statistical knowledge.
Obtaining R
 The R installation program can be downloaded free of charge from
http://www.r-project.org.

 Other packages can be installed as well.

 Kindly join the google classroom to share the material.

 https://classroom.google.com/c/NjE3NDY
zNDAxODUy?cjc=fm3cnmu
 Class code: fm3cnmu
Data Storage Objects
 R allows you to create many types of data storage objects,
such as numbers, vectors, matrices, strings, and dataframes.
 The command ls() gives a list of all data objects currently
available.
 The command rm() removes the data object given it as an
argument.
 We can determine the type of an object using the command
typeof() or its class type (which is often more informative)
using class().
Vector and Dataframe
The most fundamental numeric data type in R is an unnamed vector.
Vector and Dataframe

#Data frames: The list of equal length vectors.


#Data Frames are data displayed in a format as a table.
#Data Frames can have different types of data inside it.
#While the first column can be character , the second and third
can be numeric or logical .
#However, each column should have the same type of data.
Sub-setting a vector and a Dataframe
Elements in vectors and similar data types are indexed using
square brackets.
More on Subsetting
More on Subsetting: Adding a Column
More on Subsetting: Adding a row
More on Subsetting
You can replace the values you sub-setted by setting it qual to the new object.
List Objects: List can store multiple dataframes, vectors, etc., and of various length.
Mathematical Operators in R
Task 1: Individual Tasks
 Suppose you have a list of 5 students (hypothetical Sr No. Stude Marks Marks Total myna Websi
list) and their marks in the 2 quizzes. nt Quiz 1 Quiz 2 Marks me te
 Create the DATAFRAME object in r as given Name
 Add a column with the title myname where the
column values will be your name.
 Remove Sr No. Column “take help from the
internet” sabeeh www.sack
exchange
 Replace the values in second row as NA’s (R uses .com
NA for missing values.)
sabeeh NA
 Your task involves searching over the internet to get
help! Mention the website that solves your problem Sabeeh NA
in a separate column with the column name as
website and the first value as “url”.
Sabeeh NA
 Save this file using write.table function. Use ?
write.table and save the file in your current
Sabeeh NA
directory. You need to use setwd() command to set
your current directory. Upload the file in google
classroom. sabeeh NA

write.table(df,
“lastname.csv”,sep=“,”,col.names=T,row.names=F)
Econometric Model
 First there is an idea of a relationship between some
variables.
 Individuals’ usage of the health care system depends on, for
example,
 perceived health status,
 demographics such as income, age, and education, and
 the amount and type of insurance they have.
 Specifically, is the relationship “positive”—all else equal, is an
insured consumer more likely to “demand more health care,” or is
it “negative”?
 And, ultimately, one might be interested in a more precise
statement, “how much more (or less)”?
The Regression Model
 The multiple linear regression model is used to study the
relationship between a dependent variable and one or more
independent variables. The generic form of the linear regression
model is

 Where y is the dependent or explained variable and x1, . . . , xK are the


independent or explanatory variables.
 This function is commonly called the population regression
equation of y on x1, . . . , xK. In this setting, y is the regressand and
xk, k=1, . . . ,K are the regressors or covariates. The underlying theory
will specify the dependent and independent variables in the model.
The Regression Model

 The term ε is a random disturbance, so named because it


“disturbs” an otherwise stable relationship.
 The disturbance arises for several reasons,
 Primarily because we cannot hope to capture every influence on
an economic variable in a model, no matter how elaborate.
 Or more appropriately because of errors of measurement.
 For example, the difficulty of obtaining reasonable measures of
profitability or size.
 At the extreme, there may be no observable counterpart to the
theoretical variable.
Assumptions of the Regression Model
Ordinary Least Squares (OLS)
Coefficient Estimates Standard Errors Estimate
Model Selection Criteria
 We are interested in the
goodness of fit of the fitted
regression line to a set of data.
 The coefficient of
r2 (two-
determination
variable case) or R2
(multiple regression) is
a summary measure that tells
how well the sample
regression line fits the data.
Model Selection Criteria
 Adjusted-R2
 It is good practice to use adjusted-R2 rather than R2 because R2 tends to give an overly
optimistic picture of the fit of the regression.

 Unlike R2, the adjusted R2 will increase only if the absolute t value of the added variable is
greater than 1. For comparative purposes, therefore, adjusted-R2 is a better measure than R2.

 Akaike Information Criterion (AIC)


 The idea of imposing a penalty for adding regressors to the model has been carried further in
the AIC criterion, which is defined as:
 In comparing two or more models, the model with the lowest value of AIC is preferred.
 There is no value for AIC that can be considered “good” or “bad” because we simply use AIC as
a way to compare regression models. The model with the lowest AIC offers the best fit. The
absolute value of the AIC value is not important.
Model Selection Criteria
 Schwarz Information Criterion (SIC)
 Similar in spirit to the AIC, the SIC criterion is defined as:

 SIC imposes a harsher penalty than AIC.

You might also like