home *** CD-ROM | disk | FTP | other *** search
-
- _F_i_n_d _t_h_e _L_e_a_s_t _S_q_u_a_r_e_s _F_i_t
-
- lsfit(x, y, wt, intercept=TRUE, tolerance=1e-07,
- yname=NULL)
-
- _A_r_g_u_m_e_n_t_s:
-
- x : a matrix whose rows correspond to cases and
- whose columns correspond to variables.
-
- y : the responses, possibly matrix valued if you
- want to fit multiple left hand sides.
-
- wt : an optional vector of weights for performing
- weighted least squares.
-
- intercept : whether or not an intercept term should be
- used.
-
- tolerance : the tolerance to be used in the matrix decom-
- position.
-
- yname : an unused parameter for compatibility.
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- The least squares estimate of beta in the model
-
- y = X beta + epsilon
-
- is found. If weights are specified then a weighted
- least squares is performed with the weight given to the
- jth case specified by the jth entry in wt.
-
- If any observation has a missing value in any field,
- that observation is removed before the analysis is car-
- ried out. This can be quite inefficient if there is a
- lot of missing data.
-
- The implementation is via a modification of the LINPACK
- subroutines which allow for multiple left-hand sides.
-
- _V_a_l_u_e_s:
-
- A list with the following named components:
-
- coef : the least squares estimates of the coefficients in
- the model (stated below).
-
- residuals : residuals from the fit.
-
- intercept : indicates whether an intercept was fitted.
-
- qr : the QR decomposition of the design matrix.
-
- _S_e_e _A_l_s_o:
-
- ls.diag, rreg.
-
- _E_x_a_m_p_l_e_s:
-
- lsf <- lsfit(x,y)
- lsf <- lsfit(x,y,wt=wts)
-
-