Skip to contents

Time series data on investments in the US, 1968–1982.

Usage

data("USInvest")

Format

An annual multiple time series from 1968 to 1982 with 4 variables.

gnp

Nominal gross national product,

invest

Nominal investment,

price

Consumer price index,

interest

Interest rate (average yearly discount rate at the New York Federal Reserve Bank).

Source

Online complements to Greene (2003). Table F3.1.

https://pages.stern.nyu.edu/~wgreene/Text/tables/tablelist5.htm

References

Greene, W.H. (2003). Econometric Analysis, 5th edition. Upper Saddle River, NJ: Prentice Hall.

See also

Examples

data("USInvest")

## Chapter 3 in Greene (2003)
## transform (and round) data to match Table 3.1
us <- as.data.frame(USInvest)
us$invest <- round(0.1 * us$invest/us$price, digits = 3)
us$gnp <- round(0.1 * us$gnp/us$price, digits = 3)
us$inflation <- c(4.4, round(100 * diff(us$price)/us$price[-15], digits = 2))
us$trend <- 1:15
us <- us[, c(2, 6, 1, 4, 5)]

## p. 22-24
coef(lm(invest ~ trend + gnp, data = us))
#> (Intercept)       trend         gnp 
#> -0.49459760 -0.01700063  0.64781939 
coef(lm(invest ~ gnp, data = us))
#> (Intercept)         gnp 
#> -0.03333061  0.18388271 

## Example 3.1, Table 3.2
cor(us)[1,-1]
#>     trend       gnp  interest inflation 
#> 0.7514213 0.8648613 0.5876756 0.4817416 
pcor <- solve(cor(us))
dcor <- 1/sqrt(diag(pcor))
pcor <- (-pcor * (dcor %o% dcor))[1,-1]

## Table 3.4
fm  <- lm(invest ~ trend + gnp + interest + inflation, data = us)
fm1 <- lm(invest ~ 1, data = us)
anova(fm1, fm)
#> Analysis of Variance Table
#> 
#> Model 1: invest ~ 1
#> Model 2: invest ~ trend + gnp + interest + inflation
#>   Res.Df       RSS Df Sum of Sq      F    Pr(>F)    
#> 1     14 0.0162736                                  
#> 2     10 0.0004394  4  0.015834 90.089 8.417e-08 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

## More examples can be found in:
## help("Greene2003")