RR.cut.if.gone: How much is overal RR reduced if a given place did not exist?

View source: R/RR.cut.if.gone.R

RR.cut.if.goneR Documentation

How much is overal RR reduced if a given place did not exist?

Description

As with RR function, calculates RR as ratio of means in one demographic group vs reference, based on Census demographic data and environmental indicator data on each place. Then this finds how much smaller RR would be if the given place did not exist.

Usage

RR.cut.if.gone(e, d, pop, dref, na.rm = TRUE)

Arguments

e

environmental indicator value

d

demog group as fraction of pop

pop

pop count

dref

reference demog group as fraction

na.rm

TRUE by default, should NA values be removed first

Examples

 # x=RR.cut.if.gone(bg[ , names.e[8]], bg$pctlowinc, bg$pop)
 # summary(x*1000)
 mydat=data.frame(AQI=99:101, pctlowinc=c(0.20,0.30,0.40), pop=rep(1000,3))
 RR(mydat$AQI, mydat$pctlowinc, mydat$pop)
 RR.cut.if.gone(e=mydat$AQI, d=mydat$pctlowinc, pop=mydat$pop)

ejanalysis/ejanalysis documentation built on April 2, 2024, 10:12 a.m.