probmap                package:spdep                R Documentation

_P_r_o_b_a_b_i_l_i_t_y _m_a_p_p_i_n_g _f_o_r _r_a_t_e_s

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

     The function returns a data frame of rates for counts in
     populations at risk with crude rates, expected counts of cases,
     relative risks, and Poisson probabilities.

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

     probmap(n, x, row.names=NULL)

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

       n: a numeric vector of counts of cases

       x: a numeric vector of populations at risk

row.names: row names passed through to output data frame

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

     The function returns a data frame, from which rates may be mapped
     after class intervals have been chosen. The class intervals used
     in the examples are mostly taken from the referenced source.

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

     raw: raw (crude) rates

expCount: expected counts of cases assuming global rate

 relRisk: relative risks: ratio of observed and expected counts of
          cases multiplied by 100

    pmap: Poisson probability map values: probablility of getting a
          more ``extreme'' count than actually observed - here
          two-tailed, with extreme tails indicating ``unusual'' values

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

     Roger Bivand Roger.Bivand@nhh.no

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

     Bailey T, Gatrell A (1995) Interactive Spatial Data Analysis,
     Harlow: Longman, pp. 300-303.

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

     'EBest', 'EBlocal', 'ppois'

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

     example(auckland)
     res <- probmap(auckland$M77_85, 9*auckland$Und5_81)
     brks <- c(-Inf,2,2.5,3,3.5,Inf)
     cols <- grey(6:2/7)
     plot(auckland, col=cols[findInterval(res$raw*1000, brks, all.inside=TRUE)])
     legend("bottomleft", fill=cols, legend=leglabs(brks), bty="n")
     title(main="Crude (raw) estimates of infant mortality per 1000 per year")
     brks <- c(-Inf,47,83,118,154,190,Inf)
     cols <- cm.colors(6)
     plot(auckland, col=cols[findInterval(res$relRisk, brks, all.inside=TRUE)])
     legend("bottomleft", fill=cols, legend=leglabs(brks), bty="n")
     title(main="Standardised mortality ratios for Auckland child deaths")
     brks <- c(0,0.05,0.1,0.2,0.8,0.9,0.95,1)
     cols <- cm.colors(7)
     plot(auckland, col=cols[findInterval(res$pmap, brks, all.inside=TRUE)])
     legend("bottomleft", fill=cols, legend=leglabs(brks), bty="n")
     title(main="Poisson probabilities for Auckland child mortality")

