Page 1 of 1

Error with apollo_prediction

Posted: 21 Jan 2022, 16:38
by richardqiu
Dear Prof Hess,
I am using Apollo v0.2.6 and working on the prediction of a LC model. I've received the following error message when using the apollo_prediction function.

Code: Select all

Error in if (is.matrix(P[[j]][[k]]) & ncol(P[[j]][[k]]) == nInter) P[[j]][[k]] = rowMeans(P[[j]][[k]]) : 
  argument is of length zero
I traced the error back to the apollo_avgInterDraws function and noticed that in line 106, the code is running as

Code: Select all

if (is.matrix(P[[j]][[k]]) & ncol(P[[j]][[k]]) == 
                nInter)
It seems to me that the condition should be && instead of &, as the second condition should not be evaluated if the first condition is FALSE.
Could you please take a look?

Thank you!

Richard

Re: Error with apollo_prediction

Posted: 24 Jan 2022, 13:14
by stephanehess
Richard

thanks. You're right. This will be fixed in 0.2.8 We'll update it to the website in the near future.

Stephane

Re: Error with apollo_prediction

Posted: 25 Jan 2022, 03:28
by richardqiu
Thank you for your reply and confirmation, Prof Hess! Apollo is really a fantastic tool for us choice modelers.
Best,
Richard

Re: Error with apollo_prediction

Posted: 26 Jan 2022, 14:17
by stephanehess
thanks. Btw, we made this change now in 0.2.7 already which you can download from the website