Fit a GLM without Computing the Model Matrix

DESCRIPTION:
Fits a glm model, without computing the model matrix or the response vector.

USAGE:
glm.fit(x, y, w, start, offset, family, maxit, epsilon, trace,
        null.dev, qr, ...)

REQUIRED ARGUMENTS:
x:
a model matrix (design matrix).
y:
a response vector or object understood by family$initialize.

OPTIONAL ARGUMENTS:
w:
optional prior weights.
start:
optional starting values for the linear predictor (default is 0).
offset:
optional offset added to the linear predictor (default is 0).
family:
a family object, e.g., as produced by binomial (default is gaussian).
maxit:
maximum number of iterations (default is 10).
epsilon:
convergence threshold (default is 0.001).
trace:
logical flag; if TRUE iterations details are printed during execution.
null.dev:
should the null deviance be computed; when used iteratively, this should be left at the default value FALSE.
qr:
if TRUE, the qr decomposition of x*sqrt(w) is returned with the fit; default is FALSE.
...:
not used, but do absorb any redundant arguments.

VALUE:
an object, which is a subset of a glm object. In particular, some of the extractor functions like summary.glm produce appropriate output.

DETAILS:
This function is useful for simulations or bootstrapping, where you use the same data frame over and over again. Using glm.fit for bootstrapping saves a large amount of computational time, since it only fits a glm model and does not create the model matrix. Thus, no formula needs to be specified as an argument. The glm.fit function is called internally by glm to do the actual model fitting.

The glm.fit function is the work-horse for glm, and is named as the default method in the definition of glm. It receives x and y data rather than a formula, but still uses the family object to define the IRLS steps. Users can write their own versions of glm.fit, and pass the name of their function via the method argument to glm. Care should be taken to include as many of the arguments as feasible, but definitely the ... argument, which will absorb any additional arguments given in the call from glm. The name of the method can optionally be passed as a "method" attribute of the family argument. This allows users to define, say, a cox family, with "method" attribute "cox.fit"; glm will automatically look for a fitting function cox.fit and use it instead of glm.fit.


SEE ALSO:
glm , glm.control , glm.object , summary.glm .

EXAMPLES:
glm(Times ~ Dose + Age, family = "cox", method = "glm.fit.cox")