TobinQ {pder} | R Documentation |
The Q Theory of Investment
Description
yearly observations of 188 firms from 1951 to 1985
number of observations : 6580
number of time-series : 35
country : United States
package : panel
Chapter : 02
Usage
data(TobinQ)
Format
A dataframe containing:
- cusip
compustat's identifying number
- year
year
- isic
sic industry classification
- ikb
investment divided by capital : broad definition
- ikn
investment divided by capital : narrow definition
- qb
Tobin's Q : broad definition
- qn
Tobin's Q : narrow definition
- kstock
capital stock
- ikicb
investment divided by capital with imperfect competition : broad definition
- ikicn
investment divided by capital with imperfect competition : narrow definition
- omphi
one minus phi (see the article p. 320)
- qicb
Tobin's Q with imperfect competition : broad definition
- qicn
Tobin's Q with imperfect competition : narrow definition
- sb
S (see equation 10 p. 320) : broad definition
- sn
S (see equation 10 p. 320) : narrow definition
Source
Journal of Applied Econometrics Data Archive : http://qed.econ.queensu.ca/jae/
References
Schaller, Huntley (1990) “A Re-examination of the Q Theory of Investment Using U.S. Firm Data”, Journal of Applied Econometrics, 5(4), 309–325, doi: 10.1002/jae.3950050402 .
Examples
#### Example 2-1
## ------------------------------------------------------------------------
## Not run:
library("plm")
data("TobinQ", package = "pder")
## ------------------------------------------------------------------------
pTobinQ <- pdata.frame(TobinQ)
pTobinQa <- pdata.frame(TobinQ, index = 188)
pTobinQb <- pdata.frame(TobinQ, index = c('cusip'))
pTobinQc <- pdata.frame(TobinQ, index = c('cusip', 'year'))
## ------------------------------------------------------------------------
pdim(pTobinQ)
## ----results = 'hide'----------------------------------------------------
pdim(TobinQ, index = 'cusip')
pdim(TobinQ)
## ------------------------------------------------------------------------
head(index(pTobinQ))
## ------------------------------------------------------------------------
Qeq <- ikn ~ qn
Q.pooling <- plm(Qeq, pTobinQ, model = "pooling")
Q.within <- update(Q.pooling, model = "within")
Q.between <- update(Q.pooling, model = "between")
## ------------------------------------------------------------------------
Q.within
summary(Q.within)
## ------------------------------------------------------------------------
head(fixef(Q.within))
head(fixef(Q.within, type = "dfirst"))
head(fixef(Q.within, type = "dmean"))
## ------------------------------------------------------------------------
head(coef(lm(ikn ~ qn + factor(cusip), pTobinQ)))
#### Example 2-2
## ------------------------------------------------------------------------
Q.swar <- plm(Qeq, pTobinQ, model = "random", random.method = "swar")
Q.swar2 <- plm(Qeq, pTobinQ, model = "random",
random.models = c("within", "between"),
random.dfcor = c(2, 2))
summary(Q.swar)
## ------------------------------------------------------------------------
ercomp(Qeq, pTobinQ)
ercomp(Q.swar)
## ------------------------------------------------------------------------
Q.walhus <- update(Q.swar, random.method = "swar")
Q.amemiya <- update(Q.swar, random.method = "amemiya")
Q.nerlove <- update(Q.swar, random.method = "nerlove")
Q.models <- list(swar = Q.swar, walhus = Q.walhus,
amemiya = Q.amemiya, nerlove = Q.nerlove)
sapply(Q.models, function(x) ercomp(x)$theta)
sapply(Q.models, coef)
#### Example 2-3
## ------------------------------------------------------------------------
sapply(list(pooling = Q.pooling, within = Q.within,
between = Q.between, swar = Q.swar),
function(x) coef(summary(x))["qn", c("Estimate", "Std. Error")])
## ------------------------------------------------------------------------
summary(pTobinQ$qn)
## ------------------------------------------------------------------------
SxxW <- sum(Within(pTobinQ$qn) ^ 2)
SxxB <- sum((Between(pTobinQ$qn) - mean(pTobinQ$qn)) ^ 2)
SxxTot <- sum( (pTobinQ$qn - mean(pTobinQ$qn)) ^ 2)
pondW <- SxxW / SxxTot
pondW
pondW * coef(Q.within)[["qn"]] +
(1 - pondW) * coef(Q.between)[["qn"]]
## ------------------------------------------------------------------------
T <- 35
N <- 188
smxt2 <- deviance(Q.between) * T / (N - 2)
sidios2 <- deviance(Q.within) / (N * (T - 1) - 1)
phi <- sqrt(sidios2 / smxt2)
## ------------------------------------------------------------------------
pondW <- SxxW / (SxxW + phi^2 * SxxB)
pondW
pondW * coef(Q.within)[["qn"]] +
(1 - pondW) * coef(Q.between)[["qn"]]
#### Example 2-8
## ------------------------------------------------------------------------
Q.models2 <- lapply(Q.models, function(x) update(x, effect = "twoways"))
sapply(Q.models2, function(x) sqrt(ercomp(x)$sigma2))
sapply(Q.models2, function(x) ercomp(x)$theta)
## End(Not run)