
\documentclass{article}
\usepackage{com.braju.graphicalmodels}
\usepackage{gastex}

\catcode`\@=11%

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\LARGE
\psset{unit=10mm,arrowscale=1.5,linewidth=1.5pt}
\begin{pspicture}(0,0)(18,10)%\showgrid
  \SpecialCoor
  
  \rput(2,5){\GM@node[observed=false]{X1a}} \GM@label[angle=90]{X1a}{X1}      
  \rput(3,3){\GM@node[observed=false]{X2a}} \GM@label[angle=0]{X2a}{X2}  
  \rput(4,5){\GM@node[observed=false]{X3a}} \GM@label[angle=90]{X3a}{X3} 
  \rput(3,1){\GM@node[observed=false]{X4a}} \GM@label[angle=-90]{X4a}{X4}
  \rput(1,3){\GM@node[observed=false]{X5a}} \GM@label[angle=-90]{X5a}{X5}
  
  \rput(8,5){\GM@node[observed=false]{X1b}} \GM@label[angle=90]{X1b}{X1}
  \rput(9,3){\GM@node[observed=false]{X2b}} \GM@label[angle=0]{X2b}{X2}
  \rput(10,5){\GM@node[observed=false]{X3b}} \GM@label[angle=90]{X3b}{X3}
  \rput(9,1){\GM@node[observed=false]{X4b}} \GM@label[angle=-90]{X4b}{X4}
  \rput(7,3){\GM@node[observed=false]{X5b}} \GM@label[angle=-90]{X5b}{X5}   
  
  \rput(14,5){\GM@node[observed=false]{X1c}} \GM@label[angle=90]{X1c}{X1}
  \rput(15,3){\GM@node[observed=false]{X2c}} \GM@label[angle=0]{X2c}{X2}
  \rput(16,5){\GM@node[observed=false]{X3c}} \GM@label[angle=90]{X3c}{X3}
  \rput(15,1){\GM@node[observed=false]{X4c}} \GM@label[angle=-90]{X4c}{X4}
  \rput(13,3){\GM@node[observed=false]{X5c}} \GM@label[angle=-90]{X5c}{X5}       
  
  \psset{linecolor=red}
  \ncline[arrows=->]{X1a}{X5a}
  \ncline[arrows=->]{X1a}{X2a}
  \ncline[arrows=->]{X3a}{X2a}
  \ncline[arrows=->]{X2a}{X4a}
  
  \ncline[arrows=->]{X1b}{X5b}
  \ncline[arrows=->]{X1b}{X2b}
  \ncline[arrows=->]{X3b}{X2b}
  
  
  \ncline[arrows=->]{X1c}{X2c}
  \ncline[arrows=->]{X3c}{X2c}
  \ncline[arrows=->]{X2c}{X4c}
  
  \psset{linecolor=blue}
  \ncline[arrows=->]{X4b}{X2b}
  \ncline[arrows=->]{X5c}{X1c} 
  
  \psset{linecolor=black}
  \huge
  \rput(2.8,6){\rput[b](0.25,0.4){$G_1$}}
  \rput(8.8,6){\rput[b](0.25,0.4){$G_2$}}
  \rput(14.8,6){\rput[b](0.25,0.4){$G_3$}}
   

\end{pspicture}

\endTeXtoEPS
\end{document}
