Estimates the parameter in a specification model for state-dependent quantile or expectile forecasts. For additional detail see the vignettes of the PointFore package.
iden.fct: identification function. Standard choice is quantiles. The alternative is expectiles.
model: specification model. See constant for the simplest example and further suggestions.
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)=T1/5.
...: other parameters for gmm function (see ?gmm)
Returns
Object of type pointfore. Use summary and plot methods to illustrate results.
Examples
# estimate constant quantile level of GDP forecastres <- estimate.functional(Y=GDP$observation, X=GDP$forecast,model=constant)summary(res)plot(res)# estimate constant quantile level with only the constant as instrumentres <- estimate.functional(Y=GDP$observation, X=GDP$forecast,model=constant, instruments="const")summary(res)## Not run:# estimate constant expectile levelres <- 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 modelres <- estimate.functional(Y=GDP$observation, X=GDP$forecast,stateVariable = GDP$forecast, model = probit_linear)summary(res)plot(res)## End(Not run)