fastbw                package:Design                R Documentation

_F_a_s_t _B_a_c_k_w_a_r_d _V_a_r_i_a_b_l_e _S_e_l_e_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Performs a slightly inefficient but numerically stable version of
     fast backward elimination on factors, using a method based on
     Lawless and Singhal (1978). This method uses the fitted complete
     model and computes approximate Wald statistics by computing
     conditional (restricted) maximum likelihood estimates assuming
     multivariate normality of estimates. 'fastbw' deletes factors, not
     columns of the design matrix. Factors requiring multiple d.f. will
     be retained or dropped as a group. The function prints the
     deletion statistics for each variable in turn, and prints
     approximate parameter estimates for the model after deleting
     variables.  The approximation is better when the number of factors
     deleted is not large.  For 'ols', the approximation is exact for
     regression coefficients, and standard errors are only off by a
     factor equal to the ratio of the mean squared error estimate for
     the reduced model to the original mean squared error estimate for
     the full model.

     If the fit was from 'ols', 'fastbw' will compute the usual R^2
     statistic for each model.

_U_s_a_g_e:

     fastbw(fit, rule="aic", type="residual", sls=.05, aics=0, eps=1e-9, k.aic=2)

     ## S3 method for class 'fastbw':
     print(x, digits=4, ...)

_A_r_g_u_m_e_n_t_s:

     fit: fit object with 'Varcov(fit)' defined (e.g., from 'ols',
          'lrm', 'cph', 'psm', 'lm', 'glm') 

    rule: Stopping rule. Defaults to '"aic"' for Akaike's information
          criterion. Use 'rule="p"' to use P-values 

    type: Type of statistic on which to base the stopping rule. Default
          is '"residual"' for the pooled residual chi-square. Use
          'type="individual"' to use Wald chi-square of individual
          factors. 

     sls: Significance level for staying in a model if 'rule="p"'. 
          Default is .05. 

    aics: For 'rule="aic"', variables are deleted until the chi-square
          - 'k.aic' times d.f. falls below 'aics'. Default 'aics' is
          zero to use the ordinary AIC.  Set 'aics' to say 10000 to see
          all variables deleted in order of descending importance. 

     eps: Singularity criterion, default is '1E-9'. 

   k.aic: multiplier to compute AIC, default is 2.  To use BIC, set
          'k.aic' equal to log(n), where n is the effective sample size
          (number of events for survival models). 

       x: result of 'fastbw'

  digits: number of significant digits to print

     ...: ignored

_V_a_l_u_e:

     a list with the following components:

  result: matrix of statistics with rows in order of deletion. 

names.kept: names of factors kept in final model. 

factors.kept: the subscripts of factors kept in the final model 

factors.deleted: opposite of 'factors.kept'. 

parms.kept: column numbers in design matrix corresponding to parameters
          kept in the final model. 

parms.deleted: opposite of 'parms.kept'. 

coefficients: vector of approximate coefficients of reduced model. 

     var: approximate covariance matrix for reduced model. 

Coefficients: matrix of coefficients of all models.  Rows correspond to
          the successive models examined and columns correspond to the
          coefficients in the full model.  For variables not in a
          particular sub-model (row), the coefficients are zero. 

_A_u_t_h_o_r(_s):

     Frank Harrell
      Department of Biostatistics, Vanderbilt University
      f.harrell@vanderbilt.edu

_R_e_f_e_r_e_n_c_e_s:

     Lawless, J. F. and Singhal, K. (1978): Efficient screening of
     nonnormal regression models.  Biometrics 34:318-327.

_S_e_e _A_l_s_o:

     'Design', 'ols', 'lrm', 'cph', 'psm', 'validate', 'solvet',
     'Design.Misc'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     fastbw(fit, optional.arguments)     # print results
     z <- fastbw(fit, optional.args)     # typically used in simulations
     lm.fit(X[,z$parms.kept], Y)         # least squares fit of reduced model
     ## End(Not run)

