grunfeld: Grunfeld (1958) investment dataset

grunfeldR Documentation

Grunfeld (1958) investment dataset

Description

Panel data on gross investment for 11 US firms over 20 years (1935–1954), originally from Grunfeld (1958). This is a classic panel dataset used for validating the IPCA estimator against the Python ipca package (Kelly, Pruitt, Su, 2019).

Usage

grunfeld

Format

A data.frame with 220 rows and 5 variables:

firm

Character; firm name (11 unique firms).

year

Integer; year of observation (1935–1954).

invest

Numeric; gross investment (millions of dollars).

value

Numeric; market value of the firm (millions of dollars).

capital

Numeric; stock of plant and equipment (millions of dollars).

Source

Grunfeld, Y. (1958). The Determinants of Corporate Investment. Ph.D. thesis, Department of Economics, University of Chicago. Loaded from the statsmodels Python package (statsmodels.datasets.grunfeld).

References

Kelly, B. T., Pruitt, S., and Su, Y. (2019). Characteristics are Covariances: A Unified Model of Risk and Return. Journal of Financial Economics, 134(3), 501–524. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jfineco.2019.05.001")}

Examples

head(grunfeld)

# Reshape for ipca_est(): T x N matrix and T x N x L array
firms <- sort(unique(grunfeld$firm))
years <- sort(unique(grunfeld$year))
N <- length(firms)
TT <- length(years)

ret <- matrix(NA, TT, N)
Z   <- array(NA, dim = c(TT, N, 2))
for (i in seq_along(firms)) {
  idx <- grunfeld$firm == firms[i]
  ret[, i]  <- grunfeld$invest[idx]
  Z[, i, 1] <- grunfeld$value[idx]
  Z[, i, 2] <- grunfeld$capital[idx]
}

fit <- ipca_est(ret, Z, nfac = 1)
print(fit)

sdim documentation built on July 15, 2026, 1:10 a.m.