Splitting behaviour into bouts - Science Direct

12 downloads 0 Views 466KB Size Report
the behavioural events are split into bouts, and least-squares estimates and ..... Splitting behaviour into bouts. 67. Table II. The output from the non-linear.
Anita. Behav., 1990, 39, 63-69

Splitting behaviour into bouts R. M. SIBLY,* H. M. R. NOTT* & D. J. F L E T C H E R t

*Department of Pure and Applied Zoology, University of Reading, Reading RG6 2A J, U.K. tDepartment of Applied Statistics, University of Reading, Reading RG6 2A J, U.K.

Abstract. When considering splitting behaviour into bouts, it is best to display the data in log frequency rather than in log survivorship plots. While the latter has the advantage of simplicity, the former has the advantage that the data points are independent of each other, so that a non-linear curve-fittingprocedure, such as NLIN in SAS, can be applied. Traditional analysis of variance can then be used to decide whether the behavioural events are split into bouts, and least-squares estimates and standard errors can be calculated for each parameter of the fitted model. These estimates can be used in Slater & Lester's (1982 Behaviour, 79, 153-161) formula to calculate the best criterion interval to use in splitting behaviour into bouts. Average bout length and number of bouts are, however, best estimated directly from the model's parameters.

In this paper we develop a new method which overcomes these objections, and we compare its success with that of log survivorship analyses over a range of cases which have recently come to our attention.

Whenever behavioural events appear to occur in bouts, the problem arises as to what interval between events (the bout criterion interval) should be chosen to distinguish events that occur within bouts from those that start new bouts (Slater & Lester 1982; Martin & Bateson 1986; Clifton 1987; other examples are given in Wiepkema 1968; Slater 1974; Machlis 1977; Clifton 1979). For example, if feeding pecks (events) occur during meals, pecks will often follow each other after a short interval (less than the bout criterion interval) but gaps between meals will produce long intervals between pecks (greater than the bout criterion interval). Choosing the bout criterion interval is often a cumbersome process. One commonly used method is log survivorship analysis, in which the cumulative frequency of gap lengths (on a logarithmic scale) is plotted against gap length (on a linear scale). Cumulation here starts with the longest, not the shortest gap. Examples are given in Figs lc and 3 (right-hand side). A broken-stick model is then generally fitted to the data by eye, and the interval where the two lines meet is taken to be the bout criterion interval. This method has the advantage of simplicity, and is unlikely to mislead provided the points fit the model well. It has the disadvantages that the points are not independent of one another, and the broken-stick model cannot be fitted objectively in a satisfactory way. (Peter Clifton has suggested to us that the latter problem might be overcome using Kolmogorov-Smirnov tests in combination with the methods described in Clifton 1987.) In some cases this makes it hard to decide whether the method should be applied. 0003-3472/90/010063+ 07 $03.00/0

THE MODELS

Single Process According to this model, behaviour is not split into bouts, and all events are generated by a single Poisson process. Let the average number of events occurring per unit time be 2. For a Poisson process, the chance of obtaining no events in time t is e -~t, and the probability that an event occurs in the next time interval is 2, provided the time interval is small. (If the interval is of width w time units then the chance that an event occurs in w is (1 - e ~), 2w if 2w is small.) Hence the probability of a gap being of length between t and t + 1 is 2e -~t, and if there are N events in total, then the expectation is that (no. of gaps of length between t and t + l ) = N2e at (1)

Two Processes In this model, events are considered to be generated by one of two random processes, a fast process operating within bouts, and a slow process generating new bouts. The events are assumed to be

O 1990 The Association for the Study of Animal Behaviour 63

64

Animal Behaviour, 39, 1

generated either by the fast or by the slow process. No assumption is made about the mechanism controlling (deciding) which process occurs. The processes are assumed to be Poisson processes, with the probability per unit time of an event being 2f for the fast and 2s for the slow process; 2, therefore represents the probability per unit time that a new bout will begin. Let the total n u m b e r of events within bouts (excluding the first event in each bout) be Nf, and let the n u m b e r of bouts be N~. The number of gaps of length t generated by the fast process is expected to be Nf~fe-~, and Ns2~e-~~ for the slow. Since the gaps are generated either by the fast or by the slow process, the total number of gaps of length between t and t + 1 is obtained by adding the expected outputs of the two processes, i.e. (no. of gaps of length between t and t + 1) = Nf2fe-& + Ns2~e-~t

(2)

In a Poisson process the chance of obtaining no events in time t is e -~t, and this represents the proportion of gaps that are longer than t. As t increases, fewer gaps will be longer than t. In fact only 1% of gaps are longer than 4.6/2, and only 0-001 are longer than 6"9/2. The ratio of slow events to fast events, for gaps longer than z, is N~e- z,_~._~t__ Ns e (at- x~), Nfe - a f ' Nf

(3)

Since ,],f>,~s, this ratio increases with t, so eventually there comes a point past which most of the events come from the slow process. The ratio of slow to fast events for gaps shorter than t is N~(1 --e ~s') ~ Ns2s t Nr(1 --e ~zft) -- Nf)tft'

if2ft is small,

~ N~2~ - Nf)~f

Since J.f> 2s, and usually Nf>>N~, it is likely that Nf2f>~NsJ~s, so that short gaps will belong mostly to the fast process. (Nf~,f< N~.s would imply an average bout length of less than two events.) Derivation of Bout Criteria Once a two-process model has been fitted (see below), methods are available that use its parameters to derive a bout criterion interval, as discussed by Slater & Lester (1982) of which the following is a summary. It has to be appreciated at the outset that if events have been generated by two processes as above, it is inevitable that some events will be

assigned by the observer to the wrong process. The objective is therefore to minimize the misassignments and this can be done either by minimizing the total time misassigned, or by minimizing the total n u m b e r of events misassigned. The formula for the bout criterion, tc~, that minimizes the total time misassigned is 1

tel = ~

Nf loge~

(4)

(Fagen & Young 1978). However, Slater & Lester (1982) argued that it will generally be preferable to minimize the number of events misassigned, and this is achieved by a second criterion, to2, defined as follows tr = ~

1

Nf,~f

lOg~N~

(5)

Slater & Lester (1982) showed that the n u m b e r of points misassigned when the bout criterion is tc is Nr e - ar'c+ N~(1 - e - ~s'~)

(6)

Number of Bouts and Bout Length Although it would be possible to use the bout criterion interval to divide events into bouts before calculating bout statistics, bout lengths and n u m b e r are better calculated directly from the parameters of the two-process model. The n u m b e r of bouts is the number of events generated by the slow process, and this is close to, but less than, Ns, because gap lengths exceeding observation time are necessarily not observed. Let to be the longest gap length observed, so that Nse-a~to slow-process gaps would have been longer than to. Hence the n u m b e r of slow-process gaps observed is approximately Ns(1 -- e-X~'o)

(7)

and this is an estimator of the n u m b e r of bouts. Since the total n u m b e r of events observed is known, = NT say (average bout length) = Nx/(Ns(1 -- e-as'o)) (8) Standard errors for bout length and number of bouts are given in Appendix 1.

F I T T I N G T H E M O D E L S T O DATA Data Preparation The raw data is a frequency distribution (histo-

Sibly et al.." Splitting behaviour into bouts gram) of gap lengths. Typically, short gaps are very frequent, and longer gaps are progressively less frequent (an example is given in Fig. 1). Some longer gaps will probably not occur at all, but zeros cannot be used in the following analysis because it is carried out on log-transformed data (see below). The way to get round this is to use wider intervals for the longer gaps. Because the frequency refers to frequency per time unit (see equation 1), if f gaps occur in an interval of width w time units, then the frequency per unit time (hereafter called z) is f/w. For example, if only one gap occurs between 200 and 300 s, the frequency/s is then 0.01/s. To avoid giving undue weight to wider intervals only one frequency should be recorded per interval. Intervals can be chosen in any convenient way. We suggest for long gap lengths choosing intervals such that just one gap occurred in each interval. The logarithm of the frequencies is now taken, to equalize the variances at different values of gap length. Log~ (frequency) (hereafter called y) is plotted against gap length in Figs lb and 2.

Estimates of slope and y-intercept can be obtained by ordinary regression. When two-process data are plotted in this way they roughly fit a broken-stick model, i.e. two joined straight lines. Each line has a negative slope. As explained in the Models section, the long gaps belong mostly to the slow process, and the short gaps belong mostly to the fast process, provided NfAp>NsAs, as is likely. Hence the short gaps generated by z = Nf2fe-Zft, can be fitted quite well by y = logoz= log~Nf2f-- ~.ft, and similarly the long gaps fit quite well to y = log~N~2s--2st. Hence the slope of the steep line is - 2f, and of the shallow line - 2s. The vertical axis intercept of the steep line is approximately log0Nf2f and of the shallow line logeN~2s, so Ns and Nf can be estimated from a knowledge of the y-intercept and the slope of each line. In each case N = (1/2) exp(y-intercept).

Fitting the Two-Process Model Using a Non-Linear Least-squares Procedure (NLIN) Further analysis is possible using non-linear curve-fitting techniques. We used the procedure NLIN in SAS Release 5.16 (SAS Institute, Box 8000, Cary, North Carolina 27511, U.S.A.; programming notes are given in Appendix 2). Since the data to be fitted are log frequencies, the appropriate form of the model is

Fitting the Models by Eye It will always be useful to plot log frequency against gap length, and when this is done both models can be fitted by eye, as described below. The values thus fitted to the two-process model can usefully provide initial parameter estimates for the non-linear curve-fittingprocedure NLIN described in the next section. When a log frequency distribution is plotted for one-process data, the points fall on a straight line. From equation (1), z = NAe-a', and therefore y = logoz= logaN2-- 2t

(9)

This has slope -. 2 and y-intercept logaN2. N can therefore be estimated as (1/2) exp(y-intercept).

y = log~(Nf2fe-& + NsA~e-~'st)

4

(10)

from equation (2), and the fitting procedure is faster if the derivatives are supplied (we used the Gauss-Newton method, see Appendix 3 for derivatives). Equation (10) defines a curve, and will always differ, though often not very much, from the broken-stick model. Since it represents exactly the predictions of the two-process model, it is to be preferred to the broken-stick model. However,

+

(a

200

65

+,

(b)

Z~

(c; ~g6

g ~oo g$ co

0 -2

o-

+ ~,-+

~

~

~ -4 +

+

+

+

++ +

2o'00

+

+

+ +

-6

&

~_ 4 g o~2

+

4-000

b

2obo

+

4000

0 2000 4000 Gap length (s) Gap length (s) Figure l. (a) Frequency, (b) loge frequency and (c) loge survivorship versus gap length for the feedingpecks of a male zebra finch, Taeniopygia guttata. The data were collected over 24 h and were made available by A. Chadd.

Gop length (s)

Animal Behaviour, 39, 1

66

plausible values of the parameters have to be suggested to N L I N , and it is convenient to obtain them from the broken-stick model, using the methods described in the last section. The output of N L I N (in SAS Release 5.16) gives the total sum of squares associated with the fourparameter model o f equation (10), without subtracting the sum of squares accounted for by the mean of the data points. N L I N therefore assigns four degrees of freedom to the model. It is more conventional, however, to subtract the sum of squares accounted for by the mean of the data points at the outset, and so to attribute three degrees of freedom to the extra sum of squares accounted for by the model. We follow the latter practice here.

RESULTS AND DISCUSSION

Data for Fig. 1 It is clear from Fig. lb that the log frequency distribution is not a single straight line, as required by the single-process model. Details of the analysis of variance of the one-process model are given in Table I. To see whether the data might fit a twoprocess model, the broken-stick model was fitted by eye, as follows. The left-hand 14 points of Fig. lb are replotted with an expanded horizontal axis m Fig. 2a. The points appear to fall on a straight line with equation y = 5 - 8 - 0 " 3 8 t (from linear regression). Hence 2r=0.38 pecks/s, and N f = (1/0.38) e58= 869 pecks. The right-hand 10 points

Table I. Analysis of Variance table showing the additional variance accounted for by fitting the one-process and two-process models successively Sum of

df squares Mean One-process model Two-process model Residual Total

1 1 2 21 25

+

(b)

4-

-5

4-

34

~-

4-

S

4-

w 3-

167 91 0.33

of Fig. lb are replotted in Fig. 2b, and fall approximately on a straight line with equation y = - 3 . 7 - 0.00064 t (from linear regression), giving 2s=0.00064 bouts/s and N~=39 bouts. Two points intermediate between Figs 2a and b h a v e not been used, because they fell somewhat above the straight lines (as expected on the two-process model) and are therefore likely to distort the estimates. This procedure is somewhat arbitrary, but the main purpose of the exercise is to provide initial parameter values for N L I N . The output of the non-linear curve-fitting procedure N L I N is shown in the usual format of analysis of variance in Table II. This can be interpreted in the conventional way. The model accounts for 98% (R z) of the variation in the data. The F-value for the two-process model is 352, with dJ]=3 and dj~=21, and at P = 0 . 0 0 1 the critical value is 7.9. Clearly the model is worth fitting to the data of Fig. 1. N L I N also provides an estimate of each para-

(a) 5--

2-80 t 66.77 181.40 6-88 357-85

Mean square

o 44-

4-

+4-4-

~ o

J

4-

44-

++ +

0

I 5

Gap length (s)

I I0

-6,

+

I 0

I 2000

4-000

Gap length (s)

Figure 2. The data of Fig. 1 split into two for further analysis. (a) The left-hand points plotted with an expanded time axis. O, the first point, represents an outlier which occurs because very short intervals are not possible for mechanical reasons. This point was discarded from the analysis. (b) The right-hand points.

Sibly et al.." Splitting behaviour into bouts

meter, with its approximate standard error (Table II). Comparing these values with the estimates obtained when fitting the broken-stick model by eye (see above) it seems that the broken-stick model overestimated 2r and Nf by about 30%, but obtained good estimates of 2s and _IV,. The correlation matrix (Table II) shows that the parameters are uncorrelated except for Nf and 2f, between which there is a correlation o f 0.71. A high correlation between any two parameters makes it hard to attribute effects to one or the other, so that their SES are higher than they would otherwise have been. The bout criterion using equation (4) is td = 9.2 s, and using equation (5) is &2=29-4 s, and the number of points misassigned by the two criteria are 38"3 and 0.8, respectively. Clearly the second criterion is preferable in this case. The number of pecks in the fast process misassigned to the slow process was 0.7 using to2. Only 0.1 pecks in the slow process were then misassigned to the fast process. The number of bouts ( _ SE) was 35-9 _ 6'5, and the

Table II. The output from the non-linear curve-fitting procedure NLIN Parameter Estimate 0-305 630-3 0.00065 38.8

2r Nf 2s Ns

Asymptotic standard error 0.027 139-6 0-00015 7.1

Asymptotic correlation matrix 2f Nf As N, 2r 0.71 0:05 0.04 Nr 0-02 0.02 2, -0.18 Analysis of variance table Sum of df squares Regression 3* 348-17 Residual 21 6.88

67

Mean square 116.06 0.33

*See methods for explanation.

(o) 2"I~"

* -

4

0 (b)

~

~ 1 7 6

1

9/ I00

1

300

200

0

I00

200

500

Ct.

~ ,,~

-L I

co)

I

,oo

1

200

~

O~

I

,-,,_,

g

0 --'"" 9 9 ," ~176176176176176 o, -2 E:n

L

,

I00 2O0 Gop length (rain)

I

I

300

0

I00

200

500

3OO

0

I00 200 Gap length (rain)

500

.

Figure 3. Loge frequency and log,, survivorship versus gap length for the feeding events (visits to a feeding bowl) of three wild-caught brown rats, Rattus norvegicus. The bout criterion tr is indicated by an arrow. Only gap lengths up to 300 min have been plotted. Maximum gap lengths were (a) rat 8, 1260 min; (b) rat 10, 481 min; and (c) rat 3, 603 min. The data were collected over 72 h.

Animal Behaviour, 39, 1

68

average bout length was 19.2 + 3-5, using equations (7), (8), (11) and (12). A non-linear curve-fitting algorithm needs to be implemented with more care than analytical curvefitting, which obtains the best-fitting parameter values from a formula, whereas the algorithm has to search for them. It may happen that if the search begins in the wrong part of the parameter space, the least squares values cannot be found. In the present case the optimum was located if all initial values were out by a factor of 10 either way, but not if they were out by a factor of 100. A great attraction of analysis of variance methods is that related models can be compared statistically to see whether additional parameters are worth including. The two-process model (df= 3) accounts for substantially more variation than the one-process model (df= 1; Table 1, F = 276, dJ] = 2, dj~ -- 21, P < 0.001). We can be sure, therefore, that in this case the behaviour is split into bouts. Data of Fig. 3

Three further cases are presented in Fig. 3, both as log frequency plots as advocated here, and as log survivorship plots, as used by most previous

workers (see Introduction). Whereas the appropriateness of a two-process model is clear by eye in the log frequency plots, it is harder to judge in the tog survivorship plots, especially for rat 3, where it is difficult to determine the line of best fit for the slow process. NLIN ANOVA, however, confirmed that a two-process model was better than a one-process model in each case (rat 8: F = 80-8, dJ] =2, d~ = 40, P