pseudomean              package:pseudo              R Documentation

_P_s_e_u_d_o-_o_b_s_e_r_v_a_t_i_o_n_s _f_o_r _t_h_e _r_e_s_t_r_i_c_t_e_d _m_e_a_n

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

     Computes pseudo-observations for modeling survival function based
     on the restricted mean.

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

     pseudomean(time,event, tmax)

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

    time: the follow up time. 

   event: the status indicator: 0=alive, 1=dead.

    tmax: the maximum cut-off point for the restricted mean. If missing
          or larger than the maximum follow up time, it is replaced by
          the maximum follow up time.  

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

     The function calculates the pseudo-observations for the restricted
     mean survival for each individual at prespecified time-points. The
     pseudo-observations can be used for fitting a regression model
     with a generalized estimating equation.

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

     A data frame. The first two columns contain the follow up time and
     the status indicator as given by the user. The third column
     presents the computed pseudo-observations.

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

     Klein J.P., Gerster M., Andersen P.K., Tarima S.: "SAS and R
     Functions to Compute Pseudo-values for Censored Data Regression."
     _Department of Biostatistics, University of Copenhagen,_ research
     report 07/11.

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

     'pseudosurv', 'pseudoci'

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

     library(KMsurv)
     data(bmt)

     #compute the pseudo-observations:
     pseudo = pseudomean(time=bmt$t2, event=bmt$d3,tmax=2000)

     #arrange the data
     a <- cbind(bmt,pseudo = pseudo$psumean,id=1:nrow(bmt))

     #fit a regression model for the mean time

     library(geepack)
     summary(fit <- geese(pseudo ~ z1 + as.factor(z8) + as.factor(group),
             data = a, id=id, jack = TRUE, family=gaussian, 
             corstr="independence", scale.fix=FALSE))

     #rearrange the output
     round(cbind(mean = fit$beta,SD = sqrt(diag(fit$vbeta.ajs)),
             Z = fit$beta/sqrt(diag(fit$vbeta.ajs)), PVal =
             2-2*pnorm(abs(fit$beta/sqrt(diag(fit$vbeta.ajs))))),4)

