\documentclass{article}
\usepackage{com.braju.graphicalmodels}
\usepackage{amsmath}
% \special{papersize=40mm,80mm}
% \setlength{\pdfpagewidth}{40mm}
% \setlength{\pdfpageheight}{80mm}
% \usepackage[vcentering,dvips]{geometry}
% \geometry{papersize={80mm,120mm},total={80mm,120mm},margin=0mm}



\catcode`\@=11%

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\LARGE
\psset{unit=10mm,arrowscale=1.5,linewidth=1.5pt}

\begin{pspicture}(0,0)(6,9)
  \SpecialCoor

  \rput(2,4){\GM@node{q_i}}
  \GM@label[angle=40]{q_i}{$q_i$}

  \rput(5,1){\fnode[framesize=30pt]{eta_ab}}
  \rput(5,1){$\boldsymbol{\eta}_{a,b}$}
  
  \rput(5,4){\GM@node[observed=true]{R_ij}}
  \GM@label[angle=40]{R_ij}{$R_{i,j}$}

  \rput(1,3){\GM@plate{5.5}{2}{$I$}}

  \rput(2,7){\ovalnode{pi}{\phantom{abc}}}
  \rput(2,7){$\boldsymbol{\pi}$}

  \rput(5,7){\GM@node{q_j}}
  \GM@label[angle=40]{q_j}{$q_j$}

  \rput(3.5,2){\GM@plate{3.5}{6}{$J$}}

  \ncline{->}{eta_ab}{R_ij}
  \ncline{->}{q_i}{R_ij}
  \ncline{->}{pi}{q_i}
  \ncline{->}{pi}{q_j}
  \ncline{->}{q_j}{R_ij}
  
\end{pspicture}

\endTeXtoEPS
\end{document}
