diagnostics and model selection