estimate.functional: Estimate Functional

Description Usage Arguments Value Examples

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

1
2
3
4
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 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)=T^1/5$.

...

other parameters for gmm function (see ?gmm)

Value

Object of type pointfore. Use summary and plot methods to illustrate results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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)

PointFore documentation built on May 2, 2019, 9:42 a.m.