family
argument.
xglm(model, data, family, correlation, weights, dispersion, start, subset, method, na.action, control, verbose)
~
operator
and the terms, separated by
+
operators,
on the right.
model
,
correlation
,
weights
, and
subset
.
By default the variables are taken from the environment
from which
xglm
is called.
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
.
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.
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.
0
.
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
.
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.
"REPQL"
the model is fit
by maximizing the restricted penalized quasi-likelihood (PQL).
If
"PQL"
the PQL is maximized.
Defaults to
"REPQL"
.
NA
s.
The default action (
na.fail
) causes
gls
to print an error message
and terminate if there are any incomplete observations.
glsControl
.
Defaults to an empty list.
TRUE
information on the evolution
of the iterative algorithm is printed.
Default is
FALSE
.
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.
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).
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.
fm1 <- xglm(resp ~ trt, Clinic, family=binomial, correlation=corCompSymm(form = ~1 | clinic))