home *** CD-ROM | disk | FTP | other *** search
-
- _F_i_t_t_i_n_g _G_e_n_e_r_a_l_i_z_e_d _L_i_n_e_a_r _M_o_d_e_l_s
-
- glm(formula, family=gaussian, data, weights, subset,
- na.action=na.fail, start=NULL, offset=NULL,
- control=glm.control(epsilon=0.0001, maxit=10,
- trace=F),
- model=T, method=glm.fit, x=F, y=T)
-
- summary(glm.obj, dispersion=NULL, correlation=TRUE,
- na.action=na.omit)
- anova(glm.obj, ...)
-
- coefficients(glm.obj)
- deviance(glm.obj)
- df.residual(glm.obj)
- effects(glm.obj)
- family(glm.obj)
- fitted.values(glm.obj)
- residuals(glm.obj, type="deviance")
-
- glm.control(epsilon=0.0001, maxit=10, trace=FALSE)
- glm.fit(x, y, weights=rep(1, nrow(x)),
- start=NULL, offset=rep(0, nrow(x)),
- family=gaussian(), control=glm.control(),
- intercept=TRUE)
-
- _A_r_g_u_m_e_n_t_s:
-
- formula : a symbolic description of the model to be
- fit. The details of model specification are
- given below.
-
- family : a description of the error distribution and
- link function to be used in the model. See
- family for details.
-
- data : an optional data frame containing the vari-
- ables in the model. By default the variables
- are taken from the environment which lm is
- called from.
-
- weights : an optional vector of weights to be used in
- the fitting process.
-
- subset : an optional vector specifying a subset of
- observations to be used in the fitting pro-
- cess.
-
- na.action : a function which indicates what should happen
- when the data contain NAs. The default
- action (na.omit) is to omit any incomplete
- observations. The alternative action na.fail
- causes lm to print an error message and ter-
- minate if there are any incomplete observa-
- tions.
-
- start : starting values for the parameters in the
- linear predictor.
-
- offset : this can be used to specify an a-priori known
- component to be included in the linear pred-
- ictor during fitting.
-
- control : a list of parameters for controlling the fit-
- ting process. See the documentation for
- glm.control for details.
-
- model : a logical value indicating whether model
- frame should be included as a component of
- the returned value.
-
- method : the method to be used in fitting the model.
- The default (and presently only) method
- glm.fit uses iteratively reweighted least
- squares.
-
- x,y : logical values indicating whether the
- response vector and design matrix used in the
- fitting process should be returned as com-
- ponents of the returned value.
-
- glm.obj : an object of class glm.
-
- dispersion : the dispersion parameter for the fitting fam-
- ily. By default the dispersion parameter is
- obtained from glm.obj.
-
- correlation : should the correlation matrix of the
- estimated parameters be printed.
-
- type : the type of residuals which should be
- returned. The alternatives are: "deviance",
- "pearson", "working", "response".
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- glm is used to fit generalized linear models.
-
- Models for glm are specified by giving a symbolic
- description of the linear predictor and a description
- of the error distribution. A typical predictor has the
- form reponse ~ terms where response is the (numeric)
- response vector and terms is a series of terms which
- specifies a linear predictor for response. A terms
- specification of the form first+second indicates all
- the terms in first together with all the terms in
- second with duplicates removed. A specification of the
- form first:second indicates the the set of terms
- obtained by taking the interactions of all terms in
- first with all terms in second. The specification
- first*second indicates the cross of first and second.
- This is the same as first+second+first:second.
-
- _V_a_l_u_e:
-
- glm returns an object of class glm which inherits from
- the class lm. The function summary can be used to
- obtain or print a summary of the results and the func-
- tion anova and be used to produce and analysis of vari-
- ance table. The generic accessor functions coeffi-
- cients, effects, fitted.values and residuals can be
- used to extract various useful features of the value
- returned by glm.
-
- _S_e_e _A_l_s_o:
-
- anova, coefficients, effects, fitted.values, lm, resi-
- duals, summary.
-
-