Page 1 of 1

Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling)

Posted: 18 May 2023, 15:49
by CDG
Hi,

I have been trying to use the EM algorithm to estimate a latent class-choice model with Apollo.

Since I kept getting errors in the procedure, I decided to follow the last two examples on the website (EM_LC_no_covariates and EM_LC_with_covariates) to see what was wrong with my code. However, I got exactly the same error when running these files using the Swissmetro dataset:

Code: Select all

Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling) : 
  'length = 13' in coercion to 'logical(1)'
I have already tried several options for the "postEM" setting under lcEM_settings (i.e., 0, 1 or 2), and I have also upgraded to version 0.2.9.

I would be very thankful to get any orientation about what to do next?

Thanks for your work and for any help you can provide!

CDG

Re: Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling)

Posted: 19 May 2023, 11:47
by dpalma
Hi,

Thank you for letting us know about this issue. This is indeed a bug in v0.2.8. We will fix it in the next official release, but in the meantime, I created a new version where the bug is fixed. You can download this new version from the links below. Choose the version for your computer's operating system:

Apollo v0.3.0 (beta) for Windows
Apollo v0.3.0 (beta) for Linux (source)

If you are using mac, please let me know and I will try generating a version for you, but it might take a couple of day.

You can install the package in RStudio by going to the menu bar (the menu at the top of the screen) and select Tools > Install Packages... . Then, in the window that will open, you select "Package archive" on the top drop-down menu. That will open another window to pick a file. Select the file you downloaded, and then click "Install".

Best wishes
David

Re: Error in length(apollo_inputs$apollo_scaling) > 0 && !is.na(apollo_inputs$apollo_scaling)

Posted: 19 May 2023, 17:38
by CDG
Hi David,

Thanks for your prompt response!

I will try with this updated version. I use Windows so I don't think there should be any problems.

Best wishes,