Skip to content

Help on plot from transition matrix

3 messages · Luis Fernando García, Jim Lemon

#
I am wanting to make a flow diagram like the one attached as an example for
the given dataset.

The idea is to plot a flow diagramm using the probabilities given by a
transition matrix like the displayed in the example below. I have found
some tools like DiagrammeR which might work for this purpose, but it works
by introducing values manually. I wanted to know if there exists any
package able to plot automatically the flow diagram, given the transition
probabilities.

Thanks in advance.

#######

library(TraMineR)

h2a=c("Q-X-Q-Y-W-Z-P")

h3a=c("Q-X-Q-Y-W-Z-P-Q-M-P-Q-A")

h4a=c("Q-X-Q-X-Q-X-Q-Y-W-Z-C-B-Q-M-B-Q-A")

h6a=c("Q-X-Q-X-Q-Y-W-Z-P-Q-P-Q-M-Q-A")

h7a=c("Q-Y-W-Z-P-Q-B-Q-M-A")

h8a=c("Q-Y-W-Z-P-B-Q-M-Q-A")

h9a=c("Q-X-Q-W-Z-B-Q-A")

h10a=c("Q-Y-W-Z-Q-A")

h11a=c("Q-Y-W-Z-B-Q-P-B-Q-M-A")

h12a=c("Q-W-Z-B-P-Q-A")

h13a=c("Q-X-Q-Y-W-Z-P-Q-A")

h14a=c("Q-X-B-X-Q-X-B-Q-X-Q-X-Q-Y-W-Z-B-P-B-Q-A")

h15a=c("Q-X-Y-W-Z-B-P-Q-B-Q-A")

h16a=c("Q-X-Q-B-Q-X-B-X-Q-Y-W-Z-P-B-Q-A")

h17a=c("Q-X-Q-X-B-X-Q-W-Z-P-B-P-Q-A")

h18a=c("Q-Y-W-Z-B-P-Q-B-Q-P-Q-M-B-P-A")

h19a=c("Q-W-Z-B-P-Q-P-Q-M-Q-A")

a=c(h2a,h3a,h4a,h6a,h7a,h8a,h9a,h10a,h11a,h12a,h13a,h14a,h15a,h16a,h17a,h18a,h19a)

a

library(TraMineR)

i1=seqdef(c(h2a,h3a,h4a,h6a,h7a,h8a,h9a,h10a,h11a,h12a,h13a,h14a,h15a,h16a,h17a,h18a,h19a))

seqtrate(i1)
#
Hi Luis,
As so often happens, the image didn't make it. Try PNG or PDF format.
Without seeing what you want, it's only guessing.

Jim

On Mon, Aug 24, 2020 at 6:34 PM Luis Fernando Garc?a
<luysgarcia at gmail.com> wrote:
#
Thanks Jim,

I do not know what happened, I will try the question again.

Best

El lun., 24 ago. 2020 a las 5:47, Jim Lemon (<drjimlemon at gmail.com>)
escribi?: