[R-sig-eco] Transition matrix arrangement for Canonical Correspondence Analysis
Luis Fernando García
luysgarcia at gmail.com
Mon Apr 13 00:26:57 CEST 2015
Dear R experts,
I just want to ask you about a very basic topic, although I have been
looking for info on the web, I have not found conclusive evidence or a
similar example about how to arrange data.
I am trying to perform a Canonical Correspondence Analysis in R.I have one
categorical data (species) and several numerical variables (behavior
transition frequencies). The aim of my analysis is to find out if the
frequency of the occurence of certain behaviors allows to separate both
species.
I have been trying to find out how to arrange the data. Since I have to
build a very big matrix (about 2000 rows) I want to know how to arrange
data before running the analysis. I have attached a sample with the
original data arrangement. My main concern is that the data has the
behaviors twice (preceeding and following), and I would like to know how to
deal with this data.
Thanks in advance and sorry for the long message!
-------------- next part --------------
Species Preceeding/Following BehavA BehavB BehavC BehavD BehavE BehavF BehavG BehavH total
A BehavA 0 0 0 0,064516129 0,064516129 0,032258065 0 0,838709677 1
A BehavB 0 0 0,866666667 0 0 0,133333333 0 0 1
A BehavC 0,076923077 0,076923077 0 0 0 0,846153846 0 0 1
A BehavD 1 0 0 0 0 0 0 0 1
A BehavE 0 0,111111111 0 0 0 0,111111111 0,777777778 0 1
A BehavF 0 0,111111111 0 0 0 0,111111111 0,777777778 0 1
A BehavG 0,315789474 0 0 0,578947368 0,105263158 0 0 0 1
A BehavH 0 0,857142857 0 0 0 0,142857143 0 0 1
B BehavA 0 0 0 0,25 0,25 0 0,5 1
B BehavB 0 0 0,75 0 0 0,25 0 0 1
B BehavC 0 0,16 0 0 0 0,846153846 0 0 1
B BehavD 1 0 0 0 0 0 0 0 1
B BehavE 0 0,111111111 0 0 0 0,111111111 0,777777778 0 1
B BehavF 0 0,111111111 0 0 0 0,111111111 0,777777778 0 1
B BehavG 0,315789474 0 0 0,68 0 0 0 1
B BehavH 0 0,857142857 0 0 0 0,142857143 0 0 1
More information about the R-sig-ecology
mailing list