I am trying to draw a representation of a statistical multi-level model: examples of what I am trying to do can be seen in figures 3a or 3b, at http://www.esourceresearch.org/tabid/332/Default.aspx.
I have made an attempt, but cannot get the spacing correct. In the figure below, the children of c1 and cn overlap (so that only the child of cn can be seen). I also do not know how to appropriately add the dots between each of the levels: between one and two and two and n, and between t1 and tn, and so on. I tried just adding an extra child node, but I from the looks of it, it is not the way to go. Thanks.
My code
\documentclass{article}
\usepackage[landscape, left=10pt]{geometry}
\usepackage{tikz}
\begin{document}
% styles
\tikzstyle{every node} = [rectangle, draw, text centered, rounded corners, fill=blue!20, minimum height=1cm, minimum width=1cm]
\begin{tikzpicture}[sibling distance=1.25cm]
\node { one }
child { node {c1}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
}
child { node [draw=none] {\ldots}
}
child { node {cn}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
}
;
\hspace*{7cm} \node { two }
child { node {c1}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
}
child { node [draw=none] {\ldots}
}
child { node {cn}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
};
\hspace*{7cm} \node { n }
child { node {c1}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
}
child { node [draw=none] {\ldots}
}
child { node {cn}
child { node {t1}}
child { node [draw=none] {\ldots}}
child { node {tn}}
};
\end{tikzpicture}
\end{document}




justtreescan do this straightforwardly and I need stuff to test it on. Or I can just show you how to do it a little less straightforwardly withoutjusttrees;). – cfr Oct 11 '16 at 16:02forestbut hadn't managed to produce anything reasonable. If there is a way to adapt this to add labels on the left that would be great, but as is im very happy. – user20650 Oct 11 '16 at 16:41foresttag, but I try to give a very basic intro to Forest in the answer. – cfr Oct 11 '16 at 23:56poor mancode – Ignasi Oct 12 '16 at 21:52