Package 'EnviroPRA2'

Title: Environmental Probabilistic Risk Assessment Tools
Description: It contains functions for dose calculation for different routes, fitting data to probability distributions, random number generation (Monte Carlo simulation) and calculation of systemic and carcinogenic risks. For more information see the publication: Barrio-Parra et al. (2019) "Human-health probabilistic risk assessment: the role of exposure factors in an urban garden scenario" <doi:10.1016/j.landurbplan.2019.02.005>.
Authors: Fernando Barrio-Parra [aut, cre, cph]
Maintainer: Fernando Barrio-Parra <[email protected]>
License: GPL
Version: 1.0.1
Built: 2024-11-26 06:23:57 UTC
Source: CRAN

Help Index


Environmental Probabilistic Risk Assessment Tools

Description

A collection of functions employed in environmental risk assessment to model exposure to a toxicant and predicting health effects, allowing to characterize variability and uncertainty in risk estimations

Details

A set of tools to perform a deterministic and probabilistic risk assessment.

Author(s)

F.Barrio-Parra

Maintainer: [email protected]

Examples

#### Performs Deterministic Environmental Risk Assessment #####

# Example of dermal contact with a chemical in swiming water

# Estimate the dermal absorbed dose during swiming in waters with a carcinogenic chemical
# (water concentration of 250 mg/m^3)

DWIR ( CW = 250)

# For a systemic effect:

DWIR ( CW= 250, AT=24*365)

# Specifying all the parameters for the carcinogenic case

I = DWIR ( CW=250, IR=1.5, EF = 300, ED = 24, BW = 85)

# Chemical Slope factor

SFAs = 1.5

# Dermal Absorption Factor

ABSAs = 3e-02

# Gastrointestinal Absorption Factor

GIAs = 1

# Risk Estimation

RISKdermal (AD = I, SF = SFAs, GI = GIAs)

#### Perform a test to assess the fitness of a theorical distribution to empirical data ####

set.seed(123)

a <- rnorm(n=100, mean =1.5, sd = 0.25)

b <- rnorm(n = 15, mean = 300, sd = 15)

fit_dist_test(a)

fit_dist_test(b)

# Graphical representation of data fitting to a distribution

plot_fit_dist(a, "norm")

plot_fit_dist(b, "norm")

####  Perform a Probabilistic Environmental Risk Assessment #### 

Fita <- Fit_dist_parameter(a)

Fitb <- Fit_dist_parameter(b)

IRr <-random_number_generator(n = 10000, Fited = Fita, 
                            dist = "norm", a =0.8, b = 2.1)
                            
EFr <-random_number_generator(n = 10000, Fited = Fitb, 
                            dist = "norm", a =250, b = 330)
                            
I = DWIR ( CW=250, IR=IRr, EF = EFr, ED = 24, BW = 85)

# Risk Estimation

Risk <- RISKdermal (AD = I, SF = SFAs, GI = GIAs)

hist (Risk)

quantile (Risk, c (0.05, 0.25, 0.5, 0.75, 0.95))

Dermal conctact with chemicals in soil by bootstrap

Description

Dermal conctact with chemicals in soil by bootstrap

Usage

ADboot(n, CS, SA, AF, ABS, EF, ED, BW, AT)

Arguments

n

Output vector length

CS

Chemical concentrtion in soil [mg/Kg]

SA

Skin surface area available for contact [cm^2]

AF

Skin adherence factor [mg/cm^2]

ABS

Absorption factor (Chemical specific) [-]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical Absorbed dose [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Carcinogenic effects

c <- rnorm( n= 10, mean = 0.2, sd = 0.05 )

b <- rnorm( n= 100, mean = 20, sd = 5 )

ADboot (n = 1000, SA=2300, AF=0.25, ABS=0.01,CS = c, BW = b, ED = 10, EF = 250)

Inhalation of airborne chemicals

Description

Estimates the Intake rate by inhalation of airborne chemicals (vapor phase) [mg/Kg*day]

Usage

AIR(CA = 1, IR = 20, ET = 24, EF = 350, ED = 24, BW = 70, AT = 365 * 70)

Arguments

CA

Chemical concentrtion in air [mg/m^3]

IR

Inhalation Rate [m^3/hour]

ET

Exposure time [hours/day]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Intake rate by inhalation of airborne chemicals (vapor phase) I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

References

US Environmental Protection Agency, 2011. Exposure Factors Handbook: 2011 Edition. U.S. Environmental Protection Agency, EPA/600/R-(September), pp 1466.

Examples

## Estimated absorbed dose for the estimation of carcinogenic effects using 
# the default variables (EPA 2011) for a chemical air concentration 
# of 0.2 mg/m^3

AIR ( CA=0.2)

# For a systemic effect:

AIR ( CA=0.2, AT=24*365)

# Specifying all the parameters for the carcinogenic case

AIR ( CA=0.2, IR=25, ET = 24, EF = 300, ED = 24, BW = 85)

Inhalation of airborne chemicals by bootstrap

Description

Estimates the Intake rate by inhalation of airborne chemicals (vapor phase) [mg/Kg*day]

Usage

AIRboot(n, CA, IR, ET, EF, ED, BW, AT)

Arguments

n

Output vector length

CA

Chemical concentrtion in air [mg/m^3]

IR

Inhalation Rate [m^3/hour]

ET

Exposure time [hours/day]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Intake rate by inhalation of airborne chemicals (vapor phase) I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Carcinogenic effects

c <- rnorm( n= 10, mean = 0.2, sd = 0.05 )

b <- rnorm( n= 100, mean = 20, sd = 5 )

AIRboot (n = 1000, CA=c, IR=25, ET = 24, EF = 300, ED = 24, BW = b)

p-value significance checking function

Description

Auxiliar function to check p-value significance (Function created for internal use of the model).

Usage

condition(n)

Arguments

n

p-value

Value

Return "Significant" or "Not-significant" - Object class "character"

Examples

condition ( 0.001)

condition (0.1)

Chemical intake by Drinking Water

Description

Estimates the chemical Intake rate by Drinking Water [mg/Kg*day]

Usage

DWIR(CW = 1, IRW = 2, EF = 350, ED = 24, BW = 80, AT = 365 * 70)

Arguments

CW

Chemical concentrtion in water [mg/L]

IRW

Water Ingestion Rate [L/Day]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical intake rate by drinking water I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

References

US Environmental Protection Agency, 2011. Exposure Factors Handbook: 2011 Edition. U.S. Environmental Protection Agency, EPA/600/R-(September), pp 1466.

Examples

# Estimate the dermal absorbed dose during swiming in waters with a carcinogenic chemical
# (water concentration of 250 mg/m^3)

DWIR ( CW = 250)

# For a systemic effect:

DWIR ( CW= 250, AT=24*365)

# Specifying all the parameters for the carcinogenic case

DWIR ( CW=250, IR=1.5, EF = 300, ED = 24, BW = 85)

Chemical intake by Drinking Water by bootstrap

Description

Estimates the chemical Intake rate by Drinking Water [mg/Kg*day]

Usage

DWIRboot(n, CW, IRW, EF, BW, ED, AT)

Arguments

n

Output vector length

CW

Chemical concentrtion in water [mg/L]

IRW

Water Ingestion Rate [L/Day]

EF

Exposure frequency [day/yr]

BW

Body weight [Kg]

ED

Exposure duration [yr]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical intake rate by drinking water I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Carcinogenic effects

c <- rnorm( n= 10, mean = 250, sd = 15 )

b <- rnorm( n= 100, mean = 20, sd = 5 )

DWIRboot (n = 1000, CW=c, IR=1.5, EF = 300, ED = 24, BW = b)

Extracts the fitted distribution parameters to be introduced in other function

Description

Auxiliar function for internal use only

Usage

extr_par(x, dist)

Arguments

x

List of parameters obtained by the aplication of the Fit_dist_parameter function

dist

Name of the distribution we would like to stract the parameters ("norm", "lnorm", "geom", "exp", "pois", "gamma", "cauchy", "logis", "weibull", "nbinom", "beta", "chisq", "t", "f")

Value

A list of fitted parameters.

Author(s)

F. Barrio-Parra

Examples

a <- rnorm(n=100, mean =10, sd = 1) 

b <- Fit_dist_parameter(a)

extr_par(x = b, dist ="norm")

Returns adjusted distribution parameters

Description

Returns the distribution parameters adjusted for by maximum likelihood (mle) for the following distributions: "normal","log-normal","geometric","exponential","Poisson", "cauchy" , "logistic" and "weibull"

Usage

Fit_dist_parameter(x)

Arguments

x

A numeric vector of length at least one containing only finite values (non-censored data)

Value

normal

Fitted Mean and sd for a normal distribution

`log-normal`

Fitted Meanlog and sdlog for a log-normal distribution

geometric

Fitted prob for a geometric distribution

exponential

Fitted rate for a exponential distribution

Poisson

Fitted lambda for a exponential distribution

cauchy

Fitted location and scale for a Cauchy distribution

logistic

Fitted location and scale for a Logistic distribution

weibull

Fitted shape and scale for a weibull distribution

Author(s)

F. Barrio-Parra

See Also

Function fitdistr in Library (MASS)

Examples

a <- rnorm(n=100, mean =10, sd = 1) 

b <- Fit_dist_parameter(a)

# Examples of result extraction

b$normal

b$weibull

Summary of Godness-of-fit tests

Description

Returns a data frame with the summary of Fiting distribution tests for the following distributions: "normal","log-normal","geometric","exponential","Poisson", "cauchy" , "logistic" and "weibull".

The considered Godness-of-fit tests are: Bayesian Information Criterium (BIC), Akaike Information Criterium (AIC), Kolmogorov-Smirnov test and Anderson-Darling test.

Usage

fit_dist_test(x)

Arguments

x

A numeric vector of length at least one containing only finite values

Value

Distribution

Name of the tested distribution

BayesianIC

Bayesian Information Criterium (BIC)

AkaikeIC

Akaike Information Criterium (AIC)

Kol-SmirD

The value of the Kolmogorov-Smirnov test statistic

Kol-SmirPvalue

The value of the Kolmogorov-Smirnov test p-value

Signigicance KS

A column to check the significance of the Kolmogorov-Smirnov test

And-Darl

The value of the nderson-Darling test statistic

And-DarlPvalue

The value of the Anderson-Darling test p-value

Signigicance AD

A column to check the significance of the Anderson-Darling test

Author(s)

F. Barrio-Parra

See Also

ad.test library(kSamples), AIC library(stats), BIC library(stats), ks.test library(stats),

Examples

set.seed(123)

a <- rnorm(n=100, mean =10, sd = 1) 

fit_dist_test(a)

b<- rexp(n = 100,rate = 1)

fit_dist_test(b)

Hazard Index

Description

Returns the Hazard Index (non carcinogenic effects)

Usage

HI(I, RFD)

Arguments

I

Intake Rate [mg/Kg*day]

RFD

Reference dose [mg/Kg*day]

Value

Hazard Index [-] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Assessing if there is systemic risk for an adult receptor that drinks water with 1000 ug/L 
# of hexaclorobence (Reference Dose (IRIS data base) = 8e-04 [mg/Kg*day]) in a residencial 
# scenario (default EPA Maximum Reasonable Exposure parameters)


HI (I = DWIR( CW=1, AT=24*365), RFD = 8e-04)

Hazard Index for dermal contact

Description

Returns the Hazard Index for dermal exposure with chemicals (non carcinogenic effects)

Usage

HIdermal(AD, RFD, GI)

Arguments

Absorbed dose [mg/Kg*day]

RFD

Reference dose [mg/Kg*day]

GI

Gastrointestinal Absorption factor (chemical specific) [-]

Value

Hazard Index [-] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Assess if there is non-carcinogenic risk for an dadult thorug dermal 
# contact exposed to a soil that contains 45 mg/Kg of As in a residencial 
# scenario (default EPA Maximum Reasonable Exposure parameters)

RfDAs = 3e-04

# Dermal Absorption Factor

ABSAs = 3e-02

# Gastrointestinal Absorption Factor

GIAs = 1

I = AD (CS = 45,ABS = ABSAs, AT= 24*365)

HIdermal (AD = I, RFD = RfDAs, GI = GIAs)

Hazard Index for inhalation of vapors

Description

Returns the Hazard Index (systemic effects) for inhalation of vapors

Usage

HIinhal(INH, RFC)

Arguments

INH

Inhalated dose (mg/m^3)

RFC

Reference concentration (mg/m^3)

Value

Hazard Index (non carcinogenic effects) [-] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Assess if there is systemic risk for the exposure of an adult 
# (Reasonable Maximum Exposure) to a Toluene air concentration of 2 mg/ m^3 

HIinhal (INH = AIR (CA = 2, AT = 365*24), RFC = 5)

Inhalation of resuspended soil particles

Description

Estimates the Intake rate of chemicals by inhalation of resuspended soil particles [mg/Kg*day]

Usage

INH(C = 10, EF = 350, ED = 24, PEF = 1.36^9, AT = 365 * ED)

Arguments

C

Concentration of chemicals in soil(mg/kg)

EF

Exposure frequency (day/year)

ED

Exposure duration (years)

PEF

Particle emision factor meaning resuspended particles(m^3/kg)

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical intake rate by inhalation of soil particles I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

References

US Environmental Protection Agency, 2011. Exposure Factors Handbook: 2011 Edition. U.S. Environmental Protection Agency, EPA/600/R-(September), pp 1466.

Examples

# Estimated dose for the estimation of carcinogenic effects due to the 
# inhalation of soil particles  that contains 45 mg/Kg of As in a residencial 
# scenario (default EPA Maximum Reasonable Exposure parameters)

INH(C= 45, AT = 365*70)

# For non-carcinogenic effects:

INH(C= 45)

Graphical representation of data fitting to a distribution

Description

A function to help assessing the distribution that best fit a data vector

Usage

plot_fit_dist(x, dist)

Arguments

x

A numeric vector of length at least one containing only finite values (values must be >= 0)

dist

Character vector indicating the distribution to be ploted:"norm", "lnorm", "geom", "exp", "pois", "cauchy", "logis", "weibull"

Value

Returns: Empirical and theoretical density plots, Empirical and theoretical CDFs, Q-Q plot, P-P plot

Author(s)

F. Barrio-Parra

See Also

plotdist from Library (fitdstrplus)

Examples

set.seed(123)
a <- rnorm(n = 100, mean = 10, sd = 1)
plot_fit_dist(a, "norm")

Random number generator

Description

Return a vector of n random numbers following a truncated distribution (dist) in agreement with a fitted parameters "Fited"

Usage

random_number_generator(n, Fited, dist, a, b)

Arguments

n

The number of desired generated numbers

Fited

A list contaning the parameters obtained by application of Fit_dist_parameter

dist

Character vector indicating the distribution to be applied:"norm", "lnorm", "geom", "exp", "pois", "cauchy", "logis", "weibull"

a

Truncation Lower limit

b

Truncation Upper limit

Value

A vector of n random numbers - Object class "numeric"

Author(s)

F. Barrio-Parra

See Also

Fit_dist_parameter

Examples

set.seed(123)
a <- rnorm(n = 100, mean = 10, sd = 1)
Fit <- Fit_dist_parameter(a)

b <-random_number_generator(n = 10000, Fited = Fit, 
                            dist = "norm", a =8, b = 12)

hist(a,xlim= c(7,14))
hist(b,xlim= c(7,14))

Risk

Description

Returns the Risk estimation (carcinogenic effects)

Usage

RISK(I, SF)

Arguments

I

Intake Rate [mg/Kg*day]

SF

Slope Factor [(mg/Kg*day)^-1] (chemical specific)

Value

Risk [-] - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

# Assessing if there is carcinogenic risk for an adult receptor that drinks water with 1000 ug/L 
# of hexaclorobence (Oral Slope Factor (IRIS data base) = 1.6 [mg/Kg*day]^-1) in a residencial 
# scenario (default EPA Maximum Reasonable Exposure parameters)


RISK (I = DWIR( CW=1), SF = 1.6)

Risk for dermal contact

Description

Returns the Risk for dermal exposure with chemicals (carcinogenic effects)

Usage

RISKdermal(AD, SF, GI)

Arguments

Absorbed dose [mg/Kg*day]

SF

Slope Factor [(mg/Kg*day)^-1] (chemical specific)

GI

Gastrointestinal Absorption factor (chemical specific) [-]

Value

Risk [-] - Object class "numeric"

Author(s)

F. Barrio-Parra

See Also

AD

Examples

# Assess if there is carcinogenic risk for an dadult thorug dermal 
# contact exposed to a soil that contains 45 mg/Kg of As in a residencial 
# scenario (default EPA Maximum Reasonable Exposure parameters)

SFAs = 1.5

# Dermal Absorption Factor

ABSAs = 3e-02

# Gastrointestinal Absorption Factor

GIAs = 1

I = AD (CS = 45,ABS = ABSAs)

RISKdermal (AD = I, SF = SFAs, GI = GIAs)

Risk for inhalation of vapors

Description

Returns the risk (carcinogenic effects) for inhalation of vapors

Usage

RISKInhal(URi, I)

Arguments

URi

Inhalation Unit risk [(ug/m^3)^-1]

I

Inhalated dose (mg/m^3)

Value

Risk [-] - Object class "numeric"

Examples

# Assess if there is cancer risk for the exposure of an adult 
# (Reasonable Maximum Exposure) to a benzene air concentration of 2 mg/ m^3 

RISKInhal ( I = AIR (CA = 2), URi = 7.8e-06)

Execute sampling with replacement

Description

Auxiliar function (employed only for internal use)

Usage

sampler(n, a)

Arguments

n

Number of sampling iterations

a

data vector

Value

Resampled vector of length n - Object class "numeric"

Author(s)

F. Barrio-Parra

Examples

a <- rnorm (n = 20, mean = 0, sd = 1)

b <- sampler (n = 100, a = a)

Significance level cheking function

Description

Function that return if the p-value allows to accept H0 in a Kolmogorov Smirnov or Anderson Darling test

Usage

sig(n)

Arguments

n

p-value

Value

Text string ("Significant"" / "Not Significant"") - Object class "character"

Examples

sig ( 0.001 )

sig ( 0.1 )

Chemical intake by accidental soil ingestion

Description

Estimates the chemical Intake rate by accidental soil ingestion [mg/Kg*day]

Usage

SIR(CS = 1, IR = 100, FI = 1, EF = 350, ED = 24, BW = 80, AT = 365 * 70)

Arguments

CS

Chemical concentrtion in soil [mg/Kg]

IR

Soil Ingestion Rate [mg/Day]

FI

Fraction ingested from contaminated source [-]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical intake rate by soil ingestion I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

References

US Environmental Protection Agency, 2011. Exposure Factors Handbook: 2011 Edition. U.S. Environmental Protection Agency, EPA/600/R-(September), pp 1466.

Examples

# Ingestion rate for a children weighing 20 Kg who ingest 200 mg 
# of soil every day, 250 days per year during 10 years. 95-UCL of
# Arsenic in soil is 25 mg/Kg

# Carcinogenic effects

SIR ( CS = 25, BW = 20, IR = 200, ED = 10, EF = 250)

# Systemic effects

SIR ( CS = 25, BW = 20, IR = 200, ED = 10, EF = 250, AT = 365*10)

Chemical intake by accidental soil ingestion by bootstrap

Description

Estimates the chemical Intake rate by accidental soil ingestion [mg/Kg*day]

Usage

SIRboot(n, CS, IR, FI, EF, ED, BW, AT)

Arguments

n

Output vector length

CS

Chemical concentrtion in soil [mg/Kg]

IR

Soil Ingestion Rate [mg/Day]

FI

Fraction ingested from contaminated source [-]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight [Kg]

AT

Averaging time [day] (Note that for No carcinogenic effects AT should be equal to 365*ED)

Value

Chemical intake rate by soil ingestion I [mg/Kg*day] - Object class "numeric"

Examples

# Carcinogenic effects

c <- rnorm( n= 10, mean = 22, sd = 2 )

b <- rnorm( n= 100, mean = 20, sd = 5 )

SIRboot (n = 1000, CS = c, BW = b, IR = 200, ED = 10, EF = 250)

Chemical intake by ingestion of vegetables

Description

Estimates the chemical Intake rate by ingestion of contaminated fruits and vegetables [mg/Kg*day]

Usage

VI(CF = 1, IR = 210, FI = 1, EF = 350, ED = 24, BW = 80, AT = 365 * 70)

Arguments

CF

Chemical concentration in food [mg/Kg]

IR

Vegetables Ingestion Rate [g / Kg * Day]

FI

Fraction ingested from contaminated source [-]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body weight (kg)

AT

Averaging time [day] (For No carcinogenic effects AT = 365*ED)

Value

Chemical intake rate by vegetable ingestion I [mg/Kg*day] - Object class "numeric"

Author(s)

F. Barrio-Parra

References

US Environmental Protection Agency, 2011. Exposure Factors Handbook: 2011 Edition. U.S. Environmental Protection Agency, EPA/600/R-(September), pp 1466.

Examples

# Assess the chemical intake by an adult that eats lettuce with a concentration of 2 mg/ Kg 
# in a maximum reasonable exposure scenario for non- carcinogenic effects

VI (CF = 2, AT = 365*24)

Chemical intake by ingestion of vegetables by bootstrap

Description

Estimates the chemical Intake rate by ingestion of contaminated fruits and vegetables [mg/Kg*day]

Usage

VIboot( n, CF, IR, FI, EF, ED, BW, AT)

Arguments

n

Output vector length

CF

Chemical concentrtion in food [mg/Kg]

IR

Vegetables Ingestion Rate [g / Kg * Day]

FI

Fraction ingested from contaminated source [-]

EF

Exposure frequency [day/yr]

ED

Exposure duration [yr]

BW

Body Weight [Kg]

AT

Averaging time [day] (For No carcinogenic effects AT = 365*ED)

Value

A vector of Chemical intake rate by vegetable ingestion I [mg/Kg*day] - Object class "numeric"

Examples

# Assess the chemical intake by an adult that eats lettuce with a concentration of 2 mg/ Kg of a 
# chemical with non- carcinogenic effects in a maximum reasonable exposure scenario
# Figure out 10 data of Chemical concentration following a normal distribution (mean = 2, sd= 2)
# and 100 Body weight data that follow a normal distribution (mean = 70, sd = 15)

c <- rnorm( n= 10, mean = 2, sd = 2 )

b <- rnorm( n= 100, mean = 70, sd = 5 )

VIboot (n = 1000, CF = c, BW = b, AT = 365*24)