scor                package:bootstrap                R Documentation

_O_p_e_n/_C_l_o_s_e_d _B_o_o_k _E_x_a_m_i_n_a_t_i_o_n _D_a_t_a

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

     This is data form mardia, Kent and Bibby on 88 students who took
     examinations in 5 subjects. Some where with open book and other
     with  closed book.

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

     data(scor)

_F_o_r_m_a_t:

     A data frame with 88 observations on the following 5 variables.

     _m_e_c mechanics, closed book note

     _v_e_c vectors, closed book note

     _a_l_g algebra, open book note

     _a_n_a analysis, open book note

     _s_t_a statistics, open book note

_D_e_t_a_i_l_s:

     The book uses this for bootstrap in principal component analysis.

_S_o_u_r_c_e:

     Efron, B. and Tibshirani, R. (1993) An Introduction to the
     Bootstrap.  Chapman and Hall, New York, London.

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

     str(scor) 
     if(interactive())par(ask=TRUE)
     plot(scor) 
     # The parameter of interest (theta) is the fraction of variance explained 
     # by the first principal component.
     # For principal components analysis svd is better numerically than 
     # eigen-decomposistion, but for bootstrapping the later is MUCH faster.
     theta <- function(ind) {
        vals <- eigen(var(scor[ind,]), symmetric=TRUE, only.values=TRUE)$values
        vals[1] / sum(vals) }
     scor.boot <- bootstrap(1:88, 500, theta)
     sd(scor.boot$thetastar) # bootstrap standard error
     hist(scor.boot$thetastar)
     abline(v=theta(1:88), col="red2")
     abline(v=mean(scor.boot$thetastar), col="blue")

