Observing and Quantifying Behavior – Lab 2

NAME______________
Bio102_Renn_lab3_Thursday
Observing and quantifying behavior
A 2-3 hour laboratory exercise
Modified from
© 2002 Daniel T. Blumstein & Janice C Daniel
Today, you will be working with different recording methods that may be useful for field
projects or future studies. Specifically, you will learn how to quantify behavior using
both time and continuous recording for focal sampling of subjects. You will also learn
a few additional methods to quantify your inter-observer reliability.
We will use several clips of flamingos videotaped at the LA Zoo as an example of how to
calculate time budgets for animals. Time budgets describe how animals allocate their
time to different behaviors. The calculation of time budgets can be used to show how an
animal’s behavior varies with changing circumstances, such as predation risk, group size,
seasonal changes, etc.
Because flamingos generally live in groups, we could potentially estimate their time
budgets using either scan sampling (rapidly scanning a group of subjects) or focal
sampling (focusing on one subject at a time). These two methods yield somewhat
different results. For the purpose of this exercise, we will use focal samples. You will
score behavior from three different individuals, each tracked separately. Each focal
sample is approximately 2 minutes in duration.
What are the advantages and disadvantages of using scan sampling compared to
focal sampling for calculating time budgets of these flamingos? In general?
PART 1 – Time Recording
BEFORE WE BEGIN – Log onto the computers as yourself. Log onto the Courses
Server as yourself.
First, we will begin with time recording (recording behavior at a specified interval of
time). We will sample the behavior of a focal individual every 10 seconds. After scoring
all three clips, you will calculate your inter-observer reliability (consistency or
repeatability) with a partner.
In general, time recording is an efficient and often easy way of collecting data in the field
that does not necessarily require any “high-tech” equipment. Pencil, paper, and a simple
timing device (such as the stopwatches you used during the Planarian learning lab) are all
you need, although more fancy event recorders may also be used. Later today, in lab, you
will use the JWatcher event recorder to collect data.
1 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
A) Viewing the ethogram
An ethogram is a catalogue of behaviors described by neutral postures and recognizable
movements. The specific ethogram used in any study will depend upon the question that
is being asked, and also on how accurately, and with what specificity, a particular
behavior can be scored. We will familiarize ourselves with the behaviors shown in this
flamingo ethogram by watching the video.
The Ethogram is contained within the QuickTime Player file called
“Ethogram_Comp.mov.” that Ned (Carey) will play a few times for the class.
Note that this ethogram has been chosen arbitrarily.
What potential problems do you foresee, if any?
Why is it important to have a category for “out of site”?
Why is it important to have a behavior category for “other”?
B) Collecting data using Time recording of a focal sample
Look at the data sheet (Time Recording Data Sheet) at the back of this exercise. You will
see the behaviors from the ethogram listed across the top of the page. You will also see a
series of rows. Each row will correspond to a tone that you will hear every 10 seconds
when viewing the subsequent three focal clips. You should make one check mark per
row, in the column corresponding to the behavior that you observe at the tone. Notice at
each tone (time point) you will check one and only one behavior. For today, all
behavior are considered to be mutually exclusive. Two behaviors cannot happen at the
same time. JWatcher can do multiple and modified recording, but that is beyond the
scope of today’s project. Even if a very interesting behavior happened between the beeps
you will not check that behavior. Your score sheet should be an accurate representation
of what the animal was doing at the instant of the tone.
There are three video clips. The class will watch each video clip once. Since you are
recording manually, each student should record his or her own data. You may use the
score sheet provided and attach that to your lab notebook or record directly into your lab
notebook. In either case, do not forget to record which movie you are watching.
Ned (Carey) will first open and play “FlamingoA_Comp.mov”
There is a 5 second delay before the video begins. The individual that is chosen to be the
focal animal is labeled in the video with an arrow. Before the movie starts, be sure that
everyone agrees on which animal is the focal animal.
Record the behavior that you observe at each tone in your data sheet.
Ned (Carey) will next open and play “FlamingoB_Comp.mov”
Record the behavior that you observe at each tone in your data sheet.
Finally, Ned (Carey) will open and play “FlamingoC_Comp.mov.”
Record the behavior that you observe at each tone in your data sheet.
2 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
C) Calculating reliability
When more than one researcher is collecting data for a project it is necessary to check
that everyone is consistent in their recording.
1. On your data sheet, add up the number of times you observed each behavior for
all three video clips. Enter the totals in the 2nd to last row of your data sheet.
2. Ask someone to be your partner so that you can compare your results.
3. Discuss your results. What behaviors were most accurately scored? What types
of behaviors were more controversial?
Although eyeballing totals is one way to get a feel for your consistency, there are more
formal ways of calculating reliability. We will use an Excel spreadsheet (something
new, not statview) to calculate three measures: r, O, K. (method O is the method we used
in the Planarian Learning lab)
r is the correlation coefficient calculated between your observed totals for each behavior
and your partner’s corresponding totals. An r value near 1 means that you were reliable.
O is the index of concordance which is simply the proportion of observations on which
you both agreed (scored the same behavior at the same tone.) It is calculated by counting
the total number of agreements and then dividing by the total number of observations.
K is the kappa coefficient, which is basically an index of concordance that has been
modified to take into account the number of agreements that you would get simply due to
chance alone.
4. On the Courses Server go to:
Biology/Bio101 102/Behavior_Renn/Week3_flamingos/ and in that folder your
will find an Excel file called reliability_template.xls.
5. Drag reliability_template.xls onto your desktop.
6. Double click on this icon to open the file.
7. Enter your observations, coded by number into the O1 column (for observer 1).
8. Have your partner put their observations into the O2 column (for observer 2).
Notice that you enter the number that corresponds to each behavior (see top row
of your check sheet) rather than letters. What type of data is this, categorical
(nominal) or ordinal (continuous)?
9. The spreadsheet will calculate r, O, K for you automatically.
10. Print this record for your lab notebook.
 How reliable was your scoring?
 When might it be important to check O rather than just r?
 Which behaviors were consistently scored? Which were not? Can you explain the
inconsistencies? How might you improve your reliability in the future?
 How would you measure your intra-observer reliability?
D) Calculating the time budget
Finally, in your check sheet, or your lab notebook, calculate the proportion of time
engaged in each behavior by dividing each column total by the total number of
observations. This is your time budget.
Do you think that a ten second time interval enabled us to adequately describe the
time budget of these flamingos? Why or why not? In general, what criteria should
you use to choose an appropriate time interval?
3 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
PART 2 – Continuous Recording
Now we will go back and score the exact same three video clips using continuous
recording with an event recorder. Event recorders are computer programs (or
dedicated pieces of hardware) that record keystrokes as they occur over time. In our
case, keystrokes will represent behavioral transitions. For instance, when a flamingo is
foraging, you might type an f, when a flamingo is grooming, you might type g, etc.
Continuous recording (all-occurrence recording to provide a complete record of all
behaviors) is more labor intensive, but will give you a more complete description than
time recording of what occurred during any given time interval.
We will use an event recorder called JWatcher to score our three video clips
continuously The JWatcher program includes some analysis algorithms along with the
power of the event recorder. With these tools, you will be able to calculate the time
allocated to each of the behaviors in your ethogram. This will give you a
more accurate time budget for zoo flamingos. The full JWatcher program
and manual is freely available on-line at: www.jwatcher.ucla.edu.
This flowchart describes
JWatcher work flow.
By the end of lab today you will:
A) Create a Global Definition File (*.gdf)
which will serve as the “ethogram” and
assign keys to each behavior.
B) Create a Focal Master File (*.fmf)
which includes the behaviors (or a subset
thereof) from the global definition file.
This file also instructs JWatcher to
prompt users for additional data about
QuickTime™ and a
each observation during data collection.
TIFF (LZW) decompressor
are needed to see this picture.
C) Record behavior. The data file (*.dat)
file is created automatically during each
observation. It contains the additional
data about the observation as well as the
raw data that you have recorded
D) Create a Focal Analysis File which
specifies how data files (.dat) will be
analyzed and specifies the results to be
reported.
E) Quantitative analysis of each *.dat file
will produce a results file (*.cd.res) that
can be opened in Excel.
JWatcher is capable of more complex
observation recording (behavior combinations) and also more complex analyses
(transition and Summary results) that we will not explore today.
4 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
A) Defining your ethogram in JWatcher
You will continue to work in pairs.
The first thing you need to do is “define” your ethogram in JWatcher. Each student pair
will be recording the same behaviors we have recorded previously by hand, but you can
adapt your ethogram key code to suite your own habits. Some people prefer to use
logical key locations, others prefer to use logical letters that match the behavior
description. Confer with your partner and decide on a code.
1. In the Applications folder, find the JWatcher_V1.0 folder and double click.
Now double click on the JWatcher icon (black square, with a gold J and gray W)
to launch the JWatcher program.
2. When JWatcher first opens, you will be in the Data Capture tabbed window.
Click on the Global Definition tab to change windows. The Global Definition
window is where you will specify your ethogram (by assigning key codes to each
behavior.)
3. The Global Definition window is divided into two sections: one to define
behaviors and another to define modifiers. We will be defining behaviors only.
4. Click on the Add row button in the top section to begin assigning key codes to
behaviors.
5. It is up to you and your partner to choose the key strokes that correspond to each
behavior. You may use only one single character per behavior. Try to choose
something intuitive and easy to remember, such as a for aggression and f for
forage, etc. Note that JWatcher is case sensitive: f will NOT be recorded the
same way as F. Because it is difficult to switch between upper and lower case,
for this exercise, use lower case letters. Record the letters that you choose for
each behavior in your lab notebook also.
6. Type in the single character code in the Key Code box. Then either tab or click
into the adjacent Behavior box to type in the corresponding behavior. You may
also include a more lengthy description of each behavior in the Description box
but remember to avoid anthropomorphisms or “intent” in your descriptions
whenever possible.
7. Click on the Add row button to continue adding each behavior.
8. When you are done adding all your behaviors (you should have 10 behaviors),
click the Save button in the lower right corner of the window.
9. To Save your new Global Definitions file to the desktop click the house icon in
the upper right part of the Save As window. Now double click on the Desktop
folder icon for local user. Name your file (gdf_yourname_Ned_tues) by typing
into the File Name: box in the lower part of the window. The extension .gdf will
automatically be added when you click Save (this stands for Global Definitions
File).
Write down your chosen key codes and behavior descriptions in your lab notebook and
record the key codes at the top row of the data sheet (Continuous Recording Data Sheet)
included at the back of this exercise.
5 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
B) Specifying focal duration and other details for a JWatcher project
1. Now that you have specified your ethogram, the next step is to specify the length
of time that you would like to collect data for each focal sample, and also what (if
any) additional information you might want to record for each focal sample, such
as the time of day, or individual observed, etc.
2. Click on the Focal Master tab at the upper left to change windows (be careful, as
it is right next to Focal Analysis Master). (You may find yourself in the Test
Details page (see bottom left tabs). If so, change pages by clicking on the Define
Codes tab.)
3. The Define Codes page shows the ethogram to be used when scoring data for this
particular project. Currently, it should be blank. You could either reenter your
ethogram, or import the global definition file that you have already created.
4. To import your pre-existing ethogram, click on New (bottom center of the
window) and a new selections window will open. You should see your .gdf file
that you just made (gdf_yourname_Ned_tues.gdf) (if not, you will have to
navigate back to the desktop by clicking the house icon and then the desktop
icon). Select your global definition file (yourname_Ned_tues.gdf) from the list in
the top part of the window. Click Open to load your ethogram.
5. Next, using the lower left tabs, change to the Test Details page. We will score
each video for exactly 2 minutes. In the Duration boxes, type 0 in the hours
(HH) box, 2 in the minutes (MM) box, and 0 in the seconds (SS) box.
6. Finally, in the lower left tabs, change pages again by clicking on Questions. This
window is where you may define the variables that will be associated with each
focal sample file, such as individual ID, age, sex, time of day, etc. For our
purposes today, you only need to record the video clip name (A, B or C) for each
sample. But think about what types of information you would want for a real
study.
7. Type in Video Clip Title? under Question 1. This will prompt you later to
specify which clip you are watching when you start each behavior recording.
8. Click Save As to save your Focal Master File (fmf_yourname_Ned_tues). Make
sure that this file is being saved to the desktop where you saved your .gdf file
(though you will not currently see that file name). Again, the proper file
extension for a Focal Master File (.fmf) will automatically be added for you when
you click Save.
6 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
C) Scoring behavior with JWatcher
Now you are ready to begin scoring behavior.
Change windows by clicking on the Data Capture tab (upper left).
1. In this window, click on the file navigator icon (it looks like a sheet of paper) to
the right of the Focal Data box in order to name the data file you will be creating.
Navigate to the desktop by clicking the house icon then double click the desktop
icon.
2. Type in the name of your new file dat_name_Ned_tuesA in the File Name box
and click Open. Keep the names simple. (use only one of your names,
Jwatcher sometimes has problems with long names and spaces in names)
3. Specify your Focal Master File (fmf_yourname_ned_tues.fmf) by clicking on the
file navigator icon (it looks like a sheet of paper). You may need to navigate to
the desktop.
4. Select your .fmf file. Click Open.
(Remember that this file contains the ethogram along with additional
specifications such as the duration for recording the focal observation.)
5. Click the Next button at the bottom right to tab into the next page.
6. Answer the top question by typing the letter of the video clip into the box below
the question and click the next button to advance. We will start with A
7. Click the Next button.
If you wish to see a list of the behavioral codes on your computer screen, click the
Behaviors box in the upper right corner of the JWatcher screen.
8. Wait for Ned (Carey) to start the video clip. You also have to wait for the class.
9. You should be looking at the JWatcher – Data Capture – data_yourfile.dat
window
10. When the film has started, click on the Start button in the center of the Data
Capture page.
11. Immediately type the key code representing the behavior the subject is currently
engaged in.
12. Whenever the behavior changes, type the key code for the new behavior.
Continue for the two full minutes.
(JWatcher will automatically time out).
(JWatcher will automatically save your data in the .dat file that you named above)
If you made a data entry mistake, look at the timer and make a mental note of it. You can
fix it later. Because the whole class is working in parallel, we cannot backup and watch
the videos over.
When the class is ready to start the next video:
1. click the New button in the lower right corner.
2. Enter a new name for the next data file dat_name_Ned_tuesB in the File Name:
box.
3. Click Open.
4. Do not change the focal master file name. Leave it set to
fmf_yourname_ned_thus.fmf
5. Click Open. Click Next. Answer the question. Click Next.
6. When the film starts Click Start.
REPEAT THIS FOR THE FINAL VIDEO
7 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
D) Using JWatcher to analyze focal animal samples
Once you have scored all three video clips, you are now ready to use JWatchers analysis
algorithms to calculate time budgets. Analyzing data files is a two-part process.
First, you must create a new file called a focal analysis master file (*.faf) that specifies
which analyses you want done.
Second, you must run your data files through an analysis routine to generate results files.
1. To create a focal analysis master file, click on the Focal Analysis Master tab in
the upper left menu to open the window.
2. Click on the New box, at the bottom center.
3. You must now load your projects ethogram by choosing the same focal master
file that you used to capture data (fmf_yourname_ned_tues.fmf.) (If you do not
see your *.fmf file currently displayed, then navigate to the desktop by clicking
the house icon and then the desktop icon.) Select your file and click Open.
4. Once your ethogram has been loaded, immediately change pages by clicking on
the State Analysis tab on the bottom series of tabs. (Note: there is also an
Analysis tab above and a States tab below, you want State Analysis)
5. This is where you will specify which type of state analyses you want performed.
For this exercise, we will use the All Duration column on the far right. This
means that we are interested in the duration of states (but not the intervals in
between), and also that we want to include information about all of the states in
our focal sample, regardless if they have been truncated by the beginning or
ending of the session.
6. Select all the options available in the All Duration column (you should check a
total of seven boxes). Also, to the right, designate your key code for out-of-sight.
If your animal was out-of-sight for some part of the focal, then JWatcher will
correct for this by calculating the proportion of time in sight.
7. Click on the Save As button. Specify the location to save your new focal analysis
file, and give it a name (faf_yourname_ned_tues) by typing into the File Name:
box. Navigate to the desktop if necessary and click Save. Again, the proper file
extension .faf will automatically be added.
8. To generate results files, click on the Analysis tab in the center upper menu.
9. Use the file navigator icon (looks like a piece of paper) to select your
faf_yourname_ned_tues.faf file. Remember that the focal analysis file specifies
the types of analyses were going to calculate. Click Open.
10. Use the file navigator icon (looks like a piece of paper) to select the data file
(data_yourname_ned_tues.dat) to select the data file to analyze. Click Open.
11. Specify the Desktop as the appropriate location as the destination for the results
by clicking on the folder icon and then click Open (note: this file is automatically
created and named, you are just verifying that you know where it will be placed).
12. Select the Print results for all behaviors radio button.
13. Click the Analyze button at the bottom of the file window to analyze your data.
14. If you get a warning message, this is simply to tell you that there were
unrecognized key strokes in your file. These will be ignored.
REPEAT the analysis for each of the other two data files.
dat_name_Ned_tuesB and dat_name_Ned_tuesC
8 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
E) Viewing the results files
You will use Excel to view the results files.
There are two results files, *.cd.res, and *.tr.res.
The *.cd.res file has the quantitative results.
The *.tr.res has a file that you can open and graph the behavioral traces.
For todays exercise, you will open the *.cd.res files.
View the *.cd.res file by opening it through Excel. Excel will not automatically
recognize JWatcher files; you will need to tell Excel do it. The *.cd.res file is a comma
delimited text file.
Launch Excel from the dock
Use File /Open and navigate to the desk top.
At the top center of the Open dialog box Enable: All Documents needs to be set.
Select dat_yourname_Ned_tuesA.cd.res (your analyzed results file)
Click Open
Select the Delimited radio box
Click Next
Check the Comma box and Uncheck the Tab box
Click Next
Click Finish
Once opened, you should see a list of the behavioral codes and several summary statistics
for each behavioral code. Depending on the focus of your research you may be interested
in different measurements of the behavior. Today we will use the number (N) of times a
behavior occurred and the proportion (Prop_IS) of the total time in sight that is
accounted for by each behavior.
Each of your result files will have the following column headings that refer to just one of
your video observations.
StateAllDur_N:
Occurrence
StateAllDur_TT:
Total Time (in milliseconds)
StateAllDur_X:
Average Time (in milliseconds)
StateAllDur_SD:
Standard Deviation of the average time (in
milliseconds)
StateAllDur_PROP:
Proportion of Time
StateAllDur_PROP_IS: Proportion of Time in Sight
If your animal never went out-of-sight, then proportion of time and proportion of time in
sight should be the same. The proportion of time in sight for your behaviors is your time
budget.
Open your other two results files.
If you want to print these out, please save paper and take the time to format in Excel so
that it prints the complete file on one page. Select the row with the column headers.
Format / Cell / Alignment check wrap text.
Decrease the column width of all columns to fit on one page. (Ask if you need help.)
9 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
F) Comparing continuous recording versus time recording
Use the “Continuous Recording Data Sheet” at the back of this exercise or in your
lab notebook to compile your JWatcher analyzed data for these three observations.
We are going to compare the data collected by our JWatcher continuous recording
technique to the data collected by our manual time recording technique.
1.
2.
3.
4.
Fill in the N for each behavior in each video.
Count the total N for each behavior across the three videos.
Fill in the Prop IS value for each behavior in each video.
Determine the average proportion of time.
5. Compare the two Total counts for each behavior that you recorded using the two
techniques. Use the rough grid provided on the last page of this handout to make
a bar graph representing the total events recorded with time and continuous
recording. Add the proper scale markers to the graph, and label the X axis
behaviors
6. Compare the two Time Budgets that you calculated using the two techniques.
Use the rough grid provided on the last page of this handout to make a bar graph
that represents, for each behavior, the percent of total behavior recorded with
time recording and the average proportion of in sight time that was recorded by
continuous recording. Add the proper scale markers to the graph.
These rough graphs will give a visual representation allowing you to compare the two
techniques easily. While these graphs are not highly accurate, they may be very useful in
evaluating which technique to use in future studies.
Did continuous recording give you a better estimate of flamingo time budgets than
time recording?
Were some behaviors captured equally well with the two techniques?
If you were to collect more data, which recording rule would you use in the future?
Why?
Under what conditions would you choose not to use an event recorder?
How would you test for the reliability of your continuous recording technique?
10 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
Time Recording Data Sheet
1
2
3
4
5
6
7
8
9
10
Tone
Aggress Forage Groom Head Stand Sleep Walk Wing Other Out
Swing Look
Spread
Sight
A.1
A.2
A.3
A.4
A.5
A.6
A.7
A.8
A.9
A.10
A.11
A.12
A.13
B.1
B.2
B.3
B.4
B.5
B.6
B.7
B.8
B.9
B.10
B.11
B.12
B.13
C.1
C.2
C.3
C.4
C.5
C.6
C.7
C.8
C.9
C.10
C.11
C.12
C.13
Total
Percent
11 of 13
NAME ___________
Bio102_Renn_Lab4_Tues
Continuous Recording Data Sheet
Key
Code:
Agress Forage Groom Head Stand
Swing Look
N
Sleep Walk Wing
Other
Spread
A
B
C
total
PropIS A
B
C
average
This text was modified from Learning the scientific process by observing and quantifying
behavior© 2001-2006, Daniel T. Blumstein and Janice C. Daniel All rights reserved.
It was downlaoded with permission from http://www.jwatcher.ucla.edu/ 20070306
It has been modified for educational uses only.
12 of 13
Out
Sight
NAME ___________
Bio102_Renn_Lab4_Tues
# of EVENTS
Continuous
Timed
Figure 1. Number of events recorded with Continuous Recording and Timed Recording.
Total number from three 2 minute Flamingo videos.
Time Budget
Continuous
Timed
Figure 2. Time Budget as calculated by Continuous Recording and Timed Recording.
Continuous Recording as performed by JWatcher analysis for Proportion of time in sight.
Timed Recording is reported as percent of total behaviors. Data sample is as in figure 1.
13 of 13