samples              package:simpleboot              R Documentation

_E_x_t_r_a_c_t _s_a_m_p_l_i_n_g _d_i_s_t_r_i_b_u_t_i_o_n_s _f_r_o_m _b_o_o_t_s_t_r_a_p_p_e_d _l_i_n_e_a_r/_l_o_e_s_s _m_o_d_e_l_s.

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

     Extract sampling distributions of various entities from either a
     linear model or a loess bootstrap.  Entities for linear models are
     currently, model coefficients, residual sum of squares, R-square,
     and fitted values (given a set of X values in the original
     bootstrap). For loess, one can extract residual sum of squares and
     fitted values.

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

     samples(object, name = c("fitted", "coef", "rsquare", "rss"))

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

  object: The output from either 'lm.boot' or 'loess.boot'.

    name: The name of the entity to extract.  The default is fitted
          values.

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

     Either a vector or matrix depending on the entity extracted.  For
     example, when extracting the sampling distributions for linear
     model coefficents, the return value is p x R matrix where p is the
     number of coefficients and R is the number of bootstrap
     replicates.

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

     Roger D. Peng

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

     data(airquality)
     attach(airquality)
     lmodel <- lm(Ozone ~ Solar.R + Wind)
     lboot <- lm.boot(lmodel, R = 500)

     ## Get sampling distributions for coefficients
     s <- samples(lboot, "coef")

     ## Histogram for the intercept
     hist(s[1,])

