How to understand missing data mechanisms using DAGs I'm wondering when it is possible to distinguish between a data generating process that is missing at random (MAR) vs one that is not missing at random (NMAR) by analyzing a directed acyclic graph (DAG). For example, suppose we have the following: 
$$
\begin{matrix} 
T& \longrightarrow & Y \\ 
\downarrow & & \\ 
R_{Y}
\end{matrix} 
$$
where $R$ is the indicator for missingness on the outcome variable $Y$ and $T$ is treatment and always observed. In this case it's clear that $R$ is conditionally independent of $Y$ given $T$, which is what's required for making a determination of MAR (at least according to most definitions I've seen).
But suppose we had a slightly different graph:
$$
\begin{matrix} 
T& \longrightarrow & Y \\ 
\downarrow & & \\ 
L & & \\
\downarrow \\
R_{Y}
\end{matrix} 
$$
where $L$ is an unobserved/latent variable. Suppose that $R_Y=0$ ($Y$ is missing) if $L$ is greater than some threshold value. Like in the first graph, we still have a situation in which missingness on $Y$ is conditionally independent of $Y$ given $T$ (which is always observed). But now missingness on $Y$ does depend on the unobserved value of $L$. 


*

*Does that make this NMAR? 

*Or is it still MAR since even though we don't observe $L$ we know that it depends on the always observed variable $T$?

 A: The scenario where $R_Y$ depends on $L$ would be considered MAR. In particular, the arrow in diagram 1 from $T$ to $R_Y$ has unobserved variables along its path but these don't change the conclusions from the diagram. The key being that $R_Y$ and $Y$ are independent given $T$. Below are examples of the three types of missing data expressed through DAGs.
MCAR:
$$
\begin{matrix} 
T& \longrightarrow & Y \\ 
\\
R_{Y}
\end{matrix} 
$$
MAR:
$$
\begin{matrix} 
T& \longrightarrow & Y \\ 
\downarrow & & \\ 
R_{Y}
\end{matrix} 
$$
NMAR:
$$
\begin{matrix} 
T& \longrightarrow & Y \\ 
& & \downarrow \\
& & R_{Y}
\end{matrix} 
$$
As shown, under MCAR $R_Y$ and $T$ are independent. Under MAR $R_Y$ and $T$ are independent conditional on $T$. Lastly, under NMAR $R_Y$ and $T$ are not independent since $Y$ determines that missingness of itself. For NMAR, we can also replace the direct $Y \rightarrow R_Y$ instead with a unobserved variable $U$ linking $Y$ and $R_Y$
I highly recommend the below source for the application of missing data in the causal DAG framework.
Source:
Daniel RM, Kenward MG, Cousens SN, & De Stavola BL. (2012). Using causal diagrams to guide analysis in missing data problems. Statistical methods in medical research, 21(3), 243-256.
