Download Graphing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Graphics for Macroeconomics
Principles
• Graphing is done best when it clearly
communicates ideas about data
• Focus on the main point while preventing
distractions
Volatility
• Volatility makes it hard to see trends
– Example from coin data
Figure 7
Total Net Pay
3.50
3.00
Billions of coins
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
1957 1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001 2003
Date
Figure 7
Total Net Pay (12-month moving average)
2.5
Billions of coins
2
1.5
1
0.5
0
1957 1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001 2003
Date
Figure 7
Total Net Pay
3.50
3.00
Billions of coins
2.50
2.00
1.50
1.00
0.50
0.00
-0.50
-1.00
1957 1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001 2003
Date
Date
2001
1998
1995
1992
1989
1986
1983
1980
1977
1974
1971
1968
1965
1962
1959
Billions of coins
Figure 3.3
Annual Demand for New Coins
25
20
15
10
5
0
Scatter plots
• Scatter plots help you see the relationship
between variables
• Time series plots vs. scatter plots
Time-series plot
Consumption and Income
9000
8000
Real Personal
Disposable Income
6000
5000
4000
Real Consumption
Expenditures
3000
2000
1000
Date
2004
2001
1998
1995
1992
1989
1986
1983
1980
1977
1974
1971
1968
1965
1962
1959
1956
1953
1950
0
1947
Billions of 2000 dollars
7000
Scatter Plot
Consumption & Income
9000.0
8000.0
Consumption (billions of 2000 dollars)
7000.0
6000.0
5000.0
4000.0
3000.0
2000.0
1000.0
0.0
0.0
1000.0
2000.0
3000.0
4000.0
5000.0
Income (billions of 2000 dollars)
6000.0
7000.0
8000.0
9000.0
Time-series plots on same scale
V2 & Opportunity Cost
2
1
V2
log (V2) & log (OC2MA)
0
-1
-2
-3
Log (Opportunity Cost)
-4
-5
-6
1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001
Date
Scatter plot
V2 & Opportunity Cost
0.8
0.75
0.7
Log (V2)
0.65
0.6
0.55
0.5
0.45
0.4
-6
-5.5
-5
-4.5
-4
-3.5
Log (Opportunity Cost)
-3
-2.5
-2
V2 & Opportunity Cost (1959Q3-1990Q4)
0.8
0.75
0.7
Log (V2)
0.65
0.6
0.55
0.5
0.45
0.4
-6
-5.5
-5
-4.5
-4
-3.5
Log (Opportunity Cost)
-3
-2.5
-2
V2 & Opportunity Cost (1991Q1-2002Q2)
0.8
0.75
0.7
Log (V2)
0.65
0.6
0.55
0.5
0.45
0.4
-6
-5.5
-5
-4.5
-4
-3.5
Log (Opportunity Cost)
-3
-2.5
-2
Elements of Graphical Style
• Know your audience & know your goals
• Show the data and appeal to the viewer
– Minimize non-data ink
– Avoid chart junk
• Revise and edit, again and again
Non-data ink
V2 & Opportunity Cost (1991Q1-2002Q2)
0.8
Log (V2)
0.757388562
0.75469562
0.74986373
0.749542192
0.748614004
0.743797168
0.738742484
0.738624376
0.738345812
0.734706667
0.733796455
0.73151818
0.730741368
0.729475493
0.726220675
0.725828236
0.724913643
0.724351113
0.722298957
0.721592715
0.720722354
0.715587749
0.715515828
0.714824043
0.707762182
0.70759967
0.696244274
0.691240894
0.680683197
0.670599389
0.66963651
0.655360665
0.651915538
0.644887458 0.64733339
0.634236405
0.630800933
0.629497594
0.627905563
0.621545118
0.612308964
0.598061373
0.589998097
0.581888966
0.576964391
0.575751535
-6
-5.5
-5
0.75
0.7
0.65
Note that after 1990, the pattern of
0.6
velocity and opportunity cost
changed significantly, with0.55a
couple of years of transition and a
new pattern to the slope. 0.5The new
intercept was much higher0.45than the
old one and thus the relationship
0.4
changed
so
more
-4.5
-4
-3.5
-3 that it
-2.5was much
-2
Log (Opportunity difficult
Cost)
to use the model for
forecasting.
2001
1998
1995
1992
1989
1986
1983
Date
1980
1977
1974
1971
1968
1965
1962
1959
Billions of coins
Chartjunk
Figure 3.3
Annual Demand for New Coins
25
20
15
10
5
0
National Net Pay
Chartjunk
• Don’t use 3
dimensions for a 2dimensional object
• Don’t add
decorations, cartoons,
etc. that do not tell
your story
Hi, I’m
irrelevant!
Make graphs tell your story
• The golden ratio of height to width is 0.618
• Use scale to show variations in a variable
log(V2)
5
4.5
4
3.5
log (V2)
3
2.5
Velocity is very stable
2
1.5
1
0.5
0
1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001
Date
log(V2)
0.8
0.75
0.7
Or is it unstable?
log (V2)
0.65
0.6
0.55
0.5
0.45
0.4
1959 1961 1963 1965 1967 1969 1971 1973 1975 1977 1979 1981 1983 1985 1987 1989 1991 1993 1995 1997 1999 2001
Date
Use colors to split data
Figure 18.18
The Shifting Short-Run Phillips Curve
16
14
12
Inflation Rate
10
8
6
PC(1974-1983)
4
PC(1984-1996)
2
0
PC(1948-1965, 1997-2003)
-2
-4
0
2
4
6
Unemployment Rate
8
10
12
Beware of Outliers
• Measurement outliers
– Data errors
• Innovation outliers
– A shock or innovation
Date
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987
1986
1985
1984
1983
1982
1981
1980
1979
1978
1977
1976
1975
1974
1973
1972
1971
1970
1969
1968
1967
1966
1965
1964
1963
1962
1961
1960
Unemployment rate (percent)
Figure 18.6
Unemployment Rate
12
10
8
6
4
2
0
Figure 18.19
Expectations-Augmented Phillips Curve from 1960 to 2003
8
1974
6
1979
Inflation Surprise
1973
4
2
0
-2
-4
-4
-3
-2
-1
0
Unemployment Gap
1
2
3
4
Excess Reserves
20
18
16
14
$ billions
12
10
8
6
4
2
0
Jan90
Jan91
Jan92
Jan93
Jan94
Jan95
Jan96
Jan97
Jan98
Date (monthly data)
Jan99
Jan00
Jan01
Jan02
Jan03
Jan04
Adding recession bars
• See instruction sheet; useful to keep
around
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
Real GDP Growth Rate
(percent)
Economic Liftoff
Reorganization
14
10
Unemployment Rate
right scale
8
8
6
4
6
2
4
0
-2
Real GDP Growth Rate
left scale
2
-4
0
Date
Unemployment Rate
(percent)
Figure 10.10
Output Growth and the Unemployment Rate
Quarterly, 1949:Q3 to 2003:Q4
Long Boom
12
12
10
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
Real GDP Growth Rate
(percent)
Economic Liftoff
Reorganization
14
10
Unemployment Rate
right scale
8
8
6
4
6
2
4
0
-2
Real GDP Growth Rate
left scale
2
-4
0
Date
Unemployment Rate
(percent)
Figure 10.10
Output Growth and the Unemployment Rate
Quarterly, 1949:Q3 to 2003:Q4
Long Boom
12
12
10
Graphs as diagnostics for
regressions
• Plot actual and fitted values; residuals
over time
• Plot residuals squared or absolute values
of residuals over time (solutions:
interactive data analysis)
• Do a scatter plot of residual vs.
explanatory variable
Example: consumption & income
• We can save residuals and do plots of
residuals themselves, actual & predicted,
residuals vs. explanatory variables
• Later, using saved residuals, we can plot
squares and absolute values
• Note that non-random residuals suggests
that a non-linear model may be better
Plotting from FRED
• FRED graphs are nice
Plotting from FRED
• Sometimes you need to make your own
graphs
• Download FRED data to make graph
• What’s wrong with this graph?
Critique this graph
•
•
•
•
No title
Bad dates
Trailing zeroes on y axis
Legend takes up too much space
Time-Series Graphs
• Choose a scale to make the graph
informative
– Especially levels vs. growth rates
– Which is best depends on purpose
• Sometimes best to show level for long-term issues
• Other times best to show growth rate for cyclical
issues
Nominal or Real?
• Nominal variables of economic activity
should never be plotted
– You don’t know what is real activity and what
is caused by higher prices
– Only plot nominal variables for which it makes
sense to do so: money supply, price level
– Example: plot real GDP, not nominal GDP
– Example: plot ratios of nominal variables,
such as government debt/GDP
Related documents