Wednesday, January 8, 2014

A Few Interesting Timeseries

Proud Economy 0012

Proud Economy 0012

econ307classnotes01

This time I'm just going to extract data for a few interesting timeseries that we need for our initial simple modeling and demonstrate extracting them live from the web.

library(quantmod)
seriesnames <- c("GDPMC1", "UNRATE", "CPIAUCSL", "FYFSD", "FYGFD", "GFDEGDQ188S", 
    "M1NS", "FEDFUNDS")
sapply(seriesnames, function(.m.) eval(parse(text = paste("setSymbolLookup(", 
    .m., "='FRED')"))))
getSymbols(seriesnames)
## [1] "GDPMC1"      "UNRATE"      "CPIAUCSL"    "FYFSD"       "FYGFD"      
## [6] "GFDEGDQ188S" "M1NS"        "FEDFUNDS"

Real Gross Domestic Product (GDPMC1)

So we have lost forever a half decade of wealth creation and still counting! Who's responsible?

FRED: Real Gross Domestic Product (GDPMC1)

chartSeries(GDPMC1, theme = "white", subset = "2000/", name = "Real Gross Domestic Product (GDPMC1)")

plot of chunk unnamed-chunk-4

Civilian Unemployment Rate (UNRATE)

What a waste!

FRED: Civilian Unemployment Rate (UNRATE)

chartSeries(UNRATE, theme = "white", subset = "2000/", name = "Civilian Unemployment Rate (UNRATE)")

plot of chunk unnamed-chunk-5

Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)

Here is a naturally occuring deflation experiment.

FRED: Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)

chartSeries(CPIAUCSL, theme = "white", subset = "2000/", name = "Consumer Price Index for All Urban Consumers: All Items (CPIAUCSL)")

plot of chunk unnamed-chunk-6

Federal Surplus or Deficit -

Deficit caused by your recession comes from the stimulus, the unemployment insurance paid, and the reduction in taxes collected. So making the recession worse by heavy government austerity won't turn that around.

FRED: Federal Surplus or Deficit [-] (FYFSD)

chartSeries(FYFSD, theme = "white", subset = "1970/", name = "Federal Surplus or Deficit [-] (FYFSD)")

plot of chunk unnamed-chunk-7

Gross Federal Debt (FYGFD)

The Federal Debt looks bad, but what about the public's huge wealth loss. If you don't fix that, we'll have another French Revolution.

FRED: Gross Federal Debt (FYGFD)

chartSeries(FYGFD, theme = "white", subset = "2000/", name = "Gross Federal Debt (FYGFD)")

plot of chunk unnamed-chunk-8

Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)

FRED: Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)

chartSeries(GFDEGDQ188S, theme = "white", subset = "2000/", name = "Federal Debt: Total Public Debt as Percent of Gross Domestic Product (GFDEGDQ188S)")

plot of chunk unnamed-chunk-9

M1 Money Stock (M1NS)

The Fed has had to pump the money supply, since Congress and the President aren't doing sufficient fiscal stimulus.

FRED: M1 Money Stock (M1NS)

chartSeries(M1NS, theme = "white", subset = "2000/", name = "M1 Money Stock (M1NS)")

plot of chunk unnamed-chunk-10

Effective Federal Funds Rate (FEDFUNDS)

Look at that zero lower bound. That's what Paul Krugman has been talking about for the past few years.

FRED: Effective Federal Funds Rate (FEDFUNDS)

chartSeries(FEDFUNDS, theme = "white", subset = "2000/", name = "Effective Federal Funds Rate (FEDFUNDS)")

plot of chunk unnamed-chunk-11

Gary Young (proudindiv)

Tuesday, December 24, 2013

Sources of Macroeconomic Data

Proud Economy 0011

Bureau of Economic Analysis, U.S. Department of Commerce (BEA)

Concepts and Methods of the U.S. National Income and Product Accounts:

The national income and product accounts (NIPAs) are one of the three major elements of the U.S. national economic accounts. The NIPAs display the value and composition of national output and the distribution of incomes generated in its production.

The other major elements of the U.S. national economic accounts are the industry accounts, which are also prepared by the Bureau of Economic Analysis (BEA), and the flow of funds accounts, which are prepared by the Federal Reserve Board. The industry accounts consist of the input-output (I-O) accounts, which trace the flow of goods and services among industries in the production process and which show the value added by each industry and the detailed commodity composition of national output, and the gross domestic product (GDP) by industry accounts, which measure the contribution of each private industry and of government to GDP. The flow of funds accounts record the acquisition of nonfinancial and financial assets (and the incurrence of liabilities) throughout the U.S. economy, the sources of the funds used to acquire those assets, and the value of assets held and of liabilities owed.

In addition, BEA prepares two other sets of U.S. economic accounts: the international accounts, which consist of the international transactions (balance of payments) accounts and the international investment position accounts; and the regional accounts, which consist of the estimates of GDP by state and by metropolitan area, of state personal income, and of local area personal income. Finally, the U.S. Bureau of Labor Statistics prepares estimates of productivity for the U.S. economy (which are partly based on the estimates of GDP). Altogether, the system of U.S. economic accounts presents a coherent, comprehensive, and consistent picture of U.S. economic activity Labor Statistics prepares estimates of productivity for the U.S. economy (which are partly based on the estimates of GDP). Altogether, the system of U.S. economic accounts presents a coherent, comprehensive, and consistent picture of U.S. economic activity.

(Download NIPA Tables)
(Gross-Domestic-Product-(GDP)-by-Industry Data)
(Regional Economic Accounts: Download CSV)
(Direct Investment and Multinational Companies: Comprehensive data)


A Primer on BEA’s Industry Accounts By Mary L. Streitwieser:

BEA’s industry accounts—which include the annual and benchmark input-output (I-O) accounts, the GDP by industry accounts, the KLEMS statistics, and satel­ lite accounts—provide answers to such questions. Broadly speaking, the accounts facilitate the study of the internal workings of the U.S. economy.

Concepts and Methods of the Input-Output Accounts by Karen J. Horowitz and Mark A. Planting:

The input-output (I-O) accounts are an integral and essential element of the U.S. economic accounts. First, they are the building blocks for other economic accounts. Prominent among these are BEA’s national income and product accounts (NIPAs), which feature the estimates of gross domestic product (GDP). Second, the I-O accounts provide detailed statistics on economic processes and relationships. They incorporate a complete, balanced set of economic statistics, and they present a full accounting of industry and final-use transactions.

Board of Governors of the Federal Reserve System

(Data Download Program)
(Complete table listing)

Financial Accounts Guide

This interactive documentation serves as a guide to the data compiled and published as part of the “Financial Accounts of the United States” (Z.1) data release, previously called the “Flow of Funds Accounts of the United States”. The Z.1 includes flow of funds, balance sheet, and integrated macroeconomic account data. This comprehensive documentation system is designed to help a user understand the links between series and underlying source data by providing the capability to search or browse the vast amount of information underlying the Z.1.

The U.S. Flow of Funds Accounts and Their Uses by Albert M. Teplin

In simple terms, the flow of funds accounts measure financial flows across sectors of the economy, tracking funds as they move from those sectors that serve as sources of capital, through intermediaries (such as banks, mutual funds, and pension funds), to sectors that use the capital to acquire physical and financial assets. With data extending back more than half a century, the accounts provide a broadly consistent set of time-series data for measuring financial flows in the economy.

Gary Young (proudindiv)

Monday, December 23, 2013

Examining "Macroeconometric Modeling by Ray C. Fair"

Proud Economy 0010

This looks like something that I wanted to learn back in the 1970's, but was unable to get into. I started programming in 1967 and worked at the Federal Reserve Bank of San Francisco for a while. I became aware of their economists and econometric modeling, but I was in the wrong world to break into that field.

Professor Fair's information looks like he has been there and he has made his information available on the internet at "fairmodel.econ.yale.edu". Now I wonder if one could use his work to reconstruct something like his model from scratch and use that to learn about macroeconomics?

Reading Fair's "Reflections on Macroeconometric Modeling", July 2013, it sounds like he is talking about the right stuff, but I don't understand it enough to evaluate it at all. I would start with a naive approach, see how much of Fair's model I can understand and extract, and attempt to formulate an infrastructure to build my versions.

Starting with "The US Model Appendix A" sectors

  • Households
  • Firms
  • Financial Institutions
  • Foreign Entities
  • Government
we can then sort out the variables (about 350) and equations (188 of them). The "The Fair-Parke Program" appears to contain the Fortran code and all of data that is used to run the models at "The US Model" and "The MCI Model".

More as I get to it

Gary Young (proudindiv)

Federal Reserve Economic Data - FRED - St. Louis Fed

Proud Economy 0009

Saturday, June 29, 2013

Modeling

Modeling

Modeling

Proud Economy 0008

“The model is generally referred to as an ARIMA(p,d,q) model where parameters p, d, and q are non-negative integers that refer to the order of the autoregressive, integrated, and moving average parts of the model respectively. ARIMA models form an important part of the Box-Jenkins approach to time-series modelling.” wikipedia

I first learned about ARIMA models by taking an econometrics course at the University of Washington in 1976 (I think) from Charles R. Nelson. I took the class as a hobby and never followed up on it, even though I've thought about the material much. Along with the original “Time series analysis: Forecasting and control” by George Box and Gwilym Jenkins (1970, Holden-Day), we used Nelson's “Applied Time Series Analysis for Managerial Forecasting” and in the cover of my copy, which I still have, are a couple of hand written programs for an HP55 programable calculator. 1976 was pre-personal computers, so computer access was by submitting batch jobs on punch cards at the university computer center and picking up the output listing the next day. I had a new HP55 programmable calculator. Wow, this dates me, but it explains the direction that I've been taking my posts in the blog. There are now lots of standard econometrics textbooks with the ARIMA models.

Professor Nelson, now apparently retired, still has a presence on the UW Econ site, with his Student Help Page. That links to related information at Professor Fair's site at Yale and his thoughts on Macroeconometric Modeling. These can be used as references for macroeconomics and modeling, along with the wikipedia. I'm rambling in this post and have strayed from the ARIMA models, but this is the type of information that I had hoped to find for the blog.

Gary Young

Friday, June 28, 2013

Vector autoregressions

Vector autoregressions

Vector autoregressions

Proud Economy 0007

Looking at “Forecasting: principles and practice: An online textbook by Rob J Hyndman and George Athanasopoulos, they have an example similiar to what I was thinking about in a couple of the prior posts using the vars R package. These use multiple time series in a forecast.

Using these libraries:

library(fpp)
library(vars)

Their section 9/2 Vector autoregressions contains R code like this:

VARselect(usconsumption, lag.max = 8, type = "const")$selection
## AIC(n)  HQ(n)  SC(n) FPE(n) 
##      5      1      1      5
var <- VAR(usconsumption, p = 3, type = "const")
serial.test(var, lags.pt = 10, type = "PT.asymptotic")
## 
##  Portmanteau Test (asymptotic)
## 
## data:  Residuals of VAR object var
## Chi-squared = 33.38, df = 28, p-value = 0.2219
## $serial
## 
##  Portmanteau Test (asymptotic)
## 
## data:  Residuals of VAR object var
## Chi-squared = 33.38, df = 28, p-value = 0.2219
summary(var)
## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: consumption, income 
## Deterministic variables: const 
## Sample size: 161 
## Log Likelihood: -338.797 
## Roots of the characteristic polynomial:
## 0.767 0.553 0.524 0.524 0.318 0.318
## Call:
## VAR(y = usconsumption, p = 3, type = "const")
## 
## 
## Estimation results for equation consumption: 
## ============================================ 
## consumption = consumption.l1 + income.l1 + consumption.l2 + income.l2 + consumption.l3 + income.l3 + const 
## 
##                Estimate Std. Error t value Pr(>|t|)    
## consumption.l1   0.2228     0.0858    2.60   0.0103 *  
## income.l1        0.0404     0.0623    0.65   0.5180    
## consumption.l2   0.2014     0.0900    2.24   0.0267 *  
## income.l2       -0.0983     0.0641   -1.53   0.1273    
## consumption.l3   0.2351     0.0882    2.66   0.0085 ** 
## income.l3       -0.0242     0.0614   -0.39   0.6944    
## const            0.3197     0.0912    3.51   0.0006 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.63 on 154 degrees of freedom
## Multiple R-Squared: 0.218,   Adjusted R-squared: 0.188 
## F-statistic: 7.17 on 6 and 154 DF,  p-value: 9.38e-07 
## 
## 
## Estimation results for equation income: 
## ======================================= 
## income = consumption.l1 + income.l1 + consumption.l2 + income.l2 + consumption.l3 + income.l3 + const 
## 
##                Estimate Std. Error t value Pr(>|t|)    
## consumption.l1   0.4871     0.1164    4.19  4.8e-05 ***
## income.l1       -0.2488     0.0845   -2.94  0.00374 ** 
## consumption.l2   0.0322     0.1221    0.26  0.79213    
## income.l2       -0.1111     0.0870   -1.28  0.20317    
## consumption.l3   0.4030     0.1197    3.37  0.00096 ***
## income.l3       -0.0915     0.0833   -1.10  0.27348    
## const            0.3628     0.1237    2.93  0.00386 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 0.855 on 154 degrees of freedom
## Multiple R-Squared: 0.211,   Adjusted R-squared: 0.18 
## F-statistic: 6.87 on 6 and 154 DF,  p-value: 1.76e-06 
## 
## 
## 
## Covariance matrix of residuals:
##             consumption income
## consumption       0.397  0.196
## income            0.196  0.731
## 
## Correlation matrix of residuals:
##             consumption income
## consumption       1.000  0.364
## income            0.364  1.000
fcst <- forecast(var)
plot(fcst, xlab = "Year")

plot of chunk unnamed-chunk-3

Conference Boards referenced datasets as in my prior post:

Now to format our data to do the same.

library(xts)
library(Quandl)
# Quandl.auth('yourauthenticationtoken')
getts <- function(series, name) {
    y <- Quandl(series, collapse = "quarterly", type = "xts", start_date = "1992-01-01", 
        end_date = "2013-01-31")
    names(y)[1] <- name
    return(y)
}
gdp <- getts("FRED/GDPC1", "gdp")
pce <- getts("FRED/PCE", "pce")
houst <- getts("FRED/HOUST", "houst")
atcgno <- getts("FRED/ATCGNO", "atcgno")
bopgstb <- getts("FRED/BOPGSTB", "bopgstb")
USeconomy <- cbind(gdp, pce, houst, atcgno, bopgstb)
summary(USeconomy)
##      Index                 gdp             pce            houst     
##  Min.   :1992-03-31   Min.   : 8151   Min.   : 4156   Min.   : 505  
##  1st Qu.:1997-06-30   1st Qu.: 9801   1st Qu.: 5527   1st Qu.:1046  
##  Median :2002-09-30   Median :11587   Median : 7482   Median :1475  
##  Mean   :2002-09-29   Mean   :11357   Mean   : 7637   Mean   :1368  
##  3rd Qu.:2007-12-31   3rd Qu.:12949   3rd Qu.: 9745   3rd Qu.:1649  
##  Max.   :2013-01-01   Max.   :13726   Max.   :11290   Max.   :2151  
##      atcgno          bopgstb      
##  Min.   : 44972   Min.   :-64214  
##  1st Qu.: 59285   1st Qu.:-46860  
##  Median : 67165   Median :-34269  
##  Mean   : 68753   Mean   :-32265  
##  3rd Qu.: 80431   3rd Qu.:-10475  
##  Max.   :102161   Max.   : -2641
VARselect(USeconomy, lag.max = 8, type = "const")$selection
## AIC(n)  HQ(n)  SC(n) FPE(n) 
##      2      2      2      2
var <- VAR(USeconomy, p = 2, type = "const")
serial.test(var, lags.pt = 10, type = "PT.asymptotic")
## 
##  Portmanteau Test (asymptotic)
## 
## data:  Residuals of VAR object var
## Chi-squared = 226, df = 200, p-value = 0.1002
## $serial
## 
##  Portmanteau Test (asymptotic)
## 
## data:  Residuals of VAR object var
## Chi-squared = 226, df = 200, p-value = 0.1002
summary(var)
## 
## VAR Estimation Results:
## ========================= 
## Endogenous variables: gdp, pce, houst, atcgno, bopgstb 
## Deterministic variables: const 
## Sample size: 83 
## Log Likelihood: -2971.243 
## Roots of the characteristic polynomial:
##    1 0.935 0.935 0.926 0.717 0.717 0.412 0.358 0.358 0.0955
## Call:
## VAR(y = USeconomy, p = 2, type = "const")
## 
## 
## Estimation results for equation gdp: 
## ==================================== 
## gdp = gdp.l1 + pce.l1 + houst.l1 + atcgno.l1 + bopgstb.l1 + gdp.l2 + pce.l2 + houst.l2 + atcgno.l2 + bopgstb.l2 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## gdp.l1      9.33e-01   1.47e-01    6.35  1.7e-08 ***
## pce.l1      4.45e-01   1.39e-01    3.19   0.0021 ** 
## houst.l1    5.39e-02   7.25e-02    0.74   0.4598    
## atcgno.l1   9.84e-04   1.02e-03    0.97   0.3359    
## bopgstb.l1  1.62e-03   2.02e-03    0.80   0.4273    
## gdp.l2      2.38e-02   1.40e-01    0.17   0.8656    
## pce.l2     -3.78e-01   1.39e-01   -2.71   0.0084 ** 
## houst.l2    7.13e-02   8.09e-02    0.88   0.3807    
## atcgno.l2  -1.41e-03   1.02e-03   -1.38   0.1716    
## bopgstb.l2  2.42e-03   2.00e-03    1.21   0.2306    
## const      -1.76e+00   1.80e+02   -0.01   0.9922    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 59.5 on 72 degrees of freedom
## Multiple R-Squared: 0.999,   Adjusted R-squared: 0.999 
## F-statistic: 6.61e+03 on 10 and 72 DF,  p-value: <2e-16 
## 
## 
## Estimation results for equation pce: 
## ==================================== 
## pce = gdp.l1 + pce.l1 + houst.l1 + atcgno.l1 + bopgstb.l1 + gdp.l2 + pce.l2 + houst.l2 + atcgno.l2 + bopgstb.l2 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## gdp.l1      3.92e-01   1.60e-01    2.46    0.016 *  
## pce.l1      9.83e-01   1.51e-01    6.49  9.6e-09 ***
## houst.l1   -3.33e-02   7.87e-02   -0.42    0.673    
## atcgno.l1   2.73e-05   1.10e-03    0.02    0.980    
## bopgstb.l1  3.81e-04   2.20e-03    0.17    0.863    
## gdp.l2     -3.58e-01   1.53e-01   -2.35    0.021 *  
## pce.l2      1.02e-02   1.51e-01    0.07    0.947    
## houst.l2    5.79e-02   8.78e-02    0.66    0.512    
## atcgno.l2  -1.08e-03   1.11e-03   -0.97    0.335    
## bopgstb.l2  6.47e-04   2.17e-03    0.30    0.767    
## const      -1.94e+02   1.96e+02   -0.99    0.325    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 64.6 on 72 degrees of freedom
## Multiple R-Squared: 0.999,   Adjusted R-squared: 0.999 
## F-statistic: 9.37e+03 on 10 and 72 DF,  p-value: <2e-16 
## 
## 
## Estimation results for equation houst: 
## ====================================== 
## houst = gdp.l1 + pce.l1 + houst.l1 + atcgno.l1 + bopgstb.l1 + gdp.l2 + pce.l2 + houst.l2 + atcgno.l2 + bopgstb.l2 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## gdp.l1      5.57e-03   2.57e-01    0.02     0.98    
## pce.l1      1.93e-01   2.44e-01    0.79     0.43    
## houst.l1    9.12e-01   1.27e-01    7.19  4.8e-10 ***
## atcgno.l1  -1.33e-03   1.78e-03   -0.75     0.46    
## bopgstb.l1  3.40e-03   3.54e-03    0.96     0.34    
## gdp.l2      4.37e-02   2.46e-01    0.18     0.86    
## pce.l2     -2.09e-01   2.44e-01   -0.86     0.39    
## houst.l2    6.99e-02   1.41e-01    0.49     0.62    
## atcgno.l2  -1.21e-03   1.78e-03   -0.68     0.50    
## bopgstb.l2 -6.53e-04   3.50e-03   -0.19     0.85    
## const      -1.65e+02   3.15e+02   -0.52     0.60    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 104 on 72 degrees of freedom
## Multiple R-Squared: 0.954,   Adjusted R-squared: 0.948 
## F-statistic:  150 on 10 and 72 DF,  p-value: <2e-16 
## 
## 
## Estimation results for equation atcgno: 
## ======================================= 
## atcgno = gdp.l1 + pce.l1 + houst.l1 + atcgno.l1 + bopgstb.l1 + gdp.l2 + pce.l2 + houst.l2 + atcgno.l2 + bopgstb.l2 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## gdp.l1      4.12e+00   1.43e+01    0.29  0.77404    
## pce.l1      5.84e+01   1.36e+01    4.29  5.4e-05 ***
## houst.l1   -2.00e+01   7.06e+00   -2.83  0.00596 ** 
## atcgno.l1   3.84e-01   9.90e-02    3.89  0.00023 ***
## bopgstb.l1 -8.74e-03   1.97e-01   -0.04  0.96478    
## gdp.l2     -9.36e+00   1.37e+01   -0.68  0.49622    
## pce.l2     -5.17e+01   1.36e+01   -3.81  0.00029 ***
## houst.l2    2.63e+01   7.88e+00    3.33  0.00135 ** 
## atcgno.l2   3.49e-01   9.94e-02    3.51  0.00077 ***
## bopgstb.l2  1.56e-01   1.95e-01    0.80  0.42522    
## const       1.89e+04   1.76e+04    1.08  0.28534    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 5800 on 72 degrees of freedom
## Multiple R-Squared: 0.848,   Adjusted R-squared: 0.827 
## F-statistic: 40.2 on 10 and 72 DF,  p-value: <2e-16 
## 
## 
## Estimation results for equation bopgstb: 
## ======================================== 
## bopgstb = gdp.l1 + pce.l1 + houst.l1 + atcgno.l1 + bopgstb.l1 + gdp.l2 + pce.l2 + houst.l2 + atcgno.l2 + bopgstb.l2 + const 
## 
##             Estimate Std. Error t value Pr(>|t|)    
## gdp.l1     -4.25e+00   7.09e+00   -0.60  0.55130    
## pce.l1     -3.00e+01   6.73e+00   -4.45  3.0e-05 ***
## houst.l1   -2.85e+00   3.50e+00   -0.81  0.41781    
## atcgno.l1  -7.33e-02   4.90e-02   -1.49  0.13942    
## bopgstb.l1  7.38e-01   9.78e-02    7.55  1.1e-10 ***
## gdp.l2      5.09e-01   6.78e+00    0.08  0.94033    
## pce.l2      3.10e+01   6.73e+00    4.61  1.7e-05 ***
## houst.l2    1.01e+00   3.91e+00    0.26  0.79646    
## atcgno.l2   1.83e-01   4.93e-02    3.71  0.00041 ***
## bopgstb.l2  7.18e-02   9.67e-02    0.74  0.45974    
## const       2.56e+04   8.70e+03    2.94  0.00439 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Residual standard error: 2870 on 72 degrees of freedom
## Multiple R-Squared: 0.981,   Adjusted R-squared: 0.978 
## F-statistic:  369 on 10 and 72 DF,  p-value: <2e-16 
## 
## 
## 
## Covariance matrix of residuals:
##              gdp    pce houst   atcgno   bopgstb
## gdp      3535.64   2448  2171    93577 -6.73e+00
## pce      2448.09   4172  2569    47103 -4.54e+04
## houst    2171.30   2569 10821    21586  3.27e+04
## atcgno  93576.88  47103 21586 33588697  5.13e+04
## bopgstb    -6.73 -45358 32702    51264  8.25e+06
## 
## Correlation matrix of residuals:
##               gdp    pce  houst  atcgno   bopgstb
## gdp      1.00e+00  0.637 0.3510 0.27154 -3.94e-05
## pce      6.37e-01  1.000 0.3823 0.12582 -2.45e-01
## houst    3.51e-01  0.382 1.0000 0.03581  1.09e-01
## atcgno   2.72e-01  0.126 0.0358 1.00000  3.08e-03
## bopgstb -3.94e-05 -0.245 0.1095 0.00308  1.00e+00
# str(var)
plot(var)

plot of chunk unnamed-chunk-8 plot of chunk unnamed-chunk-8 plot of chunk unnamed-chunk-8 plot of chunk unnamed-chunk-8 plot of chunk unnamed-chunk-8 plot of chunk unnamed-chunk-8

fcstUSeconomy <- forecast(var)
## Error: non-numeric argument to mathematical function
# plot(fcstUSeconomy)

The results as far as they got look like what I was expecting. There isn't much hint as to why 'forecast' gets the error though.

Gary Young