\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}(-1,0)(6,13)
  \SpecialCoor

  \rput(6,2){\GM@node[observed=true]{gamma}}
  \GM@label[angle=-180]{gamma}{$\gamma$}
  
  \rput(6,4){\ovalnode{b}{$\boldsymbol{b}_1 \ldots \boldsymbol{b}_K$}}  
  
  \rput(1,6){\GM@node[observed=true]{y_11}}
  \GM@label[angle=140]{y_11}{$y_{1,1}$}

  \rput(2.5,6){\GM@ldots{y_12}}  
  
  \rput(4,6){\GM@node[observed=true]{y_1L1}}
  \GM@label[angle=140]{y_1L1}{$y_{1,L_1}$}
  
  \rput(1,8){\GM@node{q_11}}
  \GM@label[angle=140]{q_11}{$q_{1,1}$}

  \rput(2.5,8){\GM@ldots{q_12}}  
  
  \rput(4,8){\GM@node{q_1L1}}
  \GM@label[angle=140]{q_1L1}{$q_{1,L_1}$}
  
  \rput(2.5,10){\GM@node{pi_1}}
  \GM@label[angle=140]{pi_1}{$\boldsymbol{\pi}_1$}  
  
  \rput(6,6){\GM@ldots{y}} 
  \rput(6,8){\GM@ldots{q}} 
  \rput(5,10){\GM@ldots{pi_2}}
  \rput(7,10){\GM@ldots{pi_3}}
  
  \rput(8,6){\GM@node[observed=true]{y_N1}}
  \GM@label[angle=140]{y_N1}{$y_{N,1}$}

  \rput(9.5,6){\GM@ldots{y_N2}}  
  
  \rput(11,6){\GM@node[observed=true]{y_NLN}}
  \GM@label[angle=140]{y_NLN}{$y_{N,L_N}$}
  
  \rput(8,8){\GM@node{q_N1}}
  \GM@label[angle=140]{q_N1}{$q_{N,1}$}

  \rput(9.5,8){\GM@ldots{q_N2}}  
  
  \rput(11,8){\GM@node{q_NLN}}
  \GM@label[angle=140]{q_NLN}{$q_{N,L_N}$}
  
  \rput(9.5,10){\GM@node{pi_N}}
  \GM@label[angle=40]{pi_N}{$\boldsymbol{\pi}_N$}    
  
  \rput(6,12){\GM@node[observed=true]{alpha}}
  \GM@label[angle=-180]{alpha}{$\alpha$}
  
  \ncline{->}{gamma}{b}
  \ncline{->}{b}{y_11}
  \ncline{->}{b}{y_1L1}
  \ncline{->}{b}{y_N1}
  \ncline{->}{b}{y_NLN}
  \ncline{->}{q_11}{y_11}
  \ncline{->}{q_1L1}{y_1L1}
  \ncline{->}{q_N1}{y_N1}
  \ncline{->}{q_NLN}{y_NLN}
  \ncline{->}{pi_1}{q_11}
  \ncline{->}{pi_1}{q_1L1}
  \ncline{->}{pi_N}{q_N1}
  \ncline{->}{pi_N}{q_NLN}
  \ncline{->}{alpha}{pi_1}
  \ncline{->}{alpha}{pi_N}
  
\end{pspicture}

\endTeXtoEPS
\end{document}
