Structural Equations and Path Analysis for Discrete Data