Skip to content

LOO fails for data with only one observation #71

Description

@paul-buerkner

Reproducible example with the dev version of brms:

fit1 <- brm(count ~ log_Age_c, epilepsy)
LOO(fit1, newdata = epilepsy[1, ])
> Error in colSums2(x) : 
>   Argument 'dim' must be an integer vector of length two. 

I think there is a drop = FALSE argument missing somewhere when indexing observations. If possible it would be amazing if this could be fixed before releasing loo 2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions