ConsumptionG {momentfit} | R Documentation |
Consumption data from Greene (2012) applications.
Description
Quarterly macroeconomic US data from 1950 to 2000.
Usage
data("ConsumptionG")
Format
A data frame with 204 observations on the following 14 variables.
YEAR
Year
QTR
Quarter
REALGDP
Read GDP
REALCONS
Real Consumption
REALINVS
Real Investment
REALGOVT
Real public expenditure
REALDPI
ector
CPI_U
CPI
M1
Money stock
TBILRATE
Interest rate
UNEMP
Unemployment rate
POP
Population
INFL
Inflation
REALINT
Real interest rate.
Source
Greene (2012) online resources: (http://pages.stern.nyu.edu/~wgreene/Text/Edition7/tablelist8new.htm)
References
Green, W.H.. (2012). Econometric Analysis, 7th edition, Prentice Hall.
Examples
data(ConsumptionG)
## Get the data ready for Table 8.2 of Greene (2012)
Y <- ConsumptionG$REALDPI
C <- ConsumptionG$REALCONS
n <- nrow(ConsumptionG)
Y1 <- Y[-c(1,n)]; Y2 <- Y[-c(n-1,n)]; Y <- Y[-c(1:2)]
C1 <- C[-c(1,n)]; C <- C[-(1:2)]
dat <- data.frame(Y=Y,Y1=Y1,Y2=Y2,C=C,C1=C1)
## Starting at the NLS estimates (from the table)
theta0=c(alpha=468, beta=0.0971, gamma=1.24)
## Greene (2012) seems to assume iid errors (probably wrong assumption here)
model <- momentModel(C~alpha+beta*Y^gamma, ~C1+Y1+Y2, data=dat, theta0=theta0, vcov="iid")
### Scaling the parameters increase the speed of convergence
res <- gmmFit(model, control=list(parscale=c(1000,.1,1)))
### It also seems that there is a degree of freedom adjustment for the
### estimate of the variance of the error term.
summary(res, df.adj=TRUE)@coef
[Package momentfit version 0.5 Index]