ej.added | R Documentation |
US total sum of net excess vulnerable * E = net excess people-points and contribution of one place = what the EJ Index intends to indicate
ej.added(e, d, p, vs = "nond", silent = TRUE)
e |
Environmental indicator |
d |
Demographic indicator |
p |
Population count (universe for d) |
vs |
Reference group, optional, 'nond' by default which means the reference group is everyone other than the d group (everyone else), but can also specify 'avg' in which case the overall average value including the d group is used as the reference value. |
silent |
Optional, TRUE by default, in which case more details are printed. |
WORK IN PROGRESS. ! e.g., presumes one setting for vs..... ***
Directly calculate total number of excess people-points in a demographic subgroup,
across all locations
**** here by default defining "excess" as above
what it would be if e in d group were same as e in nond group.****
where people-points are e * p * d
e = environmental points or individual risk (vector of places)
p = population counts (vector of places)
d = demographic fraction that is in specified demographic group (vector of places)
For example, if e=cancer risk (individual risk) and p=pop and d=%lowincome,
value returned is number of cases among lowincome individuals in excess of what it
would be if their average risk was the same as that of nonlowincome individuals.
net excess vulnerable * E = net excess people-points
vs can be 'avg' or 'nonD' (default) (not case sensitive),
for, respectively, excess cases relative to risk scenario where
avg d's e is set to that of avg person (all people including d and nonD),
or avg d's e is set to that of avg nonD person.
Returns numeric vector
x=data.frame(pop=rep(1000, 10), pct=0.05+6 * (1:10)/100, e= (10 * (1:10))/100 )
y=ej.added(x$e, x$pct, x$pop, silent=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.