error message for getPosterior and optimizer