weibreg                 package:eha                 R Documentation

_W_e_i_b_u_l_l _r_e_g_r_e_s_s_i_o_n

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

     Proportional hazards model with baseline hazard(s) from the
     Weibull family of distributions. Allows for stratification with
     different scale and shape in each stratum, and left truncated and
     right censored data.

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

     weibreg(formula = formula(data), data = parent.frame(),
     na.action = getOption("na.action"), init, shape = 0,
     control = list(eps = 1e-04, maxiter = 10, trace = FALSE),
     singular.ok = TRUE, model = FALSE, x = FALSE, y = TRUE)

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

 formula: a formula object, with the response on the left of a ~
          operator, and the terms on the right. The response must be a
          survival object as returned by the Surv function.

    data: a data.frame in which to interpret the variables named in the
          formula.

na.action: a missing-data filter function, applied to the model.frame,
          after any subset argument has been used. Default is
          'options()$na.action'.

    init: vector of initial values of the iteration. Default initial
          value is zero for all variables.

   shape: If positive, the shape parameter is fixed at that value (in
          each stratum). If zero or negative, the shape parameter is
          estimated. If more than one stratum is present in data, each
          stratum gets its own estimate.

 control: a list with components 'eps' (convergence criterion),
          'maxiter' (maximum number of iterations), and 'silent'
          (logical, controlling amount of output). You can change any
          component without mention the other(s).

singular.ok: Not used.

   model: Not used.

       x: Return the design matrix in the model object?

       y: Return the response in the model object?

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

     The parameterization is the same as in 'coxreg', 'coxreg', and
     'coxph', but different from the one used by 'survreg'. To compare
     regression coefficients with the latter, multiply them by minus
     the (estimated) shape parameter.

     The model is

 h(t; p, lambda, beta, z) = lambda (t / lambda)^{p-1}exp(-( t / lambda )^p) exp(zbeta)

     Note that this is in correspondence with 'dgamma', but not with
     'survreg'! To compare regression coefficients with those from
     'survreg' you need to divide by estimated shape (hat{p}) and
     change sign. The p-values and test statistics are however the
     same, with one exception; the score test is done at maximized
     scale and shape in 'weibreg'.

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

     A list of class 'c("weibreg", "coxreg", "coxph")' with components 

coefficients: Fitted parameter estimates.

     var: Covariance matrix of the estimates.

  loglik: Vector of length two; first component is the value at the
          initial parameter values, the second componet is the
          maximized value.

   score: The score test statistic (at the initial value).

linear.predictors: The estimated linear predictors.

   means: Means of the columns of the design matrix.

 w.means: Weighted (against exposure time) means of covariates;
          weighted relative frequencies of levels of factors.

       n: Number of spells in indata (possibly after removal of cases
          with NA's).

  events: Number of events in data.

   terms: Used by extractor functions.

  assign: Used by extractor functions.

       y: The Surv vector.

     isF: Logical vector indicating the covariates that are factors.

  covars: The covariates.

     ttr: Total Time at Risk.

  levels: List of levels of factors.

 formula: The calling formula.

    call: The call.

  method: The method.

convergence: Did the optimization converge?

    fail: Did the optimization fail? (Is 'NULL' if not).

  pfixed: TRUE if shape was fixed in the estimation.

_W_a_r_n_i_n_g:

     The print method 'print.weibreg' doesn't work if threeway or
     higher order interactions are present. Use 'print.coxph' in that
     case.

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

     Gran Brostrm

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

     'coxreg', 'mlreg', 'print.weibreg'

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

      dat <- data.frame(time=  c(4, 3,1,1,2,2,3),
                     status=c(1,1,1,0,1,1,0),
                     x=     c(0, 2,1,1,1,0,0),
                     sex=   c(0, 0,0,0,1,1,1))
      weibreg( Surv(time, status) ~ x + strata(sex), data = dat) #stratified model

