I have a data frame that looks like:
df <- data.frame(id=c(rep("no.234",20),rep("no.125",15)),y=rnorm(35))
I would like to use the bayes bootstrap on each id, iterate e.g., 1000 times, and put the result it in a list, using a loop or a pipe. The procedure for 1 id is:
require(bayesboot)
require(dplyr)
no.234 <- df %>% filter(id=="no.234")
bb <- bayesboot(no.234$y, R=1000)