Hi,
I got an error message regarding LOO estimation. After testing the LOO scores and comparing the LOO scores, I get an error message: "Error: Not all models have the same number of data points". However, I can see the individual LOO scores for each model. I guess my problem with my models is due to the variables. In the first model, I used one variable. In the next model, I included two variables. In the third model, I added five or more variables. Each variable may not match with other variables. I can see the log-likelihood matrix is different for the three models. Is that the problem? If so, how can I rectify it.
Thanks.
#.Log-likelihood matrix from the LOO score:
Model-1: Computed from 4000 by 23268 log-likelihood matrix
Model-2: Computed from 4000 by 21668 log-likelihood matrix
Model-3: Computed from 4000 by 20168 log-likelihood matrix
#.Models: I fitted the models using the BRMS package.
model1 = brm(kgd06riv ~ icowsal, family = bernoulli(link = “logit”),
data = ics,refresh = 0, chains = 4,
iter = 2000, prior = prior)
model2 = brm(kgd06riv ~ icowsal + settle, family = bernoulli(link = “logit”),
data = ics,refresh = 0, chains = 4,
iter = 2000, prior = prior)
model3 = brm(kgd06riv ~ icowsal + settle + jtdem +
atopally + cincratio,
family = bernoulli(link = “logit”),
data = ics,refresh = 0, chains = 4,
iter = 2000, prior = prior)