loo
loo copied to clipboard
how to change the unit of the loo comparison?
I am running two brms models with longitudinal time data. I want to compare the models but using the loo compare function will take away individual datapoints that are not very useful because of the correlation between the other datapoints that are left in the data. Is there a way to change the unit for the loo comparison, so that instead of individual datapoints I can choose whole trials?
Thanks in advance
Use log_lik() function to get matrix of individidual log_lik values for each posterior draw. Sum log_lik values belonging to each trial to get joint log_lik per trial for each posterior draw. Call loo with this new log_lik matrix.