flux: Draws a flow chart from a transition matrix

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Draws a flow chart from a transition matrix on the projection plans of a CA (Correspondence Analysis). requires two objects of class data.frame: tabcoord a table of axis coordinates on up to 7 columns, and tabtr the transition matrix.

Usage

1
2
flux(tabcoord, tabtr, dic = NULL, fac = c(1, 2), Sort = NULL, threshold = 0, 
scale = 0.1, cscale = 0.1,main="Transition graph", ...)

Arguments

tabcoord

data.frame: nfac + 3 columns

  • id factor: identifier of individuals

  • w numeric: weight

  • f1 numeric: coordinates on axis 1

  • f2,...numeric: next coordinates until nfact

  • type factor: "pri" for principal, "ill" for illustrative (or 'supplementary')

tabtr

data.frame: transition matrix. Either frequencies or probabilities. Caution this data.frame must contain the row identifiers as first column

dic

character vector: list of items labels. If NULL (default) must be extractible from tabtr column names

fac

vector: two elements: the numbers of the two factors to use in tabcoord

Sort

numeric: number of the factor used to sort the drawing of the elements.
Default = NULL (sorting in the order of the dictionary. Otherwise must be comprised between 1 et nfac.
If positive, sort in ascending order. If negative, sort in decreasing order

threshold

numeric: minimal threshold to draw the arrows. Represent a oroportion of the weight of the element used as origin of the arrow.

scale

numeric: Controls the width of the arrows

cscale

numeric: Controls the radius of the circles.

main

character:title of the plot

...

... supplementary arguments for smartArrow

Details

tabcoord must be an the attribute $fl or $fc of an object of class ca

Value

An object of class graph.

Note

The correct definition of fac is under the user's responsability. Must know how many coordinates exist in the object tabcoord. Use summary(<tabcoord>) in case of doubt.

Author(s)

Jean-Sebastien Pierre
Jean-sebastien.pierre@univ-rennes1.fr

References

Pierre, J. S. and C. Kasper (1990). The Design of Ethological Flow-Charts on Factorial Analysis Representations - an Application to the Study of the Male Mole-Cricket Sexual Courtship. Biology of Behaviour 15(3-4): 125-151.(in french)
Van der Heijden, P. G. M. 1986. Transition matrices, model fitting and correspondence analysis. In: Data Analysis and Informatics IV (Ed. by E. Diday), pp. 221-226. Elsevier Science Publishers.

See Also

compseq to create transition matrices, compmat to compare transition matrices,
read.series.seq to read a file of sequences,ca to perform a Correspondence Analysis

Examples

1
2
3
4
5
6
7
8
# Analysis of Wiepkema's data
data(wiepkema)
# Symmetrisation and diagonal loading
symet(wiepkema,ident=TRUE)->swiepkema
# Correspondence Analysis
ca(wiepkema,isup=c(5,11),jsup=c(5,11))->afcwiepk
# Flow chart / transition graph
flux(tabcoord=afcwiepk$fr,tabtr=wiepkema,threshold=0.025,scale=2)

sequence documentation built on March 26, 2020, 7:30 p.m.