S2 File.

1
File S2: Wavelet analysis of total abundance and species richness for fish communities
2
associated with different shoreline types.
3
4
We performed wavelet analysis to determine how temporal fluctuations in total abundance and
5
species richness varied in fish communities associated with different types of shorelines. We
6
now provide a summary of these methods and direct the reader to previously published guides
7
for greater details (e.g., Torrence and Compo 1998, Cazelles et al. 2008, Iles et al. 2012).
8
Wavelets are flexible functions that are resolved in the time and frequency domains, and thus
9
ideal for quantifying changes in the contribution of each period (or frequency) over time to the
10
overall variance (or power) of a signal (e.g., a time series). Because wavelets can be scaled (i.e.,
11
contracted or dilated), they can efficiently accommodate both high and low frequency structures
12
in non-stationary signals whose statistical characteristics vary over time. For our analyses, we
13
used the Morlet wavelet, which is defined as:
14
y 0 (t) = p -1/4eiw t e-t
0
2
/2
15
where i is the imaginary number, t represents nondimensional time, and w 0 = 6 is the
16
nondimensional frequency (Torrence and Compo 1998). The continuous wavelet transform of a
17
discrete time series x(t) with equal spacing d t and length T is defined as the convolution of
18
x(t) with a normalized Morlet wavelet (Torrence and Compo 1998, Grinsted et al. 2004):
19
Wx ( s, t ) =
d t T -1
å x(t)y
s
t=0
0
æ (t - t )d t ö
*ç
÷ø
è
s
20
where * indicates the complex conjugate. By varying the wavelet scale s (i.e., dilating and
21
contracting the wavelet) and translating along localized time position t , one can calculate the
22
wavelet coefficients Wx (s, t ) , which describe the contribution of the scales s to the time series
23
x(t) at different time positions
24
is a parameter used to normalize the Morlet wavelet function to unit variance in order to allow
25
direct comparisons of the wavelet coefficients Wx ( s, t ) across the different scales s and time
26
positions t (Torrence and Compo 1998, Grinsted et al. 2004). Contour plots can be used to
27
visualize how the local wavelet power spectrum (i.e., the contribution of each frequency or
28
period in the time series) varies in time (Grinsted et al. 2004, Cazelles et al. 2008).
29
t (Torrence and Compo 1998, Cazelles et al. 2008). Here,
Additionally, one can compute the bias-corrected global wavelet spectrum Wx2 (s) as the
30
time-average (i.e., over all time locations t ) of all local wavelet spectra for each scale s
31
(Torrence and Compo 1998, Liu et al. 2007, Cazelles et al. 2008):
32
æ s 2 T -1
2ö
Wx2 (s) = 2 s ç x å Wx ( s, t ) ÷
è T t =0
ø
33
dt
s
where s x2 represents the variance of the time series and 2 s is the bias correction factor (Liu et
34
al. 2007). The global wavelet spectrum thus quantifies the average power (or variance) of the
35
time series at each scale. The scale s of the Morlet wavelet is related to Fourier frequency f
36
(Maraun and Kurths 2004, Cazelles et al. 2008):
37
is approximately equal to the reciprocal of the Fourier frequency f (Maraun and Kurths 2004,
1
4p s
. When w 0 = 6 , the scale s
=
f w 0 + 2 + w 02
1
. Hence, in all equations, the scale s can be converted to Fourier
f
38
Cazelles et al. 2008): s »
39
frequency f »
40
Zero-padding and the cone of influence
41
In practice, the continuous wavelet transform is computed by using discrete Fourier transforms to
42
calculate all T convolutions simultaneously (Torrence and Compo 1998). However, since the
43
Fourier transform assumes that the data is periodic, errors in the estimation of the local wavelet
44
power spectrum will occur at the beginning and at the end of any finite-length time series
45
(Torrence and Compo 1998, Cazelles et al. 2008). In order to limit these edge effects, the end of
46
a time series is padded with zeros prior to taking the wavelet transform and the zeroes are then
47
removed (Torrence and Compo 1998, Cazelles et al. 2008). Typically, enough zeros are added in
48
order for the total length T of the time series to reach the next-higher power of two. This both
49
limits edge effects and improves the speed of the Fourier transform (Torrence and Compo 1998).
50
1
1
or period p = » s .
f
s
Although padding with zeros limits errors due to edge effects, it introduces artificial
51
discontinuities at the endpoints of the data (Torrence and Compo 1998, Cazelles et al. 2008). As
52
one gets closer to the end of the data, more zeros are included in the estimation of the local
53
wavelet spectrum, thus reducing its reliability (Torrence and Compo 1998, Cazelles et al. 2008).
54
The region where zero padding affects the estimation of the wavelet spectrum is called the cone
55
of influence (COI), and is defined as the region in which the wavelet power for a discontinuity at
56
the edge drops by a factor of e -2 (Torrence and Compo 1998). Hence, any region falling below
57
the COI is susceptible to edge effects.
58
Statistical significance testing
59
In order to determine the statistical significance of the wavelet spectrum obtained from a time
60
series, one must first formulate an appropriate null hypothesis. Here, the null hypothesis is that
61
the observed time series is generated by a stationary process with a given background power
62
spectrum P(k) (Torrence and Compo 1998, Grinsted et al. 2004). Since many ecological and
63
environmental time series exhibit strong temporal autocorrelation (i.e. high power associated
64
with low frequencies; e.g. Beninca et al. 2009, see Ruokolainen et al. 2009 for review), we used
65
a first order autoregressive model [AR(1)] to generate a temporally autocorrelated time series or
66
red noise, which served as our null hypothesis. Specifically, the power spectrum P(k) of our red
67
noise process was calculated with (Gilman et al. 1963):
68
1- a 2
P(k) =
1+ a 2 - 2a cos ( 2p k / N )
69
where the autocorrelation coefficient a at time lag 1 is estimated from the observed time
70
series and k = 0,..., N / 2 represents the frequency index. The observed wavelet spectrum can be
71
compared to the wavelet spectrum of the red noise process by means of a chi-square test. The
72
distribution of the local wavelet power spectrum of a red noise process is (Torrence and Compo
73
1998):
74
75
Wx (s, t )
s
2
2
1
Þ P(k) c 22
2
where k represents the frequency index, s 2 represents the variance of the time series, “ Þ ”
76
means “is distributed as”, and c 22 represents the chi-square distribution with 2 degrees of
77
freedom. The value of P(k) is the mean wavelet power spectrum at frequency k that
78
corresponds to the wavelet scale s (Torrence and Compo 1998). Using this equation, one can
79
construct 95% confidence contour lines at each scale using the 95th percentile of the chi-square
80
distribution c 22 (Torrence and Compo 1998).
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Literature Cited
Beninca, E., K. D. Johnk, R. Heerkloss, and J. Huisman. 2009. Coupled predator-prey
oscillations in a chaotic food web. Ecology Letters 12:1–12.
Cazelles, B., M. Chavez, D. Berteaux, F. Menard, J. O. Vik, S. Jenouvrier, and N. C. Stenseth.
2008. Wavelet analysis of ecological time series. Oecologia 156:287–304.
Gilman, D. L., F. J. Fuglister, and J. M. Mitchell. 1963. On the Power Spectrum of “Red Noise”.
Journal of the Atmospheric Sciences 20:182–184.
Grinsted, A., J. C. Moore, and S. Jevrejeva. 2004. Application of the cross wavelet transform and
wavelet coherence to geophysical time series. Nonlinear Processes in Geophysics
11:561–566.
Iles, A. C., T. C. Gouhier, B. A. Menge, J. S. Stewart, A. J. Haupt, and M. C. Lynch. 2012.
Climate-driven trends and ecological implications of event-scale upwelling in the
California Current System. Global Change Biology 18:783–796.
Legendre, L., and P. Legendre. 1998. Numerical Ecology, 2nd edition. Elsevier Science,
Amsterdam.
Liu, Y., X. San Liang, and R. H. Weisberg. 2007. Rectification of the Bias in the Wavelet Power
Spectrum. Journal of Atmospheric and Oceanic Technology 24:2093–2102.
Maraun, D., and J. Kurths. 2004. Cross wavelet analysis: significance testing and pitfalls.
Nonlin. Processes Geophys. 11:505–514.
Ruokolainen, L., A. Lindén, V. Kaitala, and M. S. Fowler. 2009. Ecological and evolutionary
dynamics under coloured environmental variation. Trends in Ecology & Evolution
24:555–563.
Torrence, C., and G. P. Compo. 1998. A Practical Guide to Wavelet Analysis. Bulletin of the
American Meteorological Society 79:61–78.
114
Figure legends
115
Figure A: Wavelet analysis of monthly time series of total fish abundance in communities
116
associated with shorelines characterized as (a) natural, (b) rubble with riprap, (c) vertical wall,
117
and (d) vertical wall with riprap. Regions of high (low) power or variability are represented in
118
warm (cold) colors. Black contours represent regions of statistically significant variability at the
119
=0.05 level. Regions within the white dashed lines (the cone of influence) are not affected by
120
edge effects.
121
Figure B: Wavelet analysis of monthly time series of species richness in communities associated
122
with shorelines characterized as (a) natural, (b) rubble with riprap, (c) vertical wall, and (d)
123
vertical wall with riprap. Regions of high (low) power or variability are represented in warm
124
(cold) colors. Black contours represent regions of statistically significant variability at the
125
=0.05 level. Regions within the white dashed lines (the cone of influence) are not affected by
126
edge effects.
127
128
Figure A
129
130
131
132
133
134
135
136
137
Figure B