ej.added: Contribution of each place to net excess people-points in...

View source: R/ej.added.R

ej.addedR Documentation

Contribution of each place to net excess people-points in demographic group

Description

US total sum of net excess vulnerable * E = net excess people-points and contribution of one place = what the EJ Index intends to indicate

Usage

ej.added(e, d, p, vs = "nond", silent = TRUE)

Arguments

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.

Details

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.

Value

Returns numeric vector

Examples

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)

ejanalysis/ejanalysis documentation built on Oct. 10, 2024, 6:44 p.m.