### Change Point Analysis of the Chlorophyll- a and LDI Data from the IWRM STATUS Network Cycle 1 Lakes Study

Xu-Feng Niu

Professor of Statistics Department of Statistics Florida State University Tallahassee, FL 32306-4330

niu@stat.fsu.edu ; (850)644-4008

August 2004

### Change Point Anal ysis

a. The d e tection procedure.

Niu et al. (2000) introduced an iterative procedure for detecti ng and m odeling level-shift change points. The procedure is sim ilar to that sugge sted by Chang (1982) and f u rther developed by Chang, Tiao, and Chen (1988) for detecting outliers and level shifts in tim e series analysis



### . S t atistical details of this procedure can also be found in Pankratz (1991, Chapter 8).

For sim p licity, let us c onsider a biological response Y , after an appropriate transform a tion. Suppose that observations { (

, ) i i X Y
, } are availab l e where n is the sam p le size and X is a n independent variable such as LDI. Moreover, we assum e that the obs erva tion are arranged in the following manner: 1, 2

, , i = L n

• The values {

, i X } are distinct. If several are corresponding to a single X value, m e dian of the is taken to be the response value for the X value. 1, 2

, , i n

= L ' i Y s

' i Y s

• { (

, ) i i X Y
, } are sorted accord in g to the valu es of X f

r om leas t to gr ea test. 1, 2

, , i = L n

For each in teger , define the step variable 

### 1 l > ( ) 0 i S l = for i l < and for

. ( ) 1 i S l = i l ≥

Step 1 . Fit the linear regression m odel:

0 1

( ) ( ) ( ) ( ) i i i Y l l S l l β β ε = + + 1, 2

, , i n , , (1) = L

where for a fixed l , the ( ) ' i l s ε are assumed to be independent and identically distributed nor m a l
random variables with mean zero and variance

. 2 ( )

l σ

Step 2 . Calculate the v a lues { 1 1 

### ( ) ( ) / ( ( ) ) L l l s e l β β = ) )

, 2

, 3,

, ( 1) l n

= − L } where 1 

### ( ( ) ) se l β ) is the

estim ated standard error of 1 

### ( ) l β )

.
Step 3 . Let and com p are with the c r itica l va lue C =3.0 (or
C =3.5). The critical value C =3.0 (or C =3.5) corresponds roughly to 1 ( ) m a x{ ( 2 )

, ( 3 ),

, ( 1 ) } L l L L L n = L − 1 ( ) L l


### 0.10 α = (o r 

### 0.05 α = ), or the 10% (or the 5%) significance leve l, based on the sim u lation results of Chang, Tiao, and Chen (1988). If is significant, we co nclude that the response Y has a change point at 1 ( ) L l

1 l X with a lev e l-sh if t

1 

### ( )

l β )

.

Step 4 . Let . Repeat Steps 1-3 on the new response variable for detecting a possible second change point. Cont inue the process until no further change point can be identified. * 1 1 1 ( ) ( ) i i i Y Y l S l β = − * i Y3

Step 5 . Suppose that k change points are detected in the response variable Y and the corresponding X values are

1 2 { ,

, , k l l l } X X X

L . Fit the m odel

0 1 1 2 2 ( ) ( ) ( ) i i i k i k i Y S l S l S l β β β β ε = + + + + + L 1, 2

, , i n , . (2) = L

Then the es tim a ted coefficien ts 1 2 

### { ,

, , } k 

### β β β ) ) )

L will be the k e s tim a ted level- shif t value s

.



### b. An illustration example.

In this section, we present an exam ple of change point analysis for chlorophyll a vs L D I at 547 lakes. If m u ltiple s a m p les of chlorophyll a were collected at a lake, m e dian of the chlorophy ll a valu es was calcu lated.

First, we put the LDI values into nine clas ses, with LDI 1.0-1.4 as Class 1, LDI 1.5-2.4 as Class 2, and so on. Figure 1 shows the boxplots of chlorophyll a values corresponding to th e nine LDI classes. The chlorophyll a values have quite larg e variation with th e m a x around 500 ug/L.

The m e dian of chlorophyll a values at each LDI level were calculated an d used for th e change point analysis. For exam ple, 17 lakes with LDI=1.0 and th e m e dian of chlorophyll a values at the 17 lakes is 0.5. The m e dians of c h lorophyll a values at the 76 LDI levels (from 1.0 to 8.6 with 0.1 increm ent, no lakes with LDI=8.1) are presented in Table 2.

The natural logarithm transform a tion was pe rform e d on the chlorophyll a data. After the transform a tion, change point analysis of chlorophyll a vs LDI was conducted. Two change points are detected in the chlorophyll a data. T h e la rgest change point was at LDI=6.3, which is significant at the 5% level (95% confiden ce). The second change poi nt occurred at LDI=1.9, which is sig n if icant a t th e 20% lev e l (80% conf id en ce). Figures 2 and 3 presen t the f itted regr essio n model and the histogram of the residuals from the m odel, respectively. The R-square of the regression is only 0.31, due to the large variatio n am ong the chlorophyll a observations.40100200300400500Chl-a

123456 7 8 9

LDI 

### Figure 1. Boxplot of Chlorophyll-a vs LDI

Note: LDI 1.0 – 1.4 = Class 1; LDI 1.5 – 2.4 = Class 2; ..., so on LDI 8.5 – 9.4 = Class 9 (only one point w i th LDI=8.6)5

Table 2. Medians of Chlorophyll a Values and Corresponding LDI Values

LDI Median of Chlorophyll a Log of Median of Chllorophyll a LDI Median of Chlorophyll a Log of Median of Chllorophyll a

1.0 0.5 -0.69 4.8 13 2.56 1.1 5.45 1.7 4.9 2.5 0.92 1.2 2.6 0.96 5 21 3.04 1.3 0.52 -0.64 5.1 3.2 1.16 1.4 3.75 1.32 5.2 0.5 -0.69 1.5 0.62 -0.47 5.3 0.42 -0.86 1.6 0.6 -0.51 5.4 11.42 2.44 1.7 4.3 1.46 5.5 0.63 -0.46 1.8 1.2 0.18 5.6 41.72 3.73 1.9 0.5 -0.69 5.7 29 3.37 2 5.3 1.67 5.8 0.46 -0.77 2.1 1.2 0.18 5.9 0.46 -0.77 2.2 11.85 2.47 6 8.15 2.1 2.3 6.2 1.82 6.1 1.3 0.26 2.4 10.6 2.36 6.2 10 2.3 2.5 2.2 0.79 6.3 1.63 0.49 2.6 15.5 2.74 6.4 150 5.01 2.7 0.5 -0.69 6.5 33 3.5 2.8 5.3 1.67 6.6 4.62 1.53 2.9 0.55 -0.6 6.7 23 3.14

3 6.25 1.83 6.8 0.5 -0.69 3.1 0.5 -0.69 6.9 63 4.14 3.2 5.75 1.75 7 2.6 0.96 3.3 1.4 0.34 7.1 1.7 0.53 3.4 4.15 1.42 7.2 5.9 1.77 3.5 1.2 0.18 7.3 38 3.64 3.6 6.08 1.8 7.4 22 3.09 3.7 7.2 1.97 7.5 19.65 2.98 3.8 4.5 1.5 7.6 5.1 1.63 3.9 8.71 2.16 7.7 62 4.13

4 0.95 -0.05 7.8 135 4.91 4.1 0.5 -0.69 7.9 38 3.64 4.2 13.02 2.57 8 13 2.56 4.3 15.5 2.74 8.2 4.8 1.57 4.4 41.75 3.73 8.3 49 3.89 4.5 1.95 0.67 8.4 48 3.87 4.6 2.02 0.71 8.5 47 3.85 4.7 4.73 1.55 8.6 88 4.48
Change Points: LDI=1.9 with about 80% confid ence; LDI=6.3 with about 95% confidence. Bold-case numbers are the values just after the change points.6

LDILog of Median of Chl-a

2 4 6 8-10 1234 5 

### Figure 2. Log of Median of Chlorophyll-a vs LDI

Note: 1) T w o change points w ere detected . The first one at LDI=1.9 w i th about 80% confidence, and th e second one at LDI=6.3 w i th about 95% confidence.

2) If using the original scal e of Chl-a, no change points are around LDI= 2; Using the log-scale of Chl-a, LDI=1.9 is the second largest change point.7

-4 -2 0 2 0 5 10 15 20 Histogram 

### Figure 3. Histogram of Residuals8



### Fitted Regression Model (Natural Logarithm of Chlorophyll a):

In the model, the response variable is Chlorophyll a after the natural logarithm transformation. The two independent variables are:

x1=0 for LDI 1-1.9; x1=1 for LDI 2-8.6; x2=0 for LDI 1-6.3; x2=1 for LDI 6.4-8.6;

Coefficients: Value Std. Error t value Pr(>|t|) (Intercept) 0.2602 0.4294 0.6061 0.5464 x1 0.9837 0.4757 2.0681 0.0422 (LDI 1 – 1.9) x2 1.6703 0.3546 4.7111 0.0000 (LDI 2 – 6.2)

Residual standard error: 1.358 on 73 degrees of freedom Multiple R-Squared: 0.3137 F-statistic: 16.69 on 2 and 73 degrees of freedom, the p-value is 1.076e-006

**Means of Chlorophyll a: LDI 1-1.9: 2; LDI 2-6.3: 7.5; LDI 6.4-8.6: 38.8.** 

**Medians of Chlorophyll a: LDI 1-1.9: 0.9; LDI 2-6.3: 4.6; LDI 6.4-8.6: 28.** 

**Potential Change Points Based on Medians:**

**LDI: 6.3 1.9**  6.5 7.2 8.2 **Test Statistics: 5.28 2.01**  1.63 1.57 1.52 ( **The last three are not significant)**9



### References:

Chang, I. (1982) “Outliers in Time Series," Unpublis hed Ph.D. dissertation, De partment of Statistics, University of Wisconsin, Madison.

Chang, I., Tiao, G. C., and Chen, C. (1988) “Estimati on of Time Series Paramete rs in the Presence of Outliers," Technometrics

, 30 , 193-204.

Niu, X., Lin, P., and Meeter, D. (2000).“Detecting Change Points in the Species Composition and Water Quality Data of WCA2A”. Department of Statis tics, Florida State University, Tallahassee. Technical Report Submitted to the Florida Department of Envi ronmental Protection.

Pankratz A. (1991) Forecasting with Dynamic Regression Models. John Wiley & Sons Inc. New York.