elf {qgam} | R Documentation |
Extended log-F model with fixed scale
Description
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.
Usage
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 |
co |
positive constant used to determine parameter lambda of the ELF density (lambda = co / sigma). Can be vector valued. |
Details
This function is meant for internal use only.
Value
An object inheriting from mgcv's class extended.family
.
Author(s)
Matteo Fasiolo <matteo.fasiolo@gmail.com> and Simon N. Wood.
References
Fasiolo, M., Wood, S.N., Zaffran, M., Nedellec, R. and Goude, Y., 2020. Fast calibrated additive quantile regression. Journal of the American Statistical Association (to appear). https://www.tandfonline.com/doi/full/10.1080/01621459.2020.1725521.
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)
# 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)
plot(fit, scale = FALSE, pages = 1)