[R] Path Diagram

Laura Thomas lbt1 at aber.ac.uk
Tue Apr 16 19:17:13 CEST 2013


Hi All,

Apologies if this has been answered somewhere else, but I have been
searching for an answer all day and not been able to find one.

I am trying to plot a path diagram for a CFA I have run, I have installed
Rgraphviz and run the following:

pathDiagram(cfa, min.rank='item1, item2, item3, item4, item5, item6,
item7, item8, item9, item10, item11, item12', max.rank='SMP, AAAS',
file='documents')

I get the following message and output:

Running  dot -Tpdf -o documents.pdf  documents.dot

digraph "cfa" {
  rankdir=LR;
  size="8,8";
  node [fontname="Helvetica" fontsize=14 shape=box];
  edge [fontname="Helvetica" fontsize=10];
  center=1;
  {rank=min "item1" "item2" "item3" "item4" "item5" "item6" "item7"
"item8" "item9" "item10" "item11" "item12"}
  {rank=max "SMP" "AAAS"}
  "SMP" [shape=ellipse]
  "AAAS" [shape=ellipse]
  "SMP" -> "item1" [label="smp0"];
  "SMP" -> "item3" [label="smp1"];
  "SMP" -> "item4" [label="smp2"];
  "SMP" -> "item6" [label="smp3"];
  "SMP" -> "item8" [label="smp4"];
  "SMP" -> "item10" [label="smp5"];
  "SMP" -> "item11" [label="smp6"];
  "AAAS" -> "item2" [label="aaas0"];
  "AAAS" -> "item5" [label="aaas1"];
  "AAAS" -> "item7" [label="aaas2"];
  "AAAS" -> "item9" [label="aaas3"];
  "AAAS" -> "item12" [label="aaas4"];
}

How do I get to see the graph?

Many thanks,

Laura

Laura Thomas
PhD Student- Sport and Exercise Psychology
Department of Sport and Exercise
Penglais Campus
Aberystywth University
Aberystwyth

01970621947
lbt1 at aber.ac.uk
www.aber.ac.uk/en/sport-exercise/



More information about the R-help mailing list