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:

     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:

     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)

