The elf family implements the Extended log-F density of Fasiolo et al. (2017) and it is supposed to work in conjuction with the extended GAM methods of Wood et al. (2017), implemented by mgcv. It differs from the elflss family, because here the scale of the density (sigma, aka the learning rate) is a single scalar, while in elflss it can depend on the covariates. At the moment the family is mainly intended for internal use, use the qgam function to fit quantile GAMs based on ELF.

elf(theta = NULL, link = "identity", qu, co)

Arguments

theta

a scalar representing the log-scale log(sigma).

link

the link function between the linear predictor and the quantile location.

qu

parameter in (0, 1) representing the chosen quantile. For instance, to fit the median choose qu=0.5.

co

positive constant used to determine parameter lambda of the ELF density (lambda = co / sigma). Can be vector valued.

Value

An object inheriting from mgcv's class extended.family.

Details

This function is meant for internal use only.

References

Fasiolo, M., Goude, Y., Nedellec, R. and Wood, S. N. (2017). Fast calibrated additive quantile regression. Available at https://arxiv.org/abs/1707.03307.

Wood, Simon N., Pya, N. and Safken, B. (2017). Smoothing parameter and model selection for general smooth models. Journal of the American Statistical Association.

Examples

library(qgam) set.seed(2) dat <- gamSim(1,n=400,dist="normal",scale=2)
#> Gu & Wahba 4 term additive model
# Fit median using elf directly: FAST BUT NOT RECOMMENDED fit <- gam(y~s(x0)+s(x1)+s(x2)+s(x3), family = elf(co = 0.1, qu = 0.5), data = dat) plot(fit, scale = FALSE, pages = 1)
# Using qgam: RECOMMENDED fit <- qgam(y~s(x0)+s(x1)+s(x2)+s(x3), data=dat, qu = 0.8)
#> Estimating learning rate. Each dot corresponds to a loss evaluation. #> qu = 0.8.........done
plot(fit, scale = FALSE, pages = 1)