Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

Apollo not properly loading (I believe)

Ask questions about installing Apollo, running it inside a shell, and updating to new versions. Please make sure you provide information about which version of Apollo and R you are using.
Post Reply
ha.ortiz10
Posts: 4
Joined: 02 Jun 2020, 23:17

Apollo not properly loading (I believe)

Post by ha.ortiz10 »

Hi
I use r 4.3.2. on RStudio
I installed apollo 0.3.1, and 0.2.9.
After running library(apollo), it is loaded but with the next message:

> library(apollo)


. ,,
, ,,
,,,,,, , ,,
, ,, , ,,,,.
,, , ,, ,,,,,, ,,, // //
, ,,,. ,,,,,. ,, //// // //
,, ,,,,,. ,, // // ////// ///// // // /////
,,, ,, , // // / // // // // // // //
,, , //////// / // // // // // // //
,, ,, // // / /// // // // // // //
, // // ///// /// // // ///
//
//

Apollo 0.3.1
http://www.ApolloChoiceModelling.com
See url for a detailed manual, examples and a user forum.
Sign up to the user forum to receive updates on new releases.

Please cite Apollo in all written material you produce:
Hess S, Palma D (2019). "Apollo: a flexible, powerful and customisable
freeware package for choice model estimation and application." Journal
of Choice Modelling, 32. doi:10.1016/j.jocm.2019.100170
Warning message:
In .recacheSubclasses(def@className, def, env) :
undefined subclass "ndiMatrix" of class "replValueSp"; definition not updated


Also (I do not know if it is related) I tried to run the example "MDCEV model on time use data, alpha-gamma profile with outside good and socio-demographics" (I ran the example exactly as appears in the apollo examples page) and while estimating, I get:

Calculating log-likelihood at equal shares (LL(0)) for applicable models...
Calculating log-likelihood at observed shares from estimation data (LL(c)) for applicable models...
Calculating LL of each model component...
Computing covariance matrix using numerical methods (numDeriv).
0%....25%....50%....75%....100%
WARNING: Singular Hessian, cannot calculate s.e.
Hessian written to output/MDCEV_with_outside_good_hessian.csv
WARNING: Some eigenvalues of the Hessian are positive, indicating convergence to a saddle point!
Computing score matrix...

Your model was estimated using the BGW algorithm. Please acknowledge this by citing Bunch et al. (1993) - DOI 10.1145/151271.151279
Warning messages:
1: In log((inputs$continuousChoice[[j]]/inputs$gamma[[j]]) + 1) :
NaNs produced
2: In log(inputs$continuousChoice[[j]] + inputs$gamma[[j]]) :
NaNs produced
3: In log((inputs$continuousChoice[[j]]/inputs$gamma[[j]]) + 1) :
NaNs produced
4: In log(inputs$continuousChoice[[j]] + inputs$gamma[[j]]) :
NaNs produced
5: In log((inputs$continuousChoice[[j]]/inputs$gamma[[j]]) + 1) :
NaNs produced
6: In log(inputs$continuousChoice[[j]] + inputs$gamma[[j]]) :
NaNs produced
7: In log((inputs$continuousChoice[[j]]/inputs$gamma[[j]]) + 1) :
NaNs produced
8: In log(inputs$continuousChoice[[j]] + inputs$gamma[[j]]) :
NaNs produced
> apollo_modelOutput(model)
Model run by haort using Apollo 0.3.1 on R 4.3.2 for Windows.
Please acknowledge the use of Apollo by citing Hess & Palma (2019)
DOI 10.1016/j.jocm.2019.100170
www.ApolloChoiceModelling.com

Model name : MDCEV_with_outside_good
Model description : MDCEV model on time use data, alpha-gamma profile with outside good and socio-demographics
Model run at : 2023-11-22 17:50:59.58616
Estimation method : bgw
Model diagnosis : Relative function convergence
Optimisation diagnosis : Saddle point found
hessian properties : Some eigenvalues are positive and others negative
maximum eigenvalue : 0
reciprocal of condition number : not calculated (Hessian is not negative definite)
Number of individuals : 447
Number of rows in database : 2826
Number of modelled outcomes : 2826

Number of cores used : 1
Model without mixing

LL(start) : -21594.92
LL at equal shares, LL(0) : NA
LL at observed shares, LL(C) : NA
LL(final) : -15007.36
Rho-squared vs equal shares : Not applicable
Adj.Rho-squared vs equal shares : Not applicable
Rho-squared vs observed shares : Not applicable
Adj.Rho-squared vs observed shares : Not applicable
AIC : 30044.72
BIC : 30133.92

Estimated parameters : 15
Time taken (hh:mm:ss) : 00:00:33.44
pre-estimation : 00:00:1.19
estimation : 00:00:14.75
post-estimation : 00:00:17.5
Iterations : 36

Unconstrained optimisation.

Estimates:
Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0)
alpha_base -911.5129 NA NA NA NA
gamma_work 4.8990 NA NA NA NA
gamma_school 3.0985 NA NA NA NA
gamma_shopping 0.4264 NA NA NA NA
gamma_private 0.6200 NA NA NA NA
gamma_leisure 2.0958 NA NA NA NA
delta_work -3.7172 NA NA NA NA
delta_school -7.4183 NA NA NA NA
delta_shopping -3.8044 NA NA NA NA
delta_private -4.2786 NA NA NA NA
delta_leisure -3.4001 NA NA NA NA
delta_work_FT 1.3248 NA NA NA NA
delta_work_wknd -2.8609 NA NA NA NA
delta_school_young 2.3442 NA NA NA NA
delta_leisure_wknd 0.2949 NA NA NA NA
sig 1.0000 NA NA NA NA
stephanehess
Site Admin
Posts: 998
Joined: 24 Apr 2020, 16:29

Re: Apollo not properly loading (I believe)

Post by stephanehess »

Hi

thanks for alerting us to this. With the new optimiser (BGW), the model correctly identifies an issue with the estimation of alpha_base, as this tends to -inf. If you now fix this to a large negative value by settingt the value in apollo_beta to e.g. the solution it goes to, and including the parameter name in apollo_fixed, everything should work

Thanks

Stephane & David
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply