home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / glm < prev    next >
Encoding:
Text File  |  1997-04-23  |  4.9 KB  |  131 lines

  1.     
  2.     _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
  3.     
  4.          glm(formula, family=gaussian, data, weights, subset,
  5.                  na.action=na.fail, start=NULL, offset=NULL,
  6.                  control=glm.control(epsilon=0.0001, maxit=10,
  7.                          trace=F),
  8.                  model=T, method=glm.fit, x=F, y=T)
  9.     
  10.          summary(glm.obj, dispersion=NULL, correlation=TRUE,
  11.                  na.action=na.omit)
  12.          anova(glm.obj, ...)
  13.     
  14.          coefficients(glm.obj)
  15.          deviance(glm.obj)
  16.          df.residual(glm.obj)
  17.          effects(glm.obj)
  18.          family(glm.obj)
  19.          fitted.values(glm.obj)
  20.          residuals(glm.obj, type="deviance")
  21.     
  22.          glm.control(epsilon=0.0001, maxit=10, trace=FALSE)
  23.          glm.fit(x, y, weights=rep(1, nrow(x)),
  24.                  start=NULL, offset=rep(0, nrow(x)),
  25.                  family=gaussian(), control=glm.control(),
  26.                  intercept=TRUE)
  27.     
  28.     _A_r_g_u_m_e_n_t_s:
  29.     
  30.          formula : a symbolic description of the model to be
  31.                    fit.  The details of model specification are
  32.                    given below.
  33.     
  34.           family : a description of the error distribution and
  35.                    link function to be used in the model.  See
  36.                    family for details.
  37.     
  38.             data : an optional data frame containing the vari-
  39.                    ables in the model.  By default the variables
  40.                    are taken from the environment which lm is
  41.                    called from.
  42.     
  43.          weights : an optional vector of weights to be used in
  44.                    the fitting process.
  45.     
  46.           subset : an optional vector specifying a subset of
  47.                    observations to be used in the fitting pro-
  48.                    cess.
  49.     
  50.        na.action : a function which indicates what should happen
  51.                    when the data contain NAs.  The default
  52.                    action (na.omit) is to omit any incomplete
  53.                    observations.  The alternative action na.fail
  54.                    causes lm to print an error message and ter-
  55.                    minate if there are any incomplete observa-
  56.                    tions.
  57.     
  58.            start : starting values for the parameters in the
  59.                    linear predictor.
  60.     
  61.           offset : this can be used to specify an a-priori known
  62.                    component to be included in the linear pred-
  63.                    ictor during fitting.
  64.     
  65.          control : a list of parameters for controlling the fit-
  66.                    ting process.  See the documentation for
  67.                    glm.control for details.
  68.     
  69.            model : a logical value indicating whether model
  70.                    frame should be included as a component of
  71.                    the returned value.
  72.     
  73.           method : the method to be used in fitting the model.
  74.                    The default (and presently only) method
  75.                    glm.fit uses iteratively reweighted least
  76.                    squares.
  77.     
  78.              x,y : logical values indicating whether the
  79.                    response vector and design matrix used in the
  80.                    fitting process should be returned as com-
  81.                    ponents of the returned value.
  82.     
  83.          glm.obj : an object of class glm.
  84.     
  85.       dispersion : the dispersion parameter for the fitting fam-
  86.                    ily.  By default the dispersion parameter is
  87.                    obtained from glm.obj.
  88.     
  89.      correlation : should the correlation matrix of the
  90.                    estimated parameters be printed.
  91.     
  92.             type : the type of residuals which should be
  93.                    returned.  The alternatives are: "deviance",
  94.                    "pearson", "working", "response".
  95.     
  96.     _D_e_s_c_r_i_p_t_i_o_n:
  97.     
  98.          glm is used to fit generalized linear models.
  99.     
  100.          Models for glm are specified by giving a symbolic
  101.          description of the linear predictor and a description
  102.          of the error distribution.  A typical predictor has the
  103.          form reponse ~ terms where response is the (numeric)
  104.          response vector and terms is a series of terms which
  105.          specifies a linear predictor for response.  A terms
  106.          specification of the form first+second indicates all
  107.          the terms in first together with all the terms in
  108.          second with duplicates removed.  A specification of the
  109.          form first:second indicates the the set of terms
  110.          obtained by taking the interactions of all terms in
  111.          first with all terms in second.  The specification
  112.          first*second indicates the cross of first and second.
  113.          This is the same as first+second+first:second.
  114.     
  115.     _V_a_l_u_e:
  116.     
  117.          glm returns an object of class glm which inherits from
  118.          the class lm.  The function summary can be used to
  119.          obtain or print a summary of the results and the func-
  120.          tion anova and be used to produce and analysis of vari-
  121.          ance table.  The generic accessor functions coeffi-
  122.          cients, effects, fitted.values and residuals can be
  123.          used to extract various useful features of the value
  124.          returned by glm.
  125.     
  126.     _S_e_e _A_l_s_o:
  127.     
  128.          anova, coefficients, effects, fitted.values, lm, resi-
  129.          duals, summary.
  130.     
  131.