DoubleGam: Double Generalized Additive Models

Description Usage Arguments Value Author(s) References See Also

Description

A function to estimate both the mean and the dispersion function using B-splines bases.

Usage

1
2
3
4
DoubleGam(formulaM, formulaG = NULL, family = "gaussian", data,
  startM = NULL, startG = NULL, method = "quasi", selection = "GCV",
  weights = NULL, control = DoubleGamControl(), trace = FALSE,
  scale = 1, conf.type = "bayesian", ...)

Arguments

formulaM

the mean formula - typically of the type y ~ bsp(x1) + bsp(x2). Parametric models or mixtures of parametric and non parametric bases can be specified

formulaG

the dispersion formula - as for formulaM, but no response variable to be specified. formulaG = ~ 1 corresponds to the estimation of the dispersion as a constant (i.e. standard GAM)

family

as in glm, can be "gaussian", "poisson" or "Binomial"

data

dataset where variables are stored (optional)

startM

starting value for the coefficients needed to estimate the mean function

startG

starting value for the coefficients needed to estimate the dispersion function

method

can be "quasi" (the default) or "pseudo", according to whether deviance or pearson's residuals should be used as response variables when fitting the dispersion function

selection

the method used to select the smoothing parameter. can be "GCV" (the default), "AIC" or "none", in which case no selection is done and a smoothing parameter value should be provided in the bsp() call.

weights

as in glm - to be used with care, since the data get always weigthed by the estimated variance function

control

a list to control some behaviours of the estimation procedure, see DoubleGamControl

trace

should a trace to follow the convergence be printed? Default is FALSE

scale

similar to weigth, to be used if the dispersion function should be kept fixed

conf.type

character describing how to compute confidence intervals for the smooth components; can "bayesian" (default) or "naive" as per Wood (2006)

Value

An object of the gamMD class. If both the mean and the dispersion function are estimated the object will contain the following elements: converged, convVec, data, fitG, fitM, iter, relE. fitM contains information on the mean estimation procedure; fitG contains information on the dispersion estimation procedure and has the same elements as fitM.

If only the mean function is estimated all the values of the fitM object are given in gamMD object.

The elements of fitM and fitG are:

coefficients

the estimated regression coefficients

fitted.values

the fitted values of the model

desMat

the full design matrix of the model

dims

the dimension of the design matrix associated to each component

family

family used for fitting the model - set to Gamma for fitG

linear.predictors

estimated linear predictors for the model

deviance

deviance residuals - in fitM these are be scaled by the estimated dispersion function, if present

residuals

Pearson residuals

s.resid

standardised Pearson residuals

y, yd

response variable used in, respectively, the mean and diseprsion estimation procedure

converged

logic indicator on whether the last inner iteration has converged

sm.p

smoothing parameters used in the estimation procedure - either fixed or chosen

GCV

Generalised Cross Validation value

AIC

Akaike Information criterion value

yt

the variable response variable transformed according to the link function and then centered

df

overall equivalent sdegrees of freedom for the fit

vecdf

a vector given the giving of freedom used by each covariate in the model

cov.coef

covariance matrix of the coefficients

formula

formula used

dimsP

size of the parametric part of the model

Author(s)

Ilaria Prosdocimi (ilapro@ceh.ac.uk)

References

Gijbels, Prosdocimi and Claeskens (2010), Nonparametric estimation of mean and dispersion functions in extended generalized linear models, Test, 19(3), 560-608, doi:10.1007/s11749-010-0187-1,

Gijbels and Prosdocimi (2011), Smooth estimation of mean and dispersion function in extended generalized additive models with application to Italian induced abortion data, Journal of Applied Statistics, 38(11), 2391-2411, doi:10.1080/02664763.2010.550039

See Also

DoubleGamControl, DoubleRobGam, gamMD


ilapros/DoubleRobGam documentation built on Aug. 29, 2021, 12:19 a.m.