I want to used stratifid kfold cross-validation in brms. It said that ‘group’ should be provided with folds=‘stratified’, but I don’t know what is the group meaning.
I have defined group<-factor(x=fit1$data$y,levels=c(0,1))
but the error is Group ‘011010110111010’ is not a valid grouping factor. Valid groups are: ‘’
I am not sure what should be put in. Could you please help me ?