glm.links[function/expression name , link name]
glm.variances[function/expression name , variance name]
glm.weights[[link name, variance name]]
These are all matrix objects used in the construction of family objects.
The object
glm.links is a matrix of mode
"list", and has dimension
c(5,8).
The 8 columns represent each of the link functions
logit,
probit,
cloglog,
identity,
inverse,
log,
"1/mu^2", and
sqrt.
The first row
name is simply a character name for the link function.
The rows
link,
inverse and
deriv contain functions that
define the link function and its derivative.
Both
link and
deriv take a single argument
mu, while
inverse
takes the argument
eta.
For example,
> glm.links[["link","logit]]
function(mu)
log(mu/(1 - mu))
>
The final row
initialize is an expression that gets evaluated before
the Fisher-scoring iterations in
glm or local-scoring iterations
in
gam commence.
This is used to initialize the linear- or additive predictor, as well
as to set particular constants, transform the response, and so on.
The object
glm.variances is a matrix of dimension
c(3,5), with
columns representing the 5 variance functions
"constant",
"mu(1-mu)",
"mu",
"mu^2" and
"mu^3".
The first row is once again a
name, while the other two represent
the
variance and
deviance functions.
These objects are used by the function
make.family, and
indirectly by
glm,
quasi, etc., when constructing family objects.
See the documentation of
family and
make.family for additional details.
The object
glm.weights is used by the function
glm.weight, in
turn by
make.family; while
glm.weight will construct a
default
weight expression from the
variance and
deriv functions,
the non-NULL entries in
glm.weights give simplified expressions for
particular link-variance pairings.