Error during estimation: Log data density [Laplace approximation] is NaN

Why did you go for a full substitution? That is not recommended. See Question about understanding irfs in dynare - #4 by jpfeifer