plot.frailtyPenal        package:frailtypack        R Documentation

_P_l_o_t _M_e_t_h_o_d _f_o_r _a_n _o_b_j_e_c_t _o_f _c_l_a_s_s '_f_r_a_i_l_t_y_P_e_n_a_l'.

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

     Plots estimated baseline survival and hazard functions from an
     object of class `frailtyPenal'. Confidence  bands are allowed.

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

     plot.frailtyPenal(x, type.plot = "hazard", conf.bands=TRUE, ...)

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

       x: Object of class 'frailtyPenal' (output from calling
          'frailtyPenal' function).

type.plot: a character string specifying the type of curve. Possible
          value are "hazard", or "survival". The default is "hazard".
          Only the first words are required, e.g "haz", "su"

conf.bands: logical value. Determines whether confidence bands will be
          plotted.  The default is to do so.

     ...: Other graphical parameters

_V_a_l_u_e:

     Print a plot of class 'frailtyPenal'

_S_e_e _A_l_s_o:

     'print.frailtyPenal'

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

     data(readmission)

     # Let's compare shared frailty model with Cox proportional hazards model 
     mod.sha<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
                  n.knots=10,kappa1=10000,data=readmission)
     plot(mod.sha,type="surv",conf=FALSE)
     mod.cox<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id),
                  n.knots=10,kappa1=10000,data=readmission,Frailty=FALSE)
     lines(mod.cox,type="surv",conf=FALSE,col=2)



     # Stratified model
     mod<-frailtyPenal(Surv(time,event)~as.factor(dukes)+cluster(id)+strata(sex),
                  n.knots=10,kappa1=10000,kappa2=10000,data=readmission)
     plot(mod)

     # no confidence bands
     plot(mod,conf.bands=FALSE)

