1. Home
  2. DTIMEPLOT procedure

DTIMEPLOT procedure

Produces horizontal bars displaying a continuous time record (S.J. Clark).

Options

TITLE = text Title for the plot; default * i.e. none
WINDOW = numbers Which high-resolution graphics windows to use; default 3 for single plots and 5…8 for the composite plot
SCREEN = string token Whether to clear the graphics screen before plotting (clear, keep); default clea

Parameters

DATA = variates Bout lengths
GROUPS = factors Factor defining act performed during each bout
LABELS = texts Labels for each act
METHOD = texts Type of plot to produce for each DATA variate (barplot, cumulative, log, survivor, composite); default comp

Description

DTIMEPLOT produces graphical displays from a continuous time record of behaviour. A variate of bout lengths (see below) is specified by the DATA parameter and the GROUPS parameter specifies a factor defining the act (see below) performed during the bout. The type of plot to be produced is specified by the METHOD parameter – only one setting is allowed giving either a bar plot (barplot), cumulative bout length plot (cumulative), log bout length plot (log), log-survivor plot (survivor) or a composite plot of all four (composite). By default a composite plot is produced. The parameter LABELS can be used to specify labels to distinguish each act on the vertical axis of the barplot (group 1 appears at the lower end of the axis) – this parameter is ignored for METHOD settings cumulative, log and survivor. Parameters DATA and GROUPS must be set; they must have the same number of values and must not contain any missing values.

The graphical display can be controlled as usual using the TITLE, WINDOW and SCREEN options. By default single plots are produced in frame 3 and the composite plot in frames 5, 6, 7 and 8, plots have no title and are drawn on a new screen.

Options: TITLE, WINDOW, SCREEN.

Parameters: DATA, GROUPS, LABELS, METHOD.

Method

The bar plot, cumulative bout length plot, log bout length plot and log-survivor plot are graphical displays of a continuous time record of behaviour (Haccou & Meelis 1992). The behaviour of an individual during a period of observation is classified into a mutually exclusive and exhaustive set of behaviours (acts). A bout is a time interval during which a certain act is performed. A bout length is the duration of such a time interval. The period of observation is assumed to begin at time zero. In the bar plot the acts are arranged along the vertical axis and the observation time is given on the horizontal axis; occurrences of each act are represented by solid bars. The cumulative bout length plot, in which the cumulative bout lengths for an act are plotted against the sequence numbers of the bouts, is a useful display for detecting changes in mean bout length (which are indicated by a sudden and consistent change in the slope of the line). In a log bout length plot the logged bout lengths are plotted against the start times of the bouts. This plot provides a check for exponentiality (the vertical width of scattering should be approximately constant), and provides evidence for sudden changes in termination rate. The empirical log-survivor plot should approximate to a straight line if the bout lengths for an act are a sample from an exponential distribution.

Action with RESTRICT

Neither the input variate nor the input factor must be restricted.

Reference

Haccou, P. & Meelis, E. (1992). Statistical Analysis of Behavioural Data. Oxford University Press, Oxford.

See also

Commands for: Graphics, Repeated measurements, Survival analysis.

Example

CAPTION   'DTIMEPLOT example',\
          'Data from Haccou & Meelis (1992), pages 5-6.'; STYLE=meta,plain
VARIATE   Duration
FACTOR    [LEVELS=5] Acts
READ      [SERIAL=yes; SETNVALUES=yes] Duration,Acts
 0.45  0.59 10.51  0.89 20.25  6.19 40.29 36.20  6.25 10.79
 0.30  3.18  0.95  2.67  1.41  1.74  5.56 28.09  1.02 11.76
 6.67 22.97 11.22 53.13  3.22  1.90  0.45  2.19  3.47 15.80
22.10  8.03  3.67 55.11  0.15  0.96 12.71 33.15 67.96 173.53
64.47 105.83 0.45  1.42 17.05 31.88  3.31  1.18  9.93  1.41
 2.90  0.45 18.14  0.72 10.47  0.45  0.27 17.58  0.33 15.06
75.45 90.28 14.62 11.18  0.50 13.08  0.17  5.64  0.45 15.44
68.18 53.81  6.09  4.41  0.45  5.46  0.78  5.87 51.27  2.78
17.71  0.45 28.71 12.48  2.20  4.31  0.45  4.64  1.35 19.51
 8.30  0.45 14.20  2.51 12.06  6.97 32.01  2.51  0.45  4.74 :
5 2 3 2 3 2 1 3 2 3 2 3 2 3 4 3 2 3 2 3
4 3 4 3 2 3 5 2 3 1 3 2 4 3 2 4 3 1 3 1
3 1 5 2 3 1 3 2 3 4 3 5 3 2 1 5 2 3 2 3
1 3 1 3 2 3 4 3 5 3 1 3 2 3 5 3 2 4 3 2
3 5 1 3 2 3 5 3 4 3 1 5 3 2 3 4 3 1 5 2 :
DTIMEPLOT [TITLE='Haccou & Meelis: rat behaviour'] Duration; GROUP=Acts;\
          LABELS=!t(Care,Walk,Sit,Rear,Shake); METHOD=composite
Updated on March 8, 2019

Was this article helpful?