added input checking to jags_analysis