kyphosis                package:rpart                R Documentation

~~ _1-_l_i_n_e _d_e_s_c_r_i_p_t_i_o_n _o_f _t_h_e _d_a_t_a _f_r_a_m_e ~~

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

     The `kyphosis' data frame has 81 rows and 4 columns. representing
     data on children who have had corrective spinal surgery

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

Kyphosis: a factor with levels `absent'  `present' indicating if a
          kyphosis (a type of deformation) was present after the
          operation. 

     Age: in months 

  Number: the number of vertebrae involved  

   Start: the number of the first (topmost) vertebra operated on. 

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

     This data frame contains the following columns:

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

     John M. Chambers and Trevor J. Hastie eds. (1992) Statistical
     Models in S, Wadsworth and Brooks/Cole, Pacific Grove, CA 1992.

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

     data(kyphosis)
     fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
     fit2 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
                   parms=list(prior=c(.65,.35), split='information'))
     fit3 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
                   control=rpart.control(cp=.05))
     par(mfrow=c(1,2))
     plot(fit)
     text(fit, use.n=T)
     plot(fit2)
     text(fit2, use.n=T)

