[Tex/LaTex] tikz-cd drawing arrow to another arrow

diagramstikz-cd

I am trying to reproduce this image http://www.ats.ucla.edu/stat/stata/faq/model5s.png
from this page http://www.ats.ucla.edu/stat/stata/faq/modmed.htm using tikz-cd. I have the following code and diagram. How do I add an arrow from W to the arrow of X to M or to the arrow from M to Y?

I am not sure if it is possible since the arrows themselves are not nodes. Also, is it possible to include an oval or rectangular border around a node? I may not be using the right package. I appreciate any suggestions.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}

\begin{tikzcd}
    & W \\
    & M \arrow{dr} \\
    X \arrow{ur} \arrow{rr} & & Y
\end{tikzcd}

\end{document}

enter image description here

Thanks,
ksint

Best Answer

One possibility using the name key and then using those names to draw the arrows:

enter image description here

The code:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
& A 
\\
B\arrow[r,""{name=B}] & C\arrow[r,""{name=C}] & D 
\arrow[from=1-2,to=B]\arrow[from=1-2,to=C]
\end{tikzcd}

\begin{tikzcd}
    & W \\
    & M \arrow[dr,""{name=R}] \\
    X \arrow[ur,""{name=L}] \arrow{rr} & & Y
\arrow[from=1-2,to=L]\arrow[from=1-2,to=R]
\end{tikzcd}

\end{document}