bgeva
can be used to fit regression models for binary rare events where the link function is the quantile function of
the Generalized Extreme Value random variable. The linear predictor can be flexibly specified using parametric and
regression spline components. Regression
spline bases are extracted from the package mgcv
. Multi-dimensional smooths are available
via the use of penalized thin plate regression splines (isotropic). The current implementation does not support scale invariant tensor
product smooths.Consider also using the faster and more stable version implemented in the gamlss()
function of the
SemiParBIVProbit
package. gamlss()
also allows for a much wider choice of smoothers.
bgeva(formula.eq, data=list(), tau=-0.25, Hes=TRUE, gIM="a", iterlimSP=50,
pr.tol=1e-6,
gamma=1, aut.sp=TRUE, fp=FALSE, start.v=NULL, start.vo=1,
rinit=1, rmax=100, fterm=sqrt(.Machine$double.eps),
mterm=sqrt(.Machine$double.eps),
control=list(maxit=50,tol=1e-6,step.half=25,
rank.tol=sqrt(.Machine$double.eps)))
s
terms are used to specify smooth functions of
predictors. See the examples below and the documentation of mgcv
for further details on GAM formula specifications.data
, the
variables are taken from environment(formula)
, typically the environment from which bgeva
is called.FALSE
, then the Fisher (rather than the observed) information matrix is employed.a
and b
.gamma=1.4
achieves this.TRUE
, then automatic multiple smoothing parameter selection is carried out. If FALSE
, then smoothing parameters
are set to the values obtained from the univariate fits.TRUE
, then a fully parametric model with regression splines is fitted. See the example below.start.vo=2
) or from a
combination of options 1 and 2 (start.vo=3
).trust
for further details.maxit
: maximum number of iterations of the
magic
algorithm; tol
: tolerance to use in judging convergence; step.half
: if a trial step fails then
the method tries halving it up to a maximum of step.half
times; rank.tol
: constant used to test for numerical rank
deficiency of the problem. See the documentation of magic
in mgcv
for further details.bgeva
as described in bgevaObject
.Any automatic smoothing parameter selection procedure is not likely to work well when the data have low information content. In binary models, this
issue is especially relevant the number of observations low. Here, convergence failure is
typically associated with an infinite cycling between the two steps detailed above. If this occurs, as some practical solutions, one might
either (i) lower the total number of parameters to estimate by reducing the dimension of the regression spline
bases, (ii) set the smoothing parameters to the values obtained from the univariate fits (aut.sp=FALSE
), or (iii) set the smoothing
parameters to the values obtained from the non-converged algorithm. The default option is (iii).
The GEV distribution may not be defined for certain combinations of parameter and covariate values. In such cases, a sub-design matrix is formed. This consists of the rows (of the original design matrix) for which the distributrion is defined.
The Binary Generalized Extreme Value Additive model has the quantile function of the Generalized Extreme Value (GEV) random variable as link function. The linear predictor is flexibly specified using parametric components and smooth functions of covariates. Replacing the smooth components with their regression spline expressions yields a fully parametric univariate GEV model. In principle, classic maximum likelihood estimation can be employed. However, to avoid overfitting, penalized likelihood maximization has to be employed instead. Here the use of penalty matrices allows for the suppression of that part of smooth term complexity which has no support from the data. The trade-off between smoothness and fitness is controlled by smoothing parameters associated with the penalty matrices. Smoothing parameters are chosen to minimize the approximate Un-Biased Risk Estimator (UBRE).
More details can be found in Calabrese, Marra and Osmetti (2016).
Consider also using the faster and more stable version implemented in the gamlss()
function of the
SemiParBIVProbit
package. gamlss()
also allows for a much wider choice of smoothers.
Calabrese R., Marra G., Osmetti S.A. (2016), Bankruptcy Prediction of Small and Medium Enterprises Using a Flexible Binary Generalized Extreme Value Model. Journal of the Operational Research Society, 67(4), 604-615.
Gu C. (1992), Cross validating non-Gaussian data. Journal of Computational and Graphical Statistics, 1(2), 169-179.
Wood S.N. (2004), Stable and efficient multiple smoothing parameter estimation for generalized additive models. Journal of the American Statistical Association, 99(467), 673-686.
plot.bgeva
, bgeva-package
, bgevaObject
, summary.bgeva
library(bgeva)
##########
## EXAMPLE
##########
set.seed(0)
n <- 1500
x1 <- round(runif(n))
x2 <- runif(n)
x3 <- runif(n)
f1 <- function(x) (cos(pi*2*x)) + sin(pi*x)
f2 <- function(x) (x+exp(-30*(x-0.5)^2))
y <- as.integer(rlogis(n, location = -6 + 2*x1 + f1(x2) + f2(x3), scale = 1) > 0)
dataSim <- data.frame(y,x1,x2,x3)
out <- bgeva(y ~ x1 + s(x2) + s(x3))
bg.checks(out)
summary(out)
plot(out,scale=0,pages=1,shade=TRUE)
#
#
Run the code above in your browser using DataLab