Learn R Programming

PointFore

The goal of PointFore is to estimate specification models for the state-dependent level of an optimal quantile/expectile forecast.

Wald Tests and the test of overidentifying restrictions are implemented. Ploting of the estimated specification model is possible.

Based on "Interpretation of Point Forecasts" by Patrick Schmidt, Matthias Katzfuss, and Tilmann Gneiting, 2018.

Installation

You can install PointFore from github with:

# install.packages("devtools")
devtools::install_github("Schmidtpk/PointFore")

Example

This is a basic example which shows you how to evaluate which quantile is forecasted by the Greenbook GDP forecats:

library(PointFore)
#> 
#> Attaching package: 'PointFore'
#> The following object is masked from 'package:stats':
#> 
#>     lag

res <- estimate.functional(Y=GDP$observation,X=GDP$forecast)
#> Drop  1 case(s) because of chosen instruments
#> Choose parameter theta0 automatically.

summary(res)
#> $call
#> estimate.functional(Y = GDP$observation, X = GDP$forecast)
#> 
#> $coefficients
#>           Estimate Std. Error  t value     Pr(>|t|)
#> Theta[1] 0.5980637 0.04429534 13.50173 1.527435e-41
#> 
#> $Jtest
#> 
#>  ##  J-Test: degrees of freedom is 2  ## 
#> 
#>                 J-test    P-value 
#> Test E(g)=0:    5.507506  0.063688

#plot(res)

On average the forecast is over-optimistic with a forecasted quantile of 0.6. The J-test rejects optimality for this model.

In the next step, we apply a more general model, where the forecasted quantile depends on the current forecast via a linear probit model.

res <- estimate.functional(Y=GDP$observation,X=GDP$forecast,
                           model=probit_linear,
                           stateVariable = GDP$forecast)
#> Drop  1 case(s) because of chosen instruments
#> Choose parameter theta0 automatically.



summary(res)
#> $call
#> estimate.functional(model = probit_linear, Y = GDP$observation, 
#>     X = GDP$forecast, stateVariable = GDP$forecast)
#> 
#> $coefficients
#>            Estimate Std. Error    t value   Pr(>|t|)
#> Theta[1] -0.1125011 0.16807744 -0.6693408 0.50327812
#> Theta[2]  0.1132529 0.04437854  2.5519745 0.01071144
#> 
#> $Jtest
#> 
#>  ##  J-Test: degrees of freedom is 1  ## 
#> 
#>                 J-test   P-value
#> Test E(g)=0:    1.38747  0.23883
#plot(res)

We see that the forecast is overly optimistic in times of high growth. For this model we cannot reject optimality with a p-value of 0.239 in the J-Test of overidentifying restrictions.

Copy Link

Version

Install

install.packages('PointFore')

Monthly Downloads

141

Version

0.2.0

License

CC0

Maintainer

Patrick Schmidt

Last Published

February 22nd, 2019

Functions in PointFore (0.2.0)

probit_linear

linear specification model with probit link
probit_spline3

cubic spline specification model with probit link
quantiles

Identification function for state-dependent quantiles
probit_spline2

quadratic spline specification model with probit link
estimate.functional

Estimate Functional
summary.pointfore

Method for object of class pointfore
constant

Constant specification model
expectiles

Identification function for state-dependent expectiles
logistic_linear

linear logistic specification model
probit_break

probit break specification model with probit link
PointFore

PointFore: A package for estimating state-dependent quantile and expectile levels from a time series of point forecasts and observations
precipitation

daily accumulated precipitation (in millimeter) at London, UK and 24-hours-ahead forecasts of the ECMWF (1969-2011)
GDP

real GDP realized values and one quarter ahead Greenbook forecasts (1969-2012)
plot.pointfore

Plots object of class "pointfore"
lag

Lagging variables for use in estimate functional