Econ 1-2
Econ 1-2
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.
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.
Examples
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
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
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.