Skip to contents

DRAFT - get quantiles of indicator values among all people analyzed See ejamit() (or batch.summarize()) instead of this, for percentiles!

Usage

ejam2quantiles(
  ejamitout,
  vars = names_e_state_pctile,
  w = NULL,
  probs = c(50, 90)/100,
  topx_insteadof_pctile = TRUE
)

Arguments

ejamitout

as from ejamit()

vars

colnames in ejamitout$results_bybg_people

w

weights

probs

as written is always the pctile, but default is to report on the top X%, or 100-probs

topx_insteadof_pctile

logical

Value

info about quantiles of places or people

Details

DRAFT – CANNOT YET ACTUALLY PROVIDE QUANTILES ACROSS UNIQUE PEOPLE if using results_bysite AND DIFFERENT WEIGHTS WOULD BE NEEDED FOR DIFFERENT INDICATORS if using results_bybg_people to avoid overlaps between sites to get unique people.

See ejamit() (or batch.summarize()) instead of this, for percentiles!

Examples


# pctiles
  ejam2quantiles(out,  vars = names_e_state_pctile, topx_insteadof_pctile = F) 
# ratios  
  ejam2quantiles(out, vars = names_e_ratio_to_state_avg,  topx_insteadof_pctile = T)
# see the quantiles and mean together
 t(rbind(
  AvgPerson = ejam2means(out, vars = names_e_ratio_to_state_avg),
  ejam2quantiles(
     out, 
     vars = names_e_ratio_to_state_avg, 
     probs = 0.5, topx_insteadof_pctile = T
  ) 
  ))