Titanic               package:effects               R Documentation

_S_u_r_v_i_v_a_l _o_f _P_a_s_s_e_n_g_e_r_s _o_n _t_h_e _T_i_t_a_n_i_c

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

     Information on the survival status, sex, age, and passenger class
     of 1309 passengers in the Titanic disaster of 1912.

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

     Titanic

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

     A data frame with 1309 observations on the following 4 variables.

     '_s_u_r_v_i_v_e_d' 'no' or 'yes'.

     '_s_e_x' 'female' or 'male'

     '_a_g_e' in years (and for some children, fractions of a year); age
          is missing for 263 of the passengers.

     '_p_a_s_s_e_n_g_e_r_C_l_a_s_s' '1st', '2nd', or '3rd' class.

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

     This is part of a larger data set compiled by Thomas Cason.  Many
     additional details are given in the sources cited below.

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

     Data set 'titanic3' from  <URL:
     http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/DataSets>.

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.encyclopedia-titanica.org/>

     F. E. Harrell, Jr. (2001) _Regression Modeling Strategies_ New
     York: Springer.

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

     summary(Titanic)
       
     titanic <- glm(survived ~ (passengerClass + sex + age)^2, data=Titanic, family=binomial)
       
     titanic.all <- allEffects(titanic, typical=median, 
             given.values=c(passengerClass2nd=1/3, passengerClass3rd=1/3, sexmale=0.5))
             
     plot(titanic.all, ticks=list(at=c(.01, .05, seq(.1, .9, by=.2), .95, .99)), ask=FALSE)

     plot(effect("passengerClass*sex*age", titanic, xlevels=list(age=0:65)), 
             ticks=list(at=c(.001, .005, .01, .05, seq(.1, .9, by=.2), .95, .99, .995))) 

