# Presentation: 255787

## Using logistic regression to predict the probability of occurrence of volatile organic compounds in ground water

- by
- Michael Moran
- NAWQA VOC National Synthesis

**Notes:**

The title of my talk is: Using logistic regression to predict the probability of occurrence of volatile organic compounds in ground water.

What I would like to do is share with you some of the experiences that the VOC Synthesis team has had with using logistic regression to identify significant explanatory variables and to predict VOC occurrence.

##  3,883 NAWQA-sampled wells analyzed 

- _Cycle 1 Ground Water Sampling_

-  3,883 NAWQA-sampled wells analyzed
-     for 55 target VOCs

-  161 total networks

-  1,185 wells sampled by other agencies (Retro)
-    and analyzed for up to 55 VOCs

-  98 MAS networks

-  33 Urban networks

-  30 Agricultural networks

**Notes:**

First off, let’s examine the ground water sampling that NAWQA has done in Cycle 1 for VOCs.

NAWQA sampled a total of 3,883 wells in Cycle 1.  Samples from each well were analyzed for at least 55 VOCs which we consider to be the most important (target) VOCs.  Most samples were analyzed for more, from 60 to over 80. 

In addition to the NAWQA data, 1,185 wells were sampled by other agencies.  These samples were analyzed for up to 55 target VOCs.  The characteristics of sampling and analysis for these wells was similar enough for them to be considered as supplemental data for NAWQA data.  Theses data were included in the total number of wells as being equivalent to MAS networks.  We call these retrospective data and they were compiled by the study units or VOC Synthesis.

So a total of 5,068 wells were sampled and analyzed for VOCs and form the basis of our Cycle 1 work on VOCs for NAWQA.

Wells in the NAWQA studies were grouped by networks.  A network is defined as set of wells that share some common characteristics.  3 types of NAWQA networks were sampled in Cycle 1: Major Aquifer Surveys (formerly called the Study Unit Surveys) of which there were 98 networks, urban land use studies of which there were 33 networks, and agricultural land use studies in which there were 30 networks.  This makes a total of 161 networks sampled in Cycle 1 of NAWQA.

## NAWQA VOC Monitoring

**Notes:**

This map shows the locations of centroids of wells in each of the 161 networks.  The centroids are color-coded to show the distribution of each type of network.

Ag networks are colored yellow; MAS networks are colored blue; and urban networks are colored red.

As you can see, when considered together, there is a fairly good distribution of networks throughout the conterminous US.  Alaska and Hawaii also have a few networks.

##  Contingency tables

- _Hypothesis Testing_

-  Contingency tables

-  Mann-Whitney test

-  Kolmogorov-Smirnov test

- _Correlation_

-  Spearman correlation

- _Associations_

-  Multivariate logistic regression

**Notes:**

The VOC data from the NAWQA sampling/compilation efforts was analyzed using a variety of statistical analyses.

To test hypotheses, analyses such as contingency tables, Mann-Whitney tests, and Kolmogorov-Smirnov tests were employed.

For correlations, Spearman’s correlation was used.

To determine associations between the binary occurrence of VOCs and various explanatory variables, logistic regression was used.  Most analyses were done using multiple explanatory variables and thus the logistic regression analyses were multivariate.  In addition to associations, logistic regression can sometimes be used to produce equations that can predict the probability of VOCs, or other contaminants, in ground water.

##  Response is ideal for censored data

- _Advantages_

-  Response is ideal for censored data

-  Can be univariate or multivariate

-  Can identify variables associated with response

-  Can predict probability of binary or ordinal
-     response relative to independent variables

- _Disadvantages_

-  Independent variables often generalized

-  Can be difficult to extrapolate probability beyond
-     sample point

**Notes:**

A basic definition of logistic regression is a type of linear association analysis where the response variable (also called the dependent variable) is binary or categorical and is modeled as a probability.

The advantages of logistic regression include:
	a) response is usually binary but can be multinomial – that 		means highly censored data (like VOCs) can be 	used
	b) the analyses can be univariate or multivariate
	c) explanatory variables significantly associated with occurrence 		can be identified – possibly giving insight into STF
	d) the probability of occurrence can be predicted using LR 		equation

The disadvantages of logistic regression include:
	a) independent variables are often too general to be useful in 		identifying specific sources/processes/transport mechanisms
	b) it is often difficult to extrapolate the probability of occurrence 		beyond the sample point

## Logistic Regression

- _Logistic Regression Equation_

- where,
*P* = probability of detecting VOC,
- 0 = y-intercept,
- *i* = slope coefficient of X1 to X*i*  explanatory variables,
- X*i* = 1 to *i* explanatory variables

**Notes:**

This is the general form of the equation used in logistic regression.

P is the probability of the occurrence of a VOC, or multiple VOCs.  Bo is the y-intercept of the probability function; X1-i is the matrix of explanatory (or independent) variables, and B1-i is the matrix of estimated slope coefficients for each explanatory variable.

The LR equation is used to predict the probability of occurrence relative to one or more explanatory variables.  The explanatory variables that can help predict occurrence should be significantly associated with occurrence.  This means a statistical significance associated with a certain test such as the partial likelihood test.  In addition, if used for prediction, a model should have favorable results from goodness-of-fit tests like the Hosmer-Lemeshow test.  Finally, if used for prediction, separate calibration and validation steps should be performed.

In some cases, few or no explanatory variables are associated with occurrence.  This can limit the usefulness of the equation.

##  MTBE and 4 solvents; DCM, PCE, TCA, TCE

-  MTBE and 4 solvents; DCM, PCE, TCA, TCE

-  Regressions were done to establish associations

-  No attempt to predict probability of occurrence

**VOC Analyses**

- _Process Understanding_

-  Any VOC for all networks – National Scale
-       [ES&T, vol. 33, no. 23, p. 4176-4187]

-  Individual VOCs in urban land use studies
-       [ES&T, vol. 38, no. 20, p. 5327-5338]

-  Most frequently detected VOCs analyzed

**Notes:**

In explaining the logistic regression we have done for VOCs, I am going to separate them into prediction and process understanding.  

Prediction analyses include those we completed in the past and have used to predict the probability of VOCs in ground water.  These include an analysis of VOC occurrence at a national scale – our first LR analysis – which we used to produce a map of probability of VOC occurrence.

Process understanding analyses include many of our more recent analyses. This includes analyses of VOCs in urban areas, where we analyzed associations with the most frequently detected VOCs in these areas, as well as analyses of MTBE and solvents in ground water.  For these analyses, the regressions were only done to establish associations – no attempt has yet been made to predict occurrence of these VOCs based on LR equations.

##  Prediction was applied to analysis of 

-  Prediction was applied to analysis of
-     any VOC for all networks
-       [ES&T, vol. 33, no. 23, p. 4176-4187]

-  Logistic regression equation was univariate

-  Probability of occurrence of any VOC was
-     only related to population density

-  Although little was learned about STF, the
-     probability of occurrence could be extrapolated

**VOC Analyses**

**Notes:**

In our first analysis of VOC occurrence we used logistic regression to predict the probability of occurrence of VOCs.  We first started this work in 1995.  The analysis was done for any VOC – meaning the occurrence of any one or more VOCs – and for all networks sampled at the time (networks sampled from 1985-1995).

We found only one variable was found to be significantly associated with VOC occurrence – population density – and therefore the equation was univariate.  

Because only population density was significantly associated with occurrence, little was learned about the sources, transport, and fate of VOCs.  However, the probability of occurrence could be easily extrapolated to the entire nation because we had population density estimates for every square kilometer of the conterminous US in a GIS grid.

## VOC Analyses

**Taken from: Squillace, P.J., Moran, M.J., Lapham, W.W., Price, C.V., Clawges, R.M., and Zogorski, J.S., 1999, Volatile organic compounds in untreated ambient groundwater of the United States, 1985-1995:  Environmental Science & Technology, v. 33, no. 23, p. 4176-4187.**** **

**VOC Analyses**

**Notes:**

This map shows the results of this extrapolation.  It shows the probability of detecting one or more VOCs in ground water based on the association with population density.

The map was constructed by applying the LR equation to a 1 km2 grid of population density of the Nation and in areas where more than 5 people/km2 were using ground water.  Population density was obtained by estimating the 1990 census block data to a uniform 1km2 grid.

It’s important to note that the binary occurrence of VOCs was based on the occurrence of one or more VOCs at an assessment level of 0.2 ug/L.  This was necessary because much of the early NAWQA VOC data had this laboratory reporting level.  We have found that, for VOCs, the reporting level that is applied to an LR analysis can have a profound effect on the detection frequency of a VOC as well as the variables that are significantly associated with its occurrence in ground water.

##  Prediction could not be applied to analysis of 

-  Prediction could not be applied to analysis of
-     individual VOCs in urban land-use studies
-       [ES&T, vol. 38, no. 20, p. 5327-5338]

**VOC Analyses**

-  Logistic regression only yielded associations

-  Many equations included variables that could
-     not be extrapolated beyond the sample point

-  Example: dissolved oxygen was related
-     to many VOCs but the concentration
-     of dissolved oxygen was unknown beyond
-     the sampled well

**Notes:**

Let’s take a closer look at process understanding analyses we have done.  Remember, these are our more recent analyses.

Another LR analysis that we did was VOCs in urban land use areas.  In these areas, shallow, recently recharged ground water was sampled to determine the effects of human inputs of contaminants.  Prediction using the LR equation was not attempted and only yielded associations with explanatory variables.  

In this case, the occurrence of 14 of the most frequently detected individual VOCs was examined using no assessment level.  The data used were from urban LUSs in 1994-1997 NAWQA study units.  These study units were chosen because they had VOC analyses performed using low-level analytical methodology.  We used the occurrence data in the LR models without applying any assessment level – in other words, we used all valid detections.

The reason that prediction was not attempted in this case was because many of the variables that were significantly associated with VOC occurrence could not confidently extrapolated beyond the sample point.  For example, dissolved oxygen was associated with a number of VOCs but the value of dissolved oxygen in ground water was unknown beyond the sample point.

##   Source and transport variables often surrogates

**VOC Analyses**

-   Source and transport variables often surrogates

-  Example: sources often were population
-                   density and urban land use

-   For some variables, extrapolation beyond the
-      sample point may not be possible

-  Example: transport variable depth to top
-                   of open interval

**Notes:**

More recent analyses of VOCs using logistic regression have been performed in support of the national circular on VOCs in ground water from cycle 1 of NAWQA.  This analysis was done for ground water from major aquifer sampled during NAWQA Cycle 1.  The 10 most frequently occurring VOCs in ground water were analyzed.

Although numerous source and transport variables were associated with VOC occurrence, many of these were aggregate surrogates.  In other words, these variables lacked specificity.  For example, sources related to the probability of occurrence were often population density and urban land use.  These variables do not indicate specific sources but probably represent all the potential sources associated with human activities in urban areas.

Like the analysis of VOCs in urban shallow ground water, for some significantly-associated variables extrapolation beyond the sample point was not possible.  For example, the transport variable depth to the top of the open interval was associated with several VOCs. This variable is viewed as a surrogate for thickness of the unsaturated zone, which is difficult to estimate beyond the sample point.

## Process Understanding – Various VOCs in Ground Water

**VOC Analyses**

| VOC | Associated variables |
| --- | --- |
| Methyl tert-butyl ether 
(MTBE) | population density
use of MTBE in gasoline
recharge
aquifer consolidation
soil permeability
leaking underground storage tanks |
| Perchlorethene (PCE) | urban land use
sand content of soil
dissolved oxygen
soil erodibility
RCRA sites within 1km 
depth to top of screened interval
septic systems within 1km |
| Trichloroethene
(TCE) | population density
dissolved oxygen
RCRA sites within 1km
CERCLA sites within 1km
casing diameter |
| 1,1,1-Trichloroethane
(TCA) | dissolved oxygen
urban land use
population density
depth to top of screened interval 
recharge
CERCLA sites within 1km
septic systems within 1km |
| Methylene chloride
(DCM) | population density
bulk density of soil
sand content of soil
urban land use
median year of home construction |

- - **estimation is possible**

-  **estimation may**
**be difficult**

**Notes:**

This table shows the result of LR analyses for 5 commonly occurring VOCs in ground water.  These analyses were done to support the circular and appear in several USGS reports.  The VOCs include MTBE and 4 solvents, PCE, TCE. TCA, and DCM.  Each independent variable significantly associated with each VOC is shown on the right.

The associated explanatory variables highlighted in green in this table are those for which use in an LR equation to estimate the probability of occurrence would be possible.  The variables highlighted in red in this table are those for which use in an LR equation to estimate the probability of occurrence would be difficult.

As can be seen, all of the VOCs had at least one explanatory variable for which use in an LR equation to estimate the probability of occurrence would be difficult.  Most of these are various hydrogeologic variables.  These values were mostly point data available only for each individual wells and are difficult to extrapolate beyond the well.  Examples are dissolved oxygen and depth to top of the screened interval.

##  This may be useful for determining the

- _Logistic Regression __**IS**__ useful for:_

-  Identifying variables associated with
-     occurrence of VOCs in ground water

**** This may be useful for determining the
-       factors that cause or influence occurrence

-  Ranking variables associated with
-     occurrence by importance

**** This may be useful for determining the
-      relative importance of factors that
-      cause or influence occurrence

**Notes:**

So here are some observation about logistic regression models as analysis tool for VOCs in ground water.  Based on our experiences, logistic regression is useful for:
	1. Identifying variables associated with occurrence of VOCs in 	    ground water 
		- this may be useful for determining the factors that 		cause or influence occurrence and thus could give 		valuable insight into sources, transport, and fate 		

	2. Ranking variables according to their importance in association 	    with occurrence (to do this the variables must first be 	    standardized)
		- this may be useful for determining the relative 		importance of factors that cause or influence 			occurrence and thus could give additional insight 		into sources, transport, and fate 

## Observations

- _Logistic Regression __**MAY BE**__ useful for:_

-  Predicting the probability of occurrence of VOCs
-     in ground water provided:

-  Data are not spatially limited
-  Data are not from highly specific
-      sampling approaches
-  Explanatory variables can be extrapolated

**Notes:**

Logistic regression may be useful for:
	A.  Predicting the probability of occurrence of VOCs in ground 	     water provided:
		1. The data are not spatially limited – in other words, as 		     long as the data are representative of the entire area 		     to be predicted
		2.  The data are not from highly specific sampling 		     approaches  - if so, they may not be accurately 		     portray the entire area to be predicted
		3.  The explanatory variables can be extrapolated beyond 		     the sample point – if not, the equation is not useful for 		     prediction

In the next 3 slides I will attempt to illustrate these limitations to logistic regression.

## Hypothetical Cases

**Hypothetical Cases**

- Hypothetical Aquifer Study Area

**Sampled wells used**
**to develop LR equation**

**Extrapolate LR equation **
**to here?**

**Notes:**

This is a hypothetical map showing the geographic outline of an aquifer and where wells  have been sampled for VOC analyses. Note that the sampled wells are limited to the lower end of the aquifer.

Data from sampled wells could be used to develop a logistic regression equation.  

But would be valid to use the equation to predict occurrence throughout the aquifer, such as in the areas which were not sampled in the upper part of the aquifer?

## Hypothetical Cases

- Hypothetical Urban Area

**New residential/**
**commercial areas**

**Extrapolate LR equation **
**to here?**

**Sampled wells used**
**to develop LR equation**

**Hypothetical Cases**

**Notes:**

This is another hypothetical map showing an urban area.  In this case, only highly specific areas of the urban area have been sampled.  We could assume that these areas, for example, are areas of new residential/commercial development at the fringe of the urban outline.

As in the aquifer area, data from sampled wells could be used to develop a logistic regression equation.  

But would be valid to use the equation to predict occurrence throughout the entire urban area?

## Hypothetical Cases

**Well A**

**Point B**

**Average withdrawal point**

***dissolved oxygen?***

***industry?***

- Benzene Occurrence

**Extrapolate LR equation **
**to here?**

**Hypothetical Cases**

**Notes:**

This figure shows the development of hypothetical logistic regression equation for benzene in urban land use areas.  In this case, this is a real equation for benzene where it was associated with dissolved oxygen and industrial land use.

The purpose of this slide is to show that the LR equation was developed using the data at well A.  But can the equation be extrapolated to point B?

To successfully do this, we need to know the dissolved oxygen content at point B and the industrial land use.  Some variables, like land use or population density, can be estimated for most areas through various techniques.  However, some variables like dissolved oxygen may be more difficult to estimate.

##  Logistic regression is useful for determining

-  Logistic regression is useful for determining
-     associations that may aid in understanding
-     sources, transport, and fate

-  For determining associations, logistic regression
-     should use explanatory variables that are as
-     specific as possible

-   Although associations found using logistic
-     regression may be insightful, they do not imply
-     a direct cause and effect

##  For prediction purposes, logistic regression

-  For prediction purposes, logistic regression
-     should use explanatory variables that:

-  Are ubiquitous to the area of interest
-  Can be estimated or extrapolated

-  Logistic regression can be useful in predicting
-     the probability of occurrence of ground water
-     contaminants if:

-  Data are not highly localized
-  Data are not from highly specific sampling
-      approaches