predprob                package:pscl                R Documentation

_C_o_m_p_u_t_e _p_r_e_d_i_c_t_e_d _p_r_o_b_a_b_i_l_i_t_i_e_s _f_r_o_m _f_i_t_t_e_d _m_o_d_e_l_s

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

     Compute predicted probabilities from fitted models, optionally at
     new covariate values

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

     predprob(obj, ...)

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

     obj: fitted model object

     ...: other arguments

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

     See documentation for specific methods.

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

     A matrix of predicted probabilities, each row a vector of
     predicted probabilities over the range of responses seen in the
     data (i.e., 'min(y):max(y)'), conditional on the values of
     covariates.

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

     Simon Jackman <jackman@stanford.edu>

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

     'predprob.glm', 'predprob.zeroinfl'

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

     data(bioChemists)
     zip <- zeroinfl(count=art ~ .,
                     x = ~ fem + mar + kid5 + phd + ment,
                     z = ~ fem + mar + kid5 + phd + ment,
                     dist="poisson",        
                     data=bioChemists,trace=TRUE) ## zero-infl poisson
     phat <- predprob(zip)

     newdata <- expand.grid(list(fem="Men",mar="Married",
                                 kid5=1,phd=3.103,
                                 ment=0:77))
     phat <- predprob(zip,newdata=newdata)

