drift                package:ldbounds                R Documentation

_D_r_i_f_t _a_n_d _P_r_o_b_a_b_i_l_i_t_i_e_s _f_o_r _G_r_o_u_p _S_e_q_u_e_n_t_i_a_l _B_o_u_n_d_a_r_i_e_s

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

     'drift' calculates drift (effect), confidence interval for drift,
     or power and other probabilities given drift for specified group
     sequential boundaries for interim analyses of accumulating data in
     clinical trials.

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

     drift(za = -zb, zb, t, t2 = t, pow = NULL, drft = NULL,
           conf = NULL, zval = zb[length(zb)])

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

      za: the vector of lower boundaries.  Symmetric to 'zb' by
          default.

      zb: the vector of upper boundaries.

       t: the vector of analysis times, which must be increasing and in
          (0,1].

      t2: the second time scale, usually in terms of amount of
          accumulating information.  By default, same as 't'.

     pow: the desired power when drift is not specified.

    drft: the true drift (i.e. treatment effect when t=1).

    conf: the confidence level when a confidence interval for drift is
          wanted.

    zval: the final observed Z statistic (i.e. when trial is stopped). 
          Used for confidence interval.

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

     This is based on a Fortran program, 'ld98', by Reboussin, DeMets,
     Kim, and Lan.  It has some advantages, like making use of
     probability distributions in R.  Only one of 'pow', 'drft', and
     'conf' is to be specified and 'zval' is only used in the last
     case.

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

     'drift' returns an object of 'class' '"drift"'.

     An object of class '"drift"' is a list containing the following
     components:

    type: Type of computation performed: 1 is drift given power, 2 is
          exit probabilities given drift, and 3 is confidence interval
          for drift given final Z statistic.

    time: the original time scale.

   time2: the second (information) time scale.

lower.bounds: the vector of lower boundaries given.

upper.bounds: the vector of upper boundaries given.

   power: the power.  If power is given, it is returned here. If drift
          is given, the resulting power is calculated.

   drift: the drift.  If drift is given, it is returned here.  If power
          is given, the drift resulting in given power is calculated.

lower.probs: the vector of exit probabilities across the lower
          boundary.  Returned if power or drift is given.

upper.probs: the same for upper boundary.

exit.probs: the probability at each analysis of crossing the boundary. 
          The sum of 'lower.probs' and 'upper.probs'.

cum.exit: the cumulative probability of crossing.

conf.level: the desired confidence level, if given.

final.zvalue: the final Z statistic, if given.

conf.interval: the confidence interval for drift, if 'conf' and 'zval'
          are given.

_A_u_t_h_o_r(_s):

     Charlie Casper casper@stat.wisc.edu and Oscar A. Perez
     perez@stat.wisc.edu

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

     Reboussin, D. M., DeMets, D. L., Kim, K. M., and Lan, K. K. G.
     (2000) Computations for group sequential boundaries using the
     Lan-DeMets spending function method. _Controlled Clinical Trials_,
     21:190-207.

     Fortran program 'ld98' by the same authors as above.

     DeMets, D. L. and Lan, K. K. G. (1995) _Recent Advances in
     Clinical Trial Design and Analysis_, Thall, P. F. (ed.). Boston:
     Kluwer Academic Publishers.

     Lan, K. K. G. and DeMets, D. L. (1983) Discrete sequential
     boundaries for clinical trials. _Biometrika_, 70:659-63.

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

     Generic functions 'summary.drift' and 'plot.drift'.

     'bounds' for computation of boundaries using alpha spending
     function method.

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

        ## From Reboussin, et al. (2000)

        t <- c(0.13,0.4,0.69,0.9,0.98,1)
        upper <- c(5.3666,3.7102,2.9728,2.5365,2.2154,1.9668)
        drift.pr <- drift(zb=upper,t=t,drft=3.242)
        summary(drift.pr)

        t <- c(0.2292,0.3333,0.4375,0.5833,0.7083,0.8333)
        upper <- c(2.53,2.61,2.57,2.47,2.43,2.38)
        drift.ci <- drift(zb=upper,t=t,conf=0.95,zval=2.82)
        summary(drift.ci)
        plot(drift.ci)

        ## Using output from 'bounds'
        t <- seq(0.2,1,length=5)
        obf.bd <- bounds(t,iuse=c(1,1),alpha=c(0.025,0.025))
        drift.dr <- drift(obf.bd$lower.bounds,obf.bd$upper.bounds,t,pow=0.9)
        summary(drift.dr)

