kyphosis                package:rpart                R Documentation

_D_a_t_a _o_n _C_h_i_l_d_r_e_n _w_h_o _h_a_v_e _h_a_d _C_o_r_r_e_c_t_i_v_e _S_p_i_n_a_l _S_u_r_g_e_r_y

_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

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

     data(kyphosis)

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

     This data frame contains the following columns:

     '_K_y_p_h_o_s_i_s' a factor with levels 'absent'  'present' indicating if
          a kyphosis (a type of deformation) was present after the
          operation.

     '_A_g_e' in months

     '_N_u_m_b_e_r' the number of vertebrae involved 

     '_S_t_a_r_t' the number of the first (topmost) vertebra operated on.

_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=TRUE)
     plot(fit2)
     text(fit2, use.n=TRUE)

