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.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 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 (startrust for further details.maxit: maximum number of iterations of the
magic algorithm; tol: tolerance to use in judging convergence; step.hbgeva as described in bgevaObject.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.plot.bgeva, bgeva-package, bgevaObject, summary.bgevalibrary(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