Page 1 of 1

error in testing likelihood function

Posted: 31 May 2021, 16:45
by klim
Hi all,

I'm trying to run a conditional logit model on my own panel dataset. Attached is the error that I run in after validation. The code is adapted from example 15, the changes are minor, including the dataset and the variable names etc.

Your help is appreciated. Thank you.

model = apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)

Testing likelihood function...
The following object is masked from package:base:

version

Error in apollo_preprocess(inputs = mnl_settings, modelType, functionality, :
Each element of "V" for model component "model" needs to be a scalar or a vector/matrix/cube with one row per observation in the "database"
> apollo_modelOutput(model)
Error in apollo_modelOutput(model) : object 'model' not found
> apollo_saveOutput(model)
Error in apollo_saveOutput(model) : object 'model' not found

Re: error in testing likelihood function

Posted: 02 Jun 2021, 14:22
by stephanehess
Hi

please show us the entire apollo_probabilities function as it is otherwise impossible to diagnose the reason for the error

Stephane

Re: error in testing likelihood function

Posted: 02 Jun 2021, 14:29
by klim
Hi Stephane, it turns out to be a typo in the coefficient name. It's resolved. A clearer error message could be helpful for new R users like me.

Many thanks!

Re: error in testing likelihood function

Posted: 02 Jun 2021, 14:32
by stephanehess
Hi

could you please share the line of code with and without the typo with me so that I can then think about making provision for such better error messages

Stephane