Fit Extended Generalized Linear Model

DESCRIPTION:

This function fits extended generalized linear models by maximizing the (restricted) penalized quasi-likelihood. The errors are allowed to be correlated and/or have have addittional heteroscedastic patterns, besides the one associated with the family argument.

USAGE:

xglm(model, data, family, correlation, weights, dispersion,
     start, subset, method, na.action, control, verbose)

REQUIRED ARGUMENTS:

model
a two-sided linear formula object describing the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right.
data
an optional data frame containing the variables named in model, correlation, weights, and subset. By default the variables are taken from the environment from which xglm is called.
family
a family object - a list of functions and expressions for defining the link and variance functions, initialization and iterative weights. Families supported are gaussian, binomial, poisson, Gamma, inverse.gaussian and quasi. Functions like binomial produce a family object, but can be given without the parentheses. Family functions can take arguments, as in binomial(link=probit). Defaults to gaussian.
correlation
an optional corStruct object describing the within-group correlation structure. See the documentation of corClasses for a description of the available corStruct classes. If a grouping variable is to be used, it must be specified in the form argument to the corStruct constructor. Defaults to NULL, corresponding to uncorrelated errors.
weights
an optional varFunc object or one-sided formula describing the within-group heteroscedasticity structure to be used in addition to the variance function corresponding to family. If given as a formula, it is used as the argument to varFixed, corresponding to fixed variance weights. See the documentation on varClasses for a description of the available varFunc classes. Defaults to NULL, in which case only the variance function corresponding to family is used.
dispersion
an optional numeric value for the dispersion parameter for the within-group errors. If positive, the dispersion is fixed at the specified value, otherwise, if less than or equal to zero, the dispersion is estimated with the remaining parameters. Default is 0.
start
an optional list with a single component, mu, with starting estimates for the fitted responses. Defaults to an empty list, in which case the starting estimates for the fitted responses are obtained using the initialization procedure in family.
subset
an optional expression indicating which subset of the rows of data should be used in the fit. This can be a logical vector, or a numeric vector indicating which observation numbers are to be included, or a character vector of the row names to be included. All observations are included by default.
method
an optional character string. If "REPQL" the model is fit by maximizing the restricted penalized quasi-likelihood (PQL). If "PQL" the PQL is maximized. Defaults to "REPQL".
na.action
a function that indicates what should happen when the data contain NAs. The default action ( na.fail) causes gls to print an error message and terminate if there are any incomplete observations.
control
a list of control values for the estimation algorithm to replace the default values returned by the function glsControl. Defaults to an empty list.
verbose
an optional logical value. If TRUE information on the evolution of the iterative algorithm is printed. Default is FALSE.

VALUE:

an object of class xglm, also inheriting from class gls, representing the extended generalized linear model fit. Generic functions such as print, plot , and summary have methods to show the results of the fit. See xglmObject for the components of the fit. The functions resid, coef , and fitted can be used to extract some of its components.

DETAILS:

The model formulation and the computational and estimation methods are described in Breslow and Clayton (1993) and also in Wolfinger and O'Connell (1993). The variance-covariance parametrizations are described in Pinheiro and Bates (1996). The different correlation structures available for the correlation argument are described in Box et al. (1994), Littel et al. (1996), and Venables and Ripley (1999). The use of variance functions for linear and nonlinear mixed effects models is presented in detail in Davidian and Giltinan (1995).

REFERENCES:

Breslow, N. E. and Clayton, D. G. (1993). Approximate inference in generalized mixed models. Journal of the American Statistical Association, 88, 9-25.

Box, G. E. P., Jenkins, G. M., and Reinsel G. C. (1994). Time Series Analysis: Forecasting and Control, 3rd Edition. Holden-Day.

Davidian, M. and Giltinan, D. M. (1995). Nonlinear Mixed Effects Models for Repeated Measurement Data. Chapman and Hall.

Littel, R. C., Milliken, G. A., Stroup, W. W., and Wolfinger, R.D. (1996). SAS Systems for Mixed Models. SAS Institute.

Pinheiro, J. C. and Bates., D. M. (1996). Unconstrained parametrizations for variance-covariance matrices. Statistics and Computing, 6, 289-296.

Venables, W. N. and Ripley, B. D. (1999). Modern Applied Statistics with S-PLUS", 3rd Edition Springer-Verlag, New York.

Wolfinger, R. D. and O'Connell, M. (1993). Generalized linear mixed models: a pseudo-likelihood approach. Journal of Statistical Computing and Simulation, 48, 233-243.

SEE ALSO:

, , , .

EXAMPLES:

fm1 <- xglm(resp ~ trt, Clinic, family=binomial,
            correlation=corCompSymm(form = ~1 | clinic))