3 Event Transition Functions
Functions for analysis of transitions between behavioral events
(require "../event-transitions.rkt") | package: base |
procedure
(build-transitions-matrices #:ts-hash event-timestamps-hash)
→ hash? event-timestamps-hash : hash?
Three matrices are returned, with keys "all", "<IEI", ">IEI"
"all" is transition of every event to every other event, regardless of interevent interval; transitions to inactive intervals are not included "<IEI" is transition of events to other events only if the inter-event interval is less than kInactiveInterval; transitions between events with intervals greater than kInactiveInterval are coded as event1 -> "interval", "interval" -> event2 ">IEI" is transition of events to other events only if the inter-event interval is greater than kInactiveInterval; this allows quantification of events on either side of an inactive period
procedure
(transition-matrix->table matrix) → list?
matrix : hash?
header row = ’("From \u2193 \\ To \u2192" <event-names>1-k "interval" "total") each row1-j: ’( <event-name>j [transitions j->k]1-k [j->inactive] <row-total>)
procedure
(transition-matrix->dot matrix [#:expt expt]) → digraph?
matrix : hash? expt : (or/c null? list?) = null
which can then be used to plot a pict.
If expt is provided the colors of eventypes are assigned to the nodes
procedure
(transition-matrix->pict matrix [ #:expt expt]) → pict? matrix : hash? expt : (or/c null? list?) = null
as generated by transition-matrix->graphviz
If expt is provided the colors of eventypes are assigned to the nodes
procedure
(files-table->transition-matrices #:expt expt #:files-table file-table) → hash? expt : list? file-table : query-table?
NB: results are slightly different from ethogram transitions. This routine analyses each file separately then sums results, but transitions between files (ie across file boundaries) are NOT included When working with a single subject’s ethogram, the event records of individual files are concatenated into continuous event records that span all files for that subject. So ethogram has a few more transitions ( + (number of files - 1)) than the sum of transitions from individual files