I’m currently working on building a model that looks at the number of late spring freezing events based on mean spring temperature, NAO, and elevation in brms. I have about 1 billion rows of data so it is very, very slow. It can take up to a week to run.
Here’s a made up dataframe:
cc <-sample(c(0,1), replace=TRUE, size=150) species <-sample(c("Acer", "Betula", "Quercus", "Fagus"), replace=TRUE, size=150) df<-data.frame(freeze=rnorm(150, mean=3, sd=1), mat=rnorm(150, mean=0, sd=5), nao=rnorm(150, mean=1, sd=2), elevation=rnorm(150, mean=4, sd=1), cc=cc, species=species)
And my current model:
fit<- brm(freeze ~ nao + mat + elevation + cc + nao:cc + mat:cc + elevation:cc + (nao + mat + elevation|species), data=df, control = list(max_treedepth = 12,adapt_delta = 0.99), chains = 4, cores = 4)
Do you have any suggestions to speed this up? Thanks!