ezinb                package:zicounts                R Documentation

_T_h_e _e_x_p_e_c_t_e_d _v_a_l_u_e _o_f _t_h_e _c_e_n_s_o_r_e_d _z_e_r_o-_i_n_f_l_a_t_e_d _n_e_g_a_t_i_v_e _b_i_n_o_m_i_a_l _m_o_d_e_l

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

     'ezinb' computes the expected value of the censored zero-inflated 
     negative binomial regression model

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

     ezinb((coeff = NULL, resp = y ~ ., upper = r ~ ., x =  ~ 1, z =  ~ 1, data=NULL,
             sub = NULL)

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

   coeff: Regression coefficients from 'zicensor'  a.k.a censored ZINB
          regression model.

    resp: a symbolic description of the response, of the form resp=y~.,
          where y is the response variable.

       x: a formula to describe the covariates to the Poisson (or
          Negative binomial) part of the model, of the form x=~x1 + x2
          + ..., where x1,x2,...  are explanatory variables.

       z: a formula to describe the covariates to zero-indlated part,
          of the form z=~z1 + z2 + ..., where z1, z2,... are
          explanatory variables.

    data: a frame containing the variables in the model.

     sub: an optional logical expression specifying a subset of
          observations to be used in the fitting process. This should
          be specified in the form: e.g.  subsets =expression(w==0).

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

     returns a vector of the censored zinb expected values.

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

     S. M. Mwalili <samuelmwalili@yahoo.com>

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

     'zicounts,zicensor'.

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

     ## load the artificial 'teeth' data
      data(teeth)
      names(teeth)
      
     ##  fit zero-inflated negative binomial regression model
     zinb.cens <- zicensor(resp = dmft~., upper = decid~.,x =~gender + age,z =~gender + age, data=teeth)
     zinb.cens 

     ## expected value of the censored zinb model
     ## uncomment to run
     #zinb.e <- ezinb(coeff=zinb.cens$coeff,resp = dmft~., upper = decid~.,
     #       x =~gender + age,z =~gender + age, data=teeth)
     #zinb.e

