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 / lsfit < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.8 KB  |  66 lines

  1.     
  2.     _F_i_n_d _t_h_e _L_e_a_s_t _S_q_u_a_r_e_s _F_i_t
  3.     
  4.          lsfit(x, y, wt, intercept=TRUE, tolerance=1e-07,
  5.                  yname=NULL)
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.                x : a matrix whose rows correspond to cases and
  10.                    whose columns correspond to variables.
  11.     
  12.                y : the responses, possibly matrix valued if you
  13.                    want to fit multiple left hand sides.
  14.     
  15.               wt : an optional vector of weights for performing
  16.                    weighted least squares.
  17.     
  18.        intercept : whether or not an intercept term should be
  19.                    used.
  20.     
  21.        tolerance : the tolerance to be used in the matrix decom-
  22.                    position.
  23.     
  24.            yname : an unused parameter for compatibility.
  25.     
  26.     _D_e_s_c_r_i_p_t_i_o_n:
  27.     
  28.          The least squares estimate of beta in the model
  29.     
  30.                           y = X beta + epsilon
  31.     
  32.          is found.  If weights are specified then a weighted
  33.          least squares is performed with the weight given to the
  34.          jth case specified by the jth entry in wt.
  35.     
  36.          If any observation has a missing value in any field,
  37.          that observation is removed before the analysis is car-
  38.          ried out.  This can be quite inefficient if there is a
  39.          lot of missing data.
  40.     
  41.          The implementation is via a modification of the LINPACK
  42.          subroutines which allow for multiple left-hand sides.
  43.     
  44.     _V_a_l_u_e_s:
  45.     
  46.          A list with the following named components:
  47.     
  48.        coef : the least squares estimates of the coefficients in
  49.               the model (stated below).
  50.     
  51.     residuals : residuals from the fit.
  52.     
  53.     intercept : indicates whether an intercept was fitted.
  54.     
  55.          qr : the QR decomposition of the design matrix.
  56.     
  57.     _S_e_e _A_l_s_o:
  58.     
  59.          ls.diag, rreg.
  60.     
  61.     _E_x_a_m_p_l_e_s:
  62.     
  63.          lsf <- lsfit(x,y)
  64.          lsf <- lsfit(x,y,wt=wts)
  65.     
  66.