Loglinear spatial factor analysis: an application to diabetes mellitus complications