new("vglmff", ...)
. blurb
:"character"
giving
a small description of the model. Important arguments such as
parameter link functions can be expressed here. constraints
:"expression"
which sets up any constraint matrices defined by arguments in the
family function. A zero
argument is always fed into
cm.zero.vgam
, whereas other constraints are fed into
cm.vgam
. deviance
:"function"
returning the deviance of the model. This slot is optional.
If present, the function must have arguments
function(mu, y, w, residuals = FALSE, eta, extra = NULL)
.
Deviance residuals are returned if residuals = TRUE
. fini
:"expression"
to insert
code at a special position in vglm.fit
or
vgam.fit
.
This code is evaluated immediately after the fitting. first
:"expression"
to insert
code at a special position in vglm
or
vgam
. infos
:"function"
which
returns a list with components such as M1
.
At present only a very few VGAM family functions have this
feature implemented.
Those that do do not require specifying the M1
argument when used with rcim
. initialize
:"expression"
used
to perform error checking (especially for the variable y
)
and obtain starting values for the model.
In general, etastart
or
mustart
are assigned values based on the variables y
,
x
and w
. linkinv
:"function"
which
returns the fitted values, given the linear/additive predictors.
The function must have arguments
function(eta, extra = NULL)
. last
:"expression"
to insert code at a
special position (at the very end) of vglm.fit()
or vgam.fit()
.
This code is evaluated after the fitting.
The list misc
is often assigned components in this slot,
which becomes the misc
slot on the fitted object. linkfun
:"function"
which,
given the fitted values, returns the linear/additive predictors.
If present, the function must have arguments
function(mu, extra = NULL)
.
Most VGAM family functions do not have
a linkfun
function. They largely are for
classical exponential families, i.e., GLMs. loglikelihood
:"function"
returning the log-likelihood of the model. This slot is optional.
If present, the function must have arguments
function(mu, y, w, residuals = FALSE, eta, extra = NULL)
.
The argument residuals
can be ignored because
log-likelihood residuals aren't defined. middle
:"expression"
to insert
code at a special position in vglm.fit
or
vgam.fit
. middle2
:"expression"
to insert
code at a special position in vglm.fit
or
vgam.fit
. simslot
:"function"
to allow
simulate
to work. summary.dispersion
:"logical"
indicating whether the general VGLM formula (based on a residual
sum of squares) can be used for computing the scaling/dispersion
parameter. It is TRUE
for most models except for nonlinear
regression models. vfamily
:"character"
giving class information about the family function. Although
not developed at this stage, more flexible classes are planned
in the future. For example, family functions
sratio
, cratio
, cumulative
, and acat
all operate on categorical data, therefore will have a special class
called "VGAMcat"
, say. Then if fit
was
a vglm
object, then coef(fit)
would print
out the vglm
coefficients plus "VGAMcat"
information as well. deriv
:"expression"
which
returns a $M$-column matrix of first derivatives of the
log-likelihood function
with respect to the linear/additive predictors, i.e., the
score vector. In Yee and Wild (1996) this is the
$\bold{d}i$ vector. Thus each row of the
matrix returned by this slot is such a vector. weight
:"expression"
which
returns the second derivatives of the log-likelihood function
with respect to the linear/additive predictors.
This can be either the observed or expected information matrix, i.e.,
Newton-Raphson or Fisher-scoring respectively.
In Yee and Wild (1996) this is the
$\bold{W}i$ matrix. Thus each row of the
matrix returned by this slot is such a matrix.
Like the weights
slot of vglm
/vgam
, it is
stored in
matrix-band form, whereby the first $M$
columns of the matrix are the
diagonals, followed by the upper-diagonal band, followed by the
band above that, etc. In this case, there can be up to $M(M+1)$
columns, with the last column corresponding to the (1,$M$) elements
of the weight matrices. validfitted, validparams
:signature(x = "vglmff")
:
short summary of the family function.
glm
, nor gam
(from either
gam or mgcv packages). Yee, T. W. and Wild, C. J. (1996) Vector generalized additive models. Journal of the Royal Statistical Society, Series B, Methodological, 58, 481--493.
vglm
,
vgam
,
rrvglm
,
rcim
.
cratio()
cratio(link = "cloglog")
cratio(link = "cloglog", reverse = TRUE)
Run the code above in your browser using DataLab