estimate.functional {PointFore} | R Documentation |
Estimate Functional
Description
Estimates the parameter in a specification model for state-dependent quantile or expectile forecasts. For additional detail see the vignettes of the PointFore package.
Usage
estimate.functional(iden.fct = quantiles, model = constant,
theta0 = NULL, Y, X, stateVariable = NULL, other_data = NULL,
instruments = c("X", "lag(Y)"), prewhite = F, kernel = "Bartlett",
bw = bwNeweyWest1987, ...)
Arguments
iden.fct |
identification function. Standard choice is |
model |
specification model. See |
theta0 |
starting value for optimization |
Y |
realized values |
X |
forecasts |
stateVariable |
state variable(s) as vector or matrix of column vectors. |
other_data |
optional for construction of instruments |
instruments |
instruments (list of character describing instruments or matrix of actual instruments). Use "const" for just the constant as instrument. Standard ist c("X","lag(Y)"), which uses the constant, the forecast and the lagged value of the outcome. |
prewhite |
logical or integer. Should the estimating functions be prewhitened? Standard is FALSE. If TRUE or greater than 0 a VAR model of order as.integer(prewhite) is fitted. (see ?gmm) |
kernel |
choose kernel for HAC-covariance estimation (see ?gmm). Standard is "Bartlett" Kernel as proposed in Newey and West (1987). |
bw |
function describing bandwidth selection (see ?gmm for alternatives). Standard is that the bandwidth depends on the sample length $T$ by $m(T)=T^1/5$. |
... |
other parameters for gmm function (see ?gmm) |
Value
Object of type pointfore
. Use summary
and plot
methods to illustrate results.
Examples
# estimate constant quantile level of GDP forecast
res <- estimate.functional(Y=GDP$observation, X=GDP$forecast,
model=constant)
summary(res)
plot(res)
# estimate constant quantile level with only the constant as instrument
res <- estimate.functional(Y=GDP$observation, X=GDP$forecast,
model=constant, instruments="const")
summary(res)
## Not run:
# estimate constant expectile level
res <- estimate.functional(Y=GDP$observation, X=GDP$forecast,
model=constant, instruments="const", iden.fct = expectiles)
summary(res)
plot(res)
# estimate state-dependent quantile level with linear probit specification model
res <- estimate.functional(Y=GDP$observation, X=GDP$forecast,
stateVariable = GDP$forecast, model = probit_linear)
summary(res)
plot(res)
## End(Not run)