performance icon indicating copy to clipboard operation
performance copied to clipboard

check_model() on more brms families

Open DominiqueMakowski opened this issue 2 years ago • 2 comments

Currently check_model() errors on some families, even though some plot could be produced (at least, a PP check)

m <- brms::brm(wt ~ mpg * hp, family = "shifted_lognormal", data = mtcars, refresh = 0)
#> Compiling Stan program...
#> Start sampling

# Doesn't work :'(
performance::check_model(m)
#> Error in get(family$family): object 'shifted_lognormal' not found

# Works
plot(performance::check_collinearity(m))
#> Warning: Model has interaction terms. VIFs might be inflated. You may check
#>   multicollinearity among predictors of a model without interaction terms.

# plot(performance::check_heteroscedasticity(m))

# Works
performance::check_predictions(m)
#> Using 10 posterior draws for ppc type 'dens_overlay' by default.


# Doesn't work
performance::check_homogeneity(m)
#> Error in bartlett.test.default(x = mf[[1L]], g = mf[[2L]]): there must be at least 2 observations in each group

# Works
plot(performance::check_outliers(m))

Created on 2022-08-06 by the reprex package (v2.0.1)

DominiqueMakowski avatar Aug 06 '22 02:08 DominiqueMakowski

Related to #417, #454

IndrajeetPatil avatar Aug 06 '22 05:08 IndrajeetPatil

I can take care of improving the outliers plots

bwiernik avatar Aug 06 '22 17:08 bwiernik