wfunk                  package:eha                  R Documentation

_L_o_g_l_i_h_o_o_d _f_u_n_c_t_i_o_n _o_f _a _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:

     Calculates minus the log likelihood function and its first and
     second order derivatives for data from a Weibull regression model.
     Is called by 'weibreg'.

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

     wfunk(beta, lambda, p, X, Y, offset = rep(0, NROW(X)),
     ord = 2, pfixed = FALSE, trace = TRUE)

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

    beta: Regression parameters

  lambda: The scale paramater

       p: The shape parameter

       X: The design (covariate) matrix.

       Y: The response, a survival object.

  offset: Offset.

     ord: ord = 0 means only loglihood, 1 means score vector as well, 2
          loglihood, score and hessian.

  pfixed: Logical, if TRUE the shape parameter is regarded as a known
          constant in the calculations.

   trace: If TRUE, more verbose output.

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

     Note that the function returns log likelihood, score vector and
     minus hessian, i.e. the observed information. The model is

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

     This is in correspondence with 'dgamma'.

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

     A list with components 

       f: The log likelihood. Present if 'ord >= 0'

      fp: The score vector. Present if 'ord >= 1'

     fpp: The negative of the hessian. Present if 'ord >= 2'

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

     Gran Brostrm

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

     'weibreg'

