%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% A.5 Drawing multistate diagrams with the Epi R package
%% Use tikZ package to create Figure A.4(b)
%%
%% December 11, 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows, shapes.geometric}


\begin{document}

\tikzset{square/.style={draw, regular polygon, regular polygon sides=4, minimum size=2cm}}

\begin{figure}
\centering
\begin{tikzpicture}
\node[square] at (0,0)  (0) {$0$};
\node[square] at (6,0)  (1) {$1$};
\node[square] at (3,-4) (2) {$2$};
\draw[->, line width=2pt, >= triangle 45, auto]
(0) edge node {$\lambda_{01}$} (1)
(0) edge node {$\lambda_{02}$} (2)
(1) edge node {$\lambda_{12}$} (2);
\end{tikzpicture}
\end{figure}

\end{document}
